Disegnati i bottoni della prima colonna con i colori AGA dei bottoni
git-svn-id: svn://10.65.10.50/trunk@5773 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a9042029df
commit
7884457722
41
xi/xi.c
41
xi/xi.c
@ -1162,6 +1162,9 @@ xi_draw_field_button( XI_OBJ * xi_obj )
|
|||||||
XI_FIELD_DATA *fd;
|
XI_FIELD_DATA *fd;
|
||||||
unsigned long attrib;
|
unsigned long attrib;
|
||||||
STX_DATA *stxd;
|
STX_DATA *stxd;
|
||||||
|
const XinColor color_light = aga_get_pref(AGA_PREF_BTN_COLOR_LIGHT);
|
||||||
|
const XinColor color_ctrl = aga_get_pref(AGA_PREF_BTN_COLOR_CTRL);
|
||||||
|
const XinColor color_dark = aga_get_pref(AGA_PREF_BTN_COLOR_DARK);
|
||||||
|
|
||||||
#if XIWS != XIWS_WM
|
#if XIWS != XIWS_WM
|
||||||
int x,
|
int x,
|
||||||
@ -1185,27 +1188,14 @@ xi_draw_field_button( XI_OBJ * xi_obj )
|
|||||||
r.top++;
|
r.top++;
|
||||||
r.left++;
|
r.left++;
|
||||||
r.bottom--;
|
r.bottom--;
|
||||||
r.right--;
|
r.right--;
|
||||||
if ( ( BOOLEAN ) xi_get_pref( XI_PREF_3D_LOOK ) )
|
if ( ( BOOLEAN ) xi_get_pref( XI_PREF_3D_LOOK ) )
|
||||||
xi_draw_3d_rect( win, &r, fd->down, 2, stxd->hilight_color,
|
xi_draw_3d_rect(win, &r, fd->down, 2, color_light, color_ctrl, color_dark);
|
||||||
stxd->attrib & XI_ATR_ENABLED ? stxd->back_color : stxd->disabled_back_color,
|
|
||||||
stxd->shadow_color );
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((BOOLEAN)xi_get_pref(XI_PREF_3D_LOOK))
|
XinWindowBrushSet( win, &white_cbrush );
|
||||||
{
|
XinWindowPenSet( win, &hollow_cpen );
|
||||||
const XinColor color_light = aga_get_pref(AGA_PREF_BTN_COLOR_LIGHT);
|
xi_draw_rect( win, &r );
|
||||||
const XinColor color_ctrl = aga_get_pref(AGA_PREF_BTN_COLOR_CTRL);
|
|
||||||
const XinColor color_dark = aga_get_pref(AGA_PREF_BTN_COLOR_DARK);
|
|
||||||
|
|
||||||
xi_draw_3d_rect(win, &r, fd->down, 2, color_light, color_ctrl, color_dark);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
XinWindowBrushSet( win, &white_cbrush );
|
|
||||||
XinWindowPenSet( win, &hollow_cpen );
|
|
||||||
xi_draw_rect( win, &r );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
x = r.left + 3;
|
x = r.left + 3;
|
||||||
y = r.top + 2;
|
y = r.top + 2;
|
||||||
@ -1220,16 +1210,15 @@ xi_draw_field_button( XI_OBJ * xi_obj )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int icon_rid;
|
int icon_rid;
|
||||||
|
XinColor color = ( BOOLEAN ) xi_get_pref( XI_PREF_3D_LOOK ) ? color_ctrl : xi_get_pref( XI_PREF_COLOR_CTRL );
|
||||||
|
|
||||||
icon_rid = fd->icon_rid;
|
icon_rid = fd->icon_rid;
|
||||||
if ( icon_rid == 0 )
|
if ( icon_rid == 0 )
|
||||||
icon_rid = ( int ) xi_get_pref( XI_PREF_COMBO_ICON );
|
icon_rid = ( int ) xi_get_pref( XI_PREF_COMBO_ICON );
|
||||||
if ( fd->down )
|
if ( fd->down )
|
||||||
xi_draw_icon( win, x, y + 1, icon_rid, XI_COLOR_BLACK,
|
xi_draw_icon( win, x, y + 1, icon_rid, XI_COLOR_BLACK, color );
|
||||||
xi_get_pref( XI_PREF_COLOR_CTRL ) );
|
|
||||||
else
|
else
|
||||||
xi_draw_icon( win, x, y, icon_rid, XI_COLOR_BLACK,
|
xi_draw_icon( win, x, y, icon_rid, XI_COLOR_BLACK, color );
|
||||||
xi_get_pref( XI_PREF_COLOR_CTRL ) );
|
|
||||||
}
|
}
|
||||||
xi_set_clip( win, NULL );
|
xi_set_clip( win, NULL );
|
||||||
XinWindowPenSet( win, &black_cpen );
|
XinWindowPenSet( win, &black_cpen );
|
||||||
@ -3475,10 +3464,8 @@ xi_draw_button( XI_OBJ * xi_obj, XinRect * rct,
|
|||||||
fontp = xi_obj->itf->v.itf->font;
|
fontp = xi_obj->itf->v.itf->font;
|
||||||
if ( fontp == NULL )
|
if ( fontp == NULL )
|
||||||
fontp = xi_get_system_font( );
|
fontp = xi_get_system_font( );
|
||||||
// color = ( XinColor ) xi_get_pref( XI_PREF_COLOR_CTRL );
|
|
||||||
// XinWindowColorTextBackSet( win, color );
|
|
||||||
XinWindowColorTextBackSet( win, color_ctrl );
|
XinWindowColorTextBackSet( win, color_ctrl );
|
||||||
XinWindowTextOpaqueSet( win, TRUE );
|
XinWindowTextOpaqueSet( win, FALSE );
|
||||||
XinWindowFontMap( win, fontp );
|
XinWindowFontMap( win, fontp );
|
||||||
XinFontMetricsGet( fontp, &leading, &ascent, &descent );
|
XinFontMetricsGet( fontp, &leading, &ascent, &descent );
|
||||||
xi_draw_clipped_text( win, fontp, bd->text, &text_rect, &text_rect, attrib, FALSE, 0, -1,
|
xi_draw_clipped_text( win, fontp, bd->text, &text_rect, &text_rect, attrib, FALSE, 0, -1,
|
||||||
@ -3521,7 +3508,7 @@ xi_draw_button( XI_OBJ * xi_obj, XinRect * rct,
|
|||||||
|
|
||||||
rct2 = r;
|
rct2 = r;
|
||||||
xi_inflate_rect( &rct2, -3 );
|
xi_inflate_rect( &rct2, -3 );
|
||||||
middle = ( rct2.top + rct2.bottom ) / 2;
|
/* middle = ( rct2.top + rct2.bottom ) / 2;
|
||||||
font_height = ascent + descent + leading;
|
font_height = ascent + descent + leading;
|
||||||
font_top = middle - font_height / 2;
|
font_top = middle - font_height / 2;
|
||||||
rct2.top = middle - font_height / 2 - 3;
|
rct2.top = middle - font_height / 2 - 3;
|
||||||
@ -3529,7 +3516,7 @@ xi_draw_button( XI_OBJ * xi_obj, XinRect * rct,
|
|||||||
if ( bline != -1 )
|
if ( bline != -1 )
|
||||||
rct2.bottom = bline + descent + 2;
|
rct2.bottom = bline + descent + 2;
|
||||||
rct2.top = max( rct2.top, r.top + 3 );
|
rct2.top = max( rct2.top, r.top + 3 );
|
||||||
rct2.bottom = min( rct2.bottom, r.bottom );
|
rct2.bottom = min( rct2.bottom, r.bottom ); */
|
||||||
pen.width = 1;
|
pen.width = 1;
|
||||||
pen.fore_color = XI_COLOR_BLACK;
|
pen.fore_color = XI_COLOR_BLACK;
|
||||||
pen.pattern = XinPenSolid;
|
pen.pattern = XinPenSolid;
|
||||||
|
10
xi/xilm3.c
10
xi/xilm3.c
@ -1608,9 +1608,15 @@ TO OPTIMIZE BACKGROUND DRAWING, USE NEXT TWO LINES
|
|||||||
rct = column_data->prct;
|
rct = column_data->prct;
|
||||||
rct.top = ri->prct.top;
|
rct.top = ri->prct.top;
|
||||||
rct.bottom = ri->prct.bottom;
|
rct.bottom = ri->prct.bottom;
|
||||||
if ( column_data->column_well || column_data->column_platform )
|
if ( column_data->column_well || column_data->column_platform )
|
||||||
|
{
|
||||||
|
const XinColor color_light = aga_get_pref(AGA_PREF_BTN_COLOR_LIGHT);
|
||||||
|
const XinColor color_ctrl = aga_get_pref(AGA_PREF_BTN_COLOR_CTRL);
|
||||||
|
const XinColor color_dark = aga_get_pref(AGA_PREF_BTN_COLOR_DARK);
|
||||||
|
|
||||||
xi_draw_3d_rect( win, &rct, ( BOOLEAN ) ( CELL_IS_SELECTED( lmp, row, col ) ? !column_data->column_well :
|
xi_draw_3d_rect( win, &rct, ( BOOLEAN ) ( CELL_IS_SELECTED( lmp, row, col ) ? !column_data->column_well :
|
||||||
column_data->column_well ), 2, 0L, 0L, 0L );
|
column_data->column_well ), 2, color_light, color_ctrl, color_dark );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user