Attivato F2 sui listbox
Differenziati colori dei bottoni git-svn-id: svn://10.65.10.50/trunk@3241 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0c43d68b83
commit
bfad4b4f18
@ -13,6 +13,9 @@
|
||||
COLOR MASK_BACK_COLOR = COLOR_DKCYAN;
|
||||
COLOR MASK_LIGHT_COLOR = COLOR_CYAN;
|
||||
COLOR MASK_DARK_COLOR = COLOR_GRAY;
|
||||
COLOR BTN_BACK_COLOR = COLOR_LTGRAY;
|
||||
COLOR BTN_LIGHT_COLOR = COLOR_WHITE;
|
||||
COLOR BTN_DARK_COLOR = COLOR_GRAY;
|
||||
COLOR TOOL_BACK_COLOR = COLOR_GRAY;
|
||||
COLOR NORMAL_COLOR = COLOR_BLACK;
|
||||
COLOR NORMAL_BACK_COLOR = COLOR_LTGRAY;
|
||||
@ -93,7 +96,7 @@ TImage& TPicture_array::add(short id)
|
||||
if (i == NULL)
|
||||
{
|
||||
i = new TImage(id);
|
||||
i->convert_transparent_color();
|
||||
i->convert_transparent_color(BTN_BACK_COLOR);
|
||||
TArray::add(i, id);
|
||||
}
|
||||
|
||||
@ -184,6 +187,15 @@ void customize_colors()
|
||||
xi_set_pref(XI_PREF_COLOR_CTRL, MASK_BACK_COLOR);
|
||||
xi_set_pref(XI_PREF_COLOR_DARK, MASK_DARK_COLOR);
|
||||
xi_set_pref(XI_PREF_COLOR_DISABLED, DISABLED_COLOR);
|
||||
|
||||
BTN_BACK_COLOR = colors.get_color("ButtonBack", NULL, -1, BTN_BACK_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_LIGHT, BTN_LIGHT_COLOR);
|
||||
|
||||
BTN_LIGHT_COLOR = colors.get_color("ButtonLight", NULL, -1, BTN_LIGHT_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_CTRL, BTN_BACK_COLOR);
|
||||
|
||||
BTN_DARK_COLOR = colors.get_color("ButtonDark", NULL, -1, BTN_DARK_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_DARK, BTN_DARK_COLOR);
|
||||
|
||||
if (_picture)
|
||||
_picture->destroy();
|
||||
@ -1321,7 +1333,7 @@ void TPushbutton_control::update()
|
||||
pen.width = 1;
|
||||
pen.pat = PAT_SOLID;
|
||||
pen.style = P_SOLID;
|
||||
pen.color = MASK_BACK_COLOR;
|
||||
pen.color = BTN_BACK_COLOR;
|
||||
xvt_dwin_set_cpen(win, &pen);
|
||||
for (int py = y + i.height(); py >= y; py -= 2)
|
||||
{
|
||||
@ -1952,7 +1964,9 @@ bool TListbox_control::event_handler(XI_OBJ* itf, XI_EVENT* xiev)
|
||||
else if (k == K_RIGHT) // poor man's substitute for down arrow
|
||||
_ddl->select_by_ofs(1);
|
||||
else if (k == K_LEFT) // poor man's substitute for up arrow
|
||||
_ddl->select_by_ofs(-1);
|
||||
_ddl->select_by_ofs(-1);
|
||||
else if (k == K_F2 || k == K_F11 || k == K_F12)
|
||||
notify_key(k);
|
||||
xiev->refused = TRUE;
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user