Patch level : 2.2
Files correlati : Ricompilazione Demo : [ ] Commento : Corretto disegno dei check buttons e centrature icona nei bottoni in genere git-svn-id: svn://10.65.10.50/trunk@13368 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8b6695fd19
commit
77dfd6d02a
8
xi/xi.c
8
xi/xi.c
@ -1216,8 +1216,10 @@ xi_draw_field_button( XI_OBJ * xi_obj )
|
||||
XinWindowPenSet( win, &hollow_cpen );
|
||||
xi_draw_rect( win, &r );
|
||||
}
|
||||
x = r.left + 3;
|
||||
y = r.top + 2;
|
||||
// Guy was here
|
||||
x = (r.left+r.right)/2-16; // x = r.left + 3;
|
||||
y = (r.top+r.bottom)/2-16; // y = r.top + 2;
|
||||
|
||||
cr = r;
|
||||
cr.top += 2;
|
||||
cr.left += 2;
|
||||
@ -3462,7 +3464,7 @@ xi_draw_button( XI_OBJ * xi_obj, XinRect * rct,
|
||||
r2 = r;
|
||||
xi_inflate_rect( &r2, -2 );
|
||||
xi_set_clip( win, &r2 );
|
||||
if ( down )
|
||||
if ( down || bd->checked) // Guy added bd->checked
|
||||
xi_draw_icon( win, x, y + 1, bd->down_icon_rid, XI_COLOR_BLACK,
|
||||
color_ctrl );
|
||||
else
|
||||
|
@ -1059,8 +1059,13 @@ redraw_cell_button( LM_DATA * lmp, int row, int col, XinRect * clip_rct,
|
||||
xi_inflate_rect( &r, -1 );
|
||||
lm_draw_3d_rect( lmp, &r, down, 2, TRUE );
|
||||
xi_inflate_rect( &r, -2 );
|
||||
cell_btn_icon_x = ( int ) xi_get_pref( XI_PREF_CELL_BTN_ICON_X );
|
||||
cell_btn_icon_y = ( int ) xi_get_pref( XI_PREF_CELL_BTN_ICON_Y );
|
||||
|
||||
// Guy was here: le icone vanno centrate nel bottone
|
||||
// cell_btn_icon_x = ( int ) xi_get_pref( XI_PREF_CELL_BTN_ICON_X );
|
||||
// cell_btn_icon_y = ( int ) xi_get_pref( XI_PREF_CELL_BTN_ICON_Y );
|
||||
cell_btn_icon_x = (r.right-r.left)/2 - 16;
|
||||
cell_btn_icon_y = (r.bottom-r.top)/2 - 16;
|
||||
|
||||
r.left = max( r.left, col_rct.left );
|
||||
r.right = min( r.right, col_rct.right );
|
||||
XinWindowDrawToolsGet( lmp->win, &ct );
|
||||
|
Loading…
x
Reference in New Issue
Block a user