controls.cpp Aggiunta gestione colori bottoni non nativi
msksheet.cpp window.cpp Corretta getione palette delle imagini xvtility.cpp Migliorato disegno rettangolo 3d git-svn-id: svn://10.65.10.50/trunk@3297 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
be6438d301
commit
aa71082da5
@ -112,7 +112,7 @@ void TPicture_array::reload()
|
|||||||
if (i)
|
if (i)
|
||||||
{
|
{
|
||||||
i->load(id);
|
i->load(id);
|
||||||
i->convert_transparent_color(MASK_BACK_COLOR);
|
i->convert_transparent_color(BTN_BACK_COLOR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -177,7 +177,10 @@ XVT_FNTID xvt_load_default_font()
|
|||||||
{
|
{
|
||||||
xvt_font_destroy(FAT_FONT);
|
xvt_font_destroy(FAT_FONT);
|
||||||
FAT_FONT = NULL;
|
FAT_FONT = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
X_FU_MULTIPLE = Y_FU_MULTIPLE = 0;
|
||||||
|
|
||||||
return xvt_default_font(FALSE);
|
return xvt_default_font(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +227,7 @@ void customize_colors()
|
|||||||
aga_set_pref(AGA_PREF_BTN_COLOR_CTRL, BTN_BACK_COLOR);
|
aga_set_pref(AGA_PREF_BTN_COLOR_CTRL, BTN_BACK_COLOR);
|
||||||
|
|
||||||
BTN_DARK_COLOR = colors.get_color("ButtonDark", NULL, -1, BTN_DARK_COLOR);
|
BTN_DARK_COLOR = colors.get_color("ButtonDark", NULL, -1, BTN_DARK_COLOR);
|
||||||
aga_set_pref(AGA_PREF_BTN_COLOR_DARK, BTN_DARK_COLOR);
|
aga_set_pref(AGA_PREF_BTN_COLOR_DARK, BTN_DARK_COLOR);
|
||||||
|
|
||||||
if (_picture)
|
if (_picture)
|
||||||
_picture->reload();
|
_picture->reload();
|
||||||
@ -366,6 +369,16 @@ WINDOW create_interface(WINDOW parent, short x, short y, short dx, short dy,
|
|||||||
|
|
||||||
xi_dequeue();
|
xi_dequeue();
|
||||||
xi_tree_free(def);
|
xi_tree_free(def);
|
||||||
|
|
||||||
|
COLOR colori[12] = { MASK_BACK_COLOR, MASK_LIGHT_COLOR, MASK_DARK_COLOR,
|
||||||
|
NORMAL_COLOR, NORMAL_BACK_COLOR,
|
||||||
|
FOCUS_COLOR, FOCUS_BACK_COLOR,
|
||||||
|
DISABLED_COLOR, DISABLED_BACK_COLOR,
|
||||||
|
BTN_BACK_COLOR, BTN_LIGHT_COLOR, BTN_DARK_COLOR };
|
||||||
|
XVT_PALETTE pu = xvt_palet_create(XVT_PALETTE_USER, NULL);
|
||||||
|
xvt_palet_add_colors(pu, colori, 12);
|
||||||
|
xvt_vobj_set_palet(win, pu);
|
||||||
|
xvt_palet_destroy(pu);
|
||||||
|
|
||||||
if (Y_FU_MULTIPLE == 0)
|
if (Y_FU_MULTIPLE == 0)
|
||||||
{
|
{
|
||||||
@ -373,12 +386,6 @@ WINDOW create_interface(WINDOW parent, short x, short y, short dx, short dy,
|
|||||||
xi_pu_to_fu(itf, (PNT*)&max, 2);
|
xi_pu_to_fu(itf, (PNT*)&max, 2);
|
||||||
X_FU_MULTIPLE = max.right / 80;
|
X_FU_MULTIPLE = max.right / 80;
|
||||||
Y_FU_MULTIPLE = max.bottom / 25;
|
Y_FU_MULTIPLE = max.bottom / 25;
|
||||||
|
|
||||||
PNT f1 = { XI_FU_MULTIPLE, XI_FU_MULTIPLE };
|
|
||||||
xi_fu_to_pu(itf, &f1, 1);
|
|
||||||
const int spacing = ROWY - f1.v;
|
|
||||||
if (spacing > 0)
|
|
||||||
xi_set_pref(XI_PREF_VERT_PIXEL_SPACING, spacing);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dx > 0)
|
if (dx > 0)
|
||||||
@ -407,8 +414,8 @@ WINDOW create_interface(WINDOW parent, short x, short y, short dx, short dy,
|
|||||||
|
|
||||||
xi_dequeue();
|
xi_dequeue();
|
||||||
xi_tree_free(def);
|
xi_tree_free(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
return win;
|
return win;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1199,6 +1199,13 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
|||||||
refused = TRUE;
|
refused = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case K_CTRL + '-':
|
||||||
|
case K_CTRL + '+':
|
||||||
|
case K_CTRL+K_PREV:
|
||||||
|
case K_CTRL+K_NEXT:
|
||||||
|
case K_CTRL+K_HOME:
|
||||||
|
case K_CTRL+K_END:
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (k > K_CTRL)
|
if (k > K_CTRL)
|
||||||
{
|
{
|
||||||
|
@ -448,10 +448,9 @@ void TImage::draw(WINDOW w, const RCT& dst, const RCT& src) const
|
|||||||
void TImage::set_palette(
|
void TImage::set_palette(
|
||||||
WINDOW w) const // @parm Finestra a cui settare la palette
|
WINDOW w) const // @parm Finestra a cui settare la palette
|
||||||
{
|
{
|
||||||
XVT_PALETTE p = xvt_palet_create(XVT_PALETTE_USER, NULL);
|
XVT_PALETTE wp = xvt_vobj_get_palet(w);
|
||||||
xvt_palet_add_colors_from_image(p, _image);
|
if (wp != NULL && xvt_palet_get_type(wp) == XVT_PALETTE_USER)
|
||||||
xvt_vobj_set_palet(w, p);
|
xvt_palet_add_colors_from_image(wp, _image);
|
||||||
xvt_palet_destroy(p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 100%
|
// Certified 100%
|
||||||
|
@ -666,7 +666,7 @@ void xvt_draw_rect(WINDOW win, const RCT& rect, COLOR lt, COLOR rb, short depth)
|
|||||||
PNT p; // Current vertex of the rectangle
|
PNT p; // Current vertex of the rectangle
|
||||||
|
|
||||||
bool drawn = FALSE;
|
bool drawn = FALSE;
|
||||||
if (lt != COLOR_LTGRAY)
|
if (lt != BTN_BACK_COLOR)
|
||||||
{
|
{
|
||||||
p.h = r.left; p.v = r.bottom;
|
p.h = r.left; p.v = r.bottom;
|
||||||
xvt_dwin_draw_set_pos(win, p);
|
xvt_dwin_draw_set_pos(win, p);
|
||||||
@ -678,7 +678,7 @@ void xvt_draw_rect(WINDOW win, const RCT& rect, COLOR lt, COLOR rb, short depth)
|
|||||||
drawn = TRUE;
|
drawn = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rb != COLOR_LTGRAY)
|
if (rb != BTN_BACK_COLOR)
|
||||||
{
|
{
|
||||||
if (pen.color != rb)
|
if (pen.color != rb)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user