Patch level : 10.0

Files correlati     : xi.dll
Ricompilazione Demo : [ ]
Commento            :
Corretta centratura icone in Windows 7


git-svn-id: svn://10.65.10.50/branches/R_10_00@22002 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2011-04-21 09:07:34 +00:00
parent 8a17fb2499
commit f54a52093c
2 changed files with 7 additions and 14 deletions

14
xi/xi.c
View File

@ -1209,10 +1209,7 @@ xi_draw_field_button( XI_OBJ * xi_obj )
const int button_depth = 1;
#if XIWS != XIWS_WM
int x,
y;
XinRect cr,
r;
XinRect cr, r;
#endif
XinWindow win;
@ -1237,9 +1234,6 @@ xi_draw_field_button( XI_OBJ * xi_obj )
XinWindowPenSet( win, &hollow_cpen );
xi_draw_rect( win, &r );
}
// Guy was here: center icon in button
x = (r.left+r.right)/2-16; // x = r.left + 3;
y = (r.top+r.bottom)/2-16; // y = r.top + 2;
cr = r;
xi_inflate_rect( &cr, -button_depth );
@ -1248,10 +1242,12 @@ xi_draw_field_button( XI_OBJ * xi_obj )
xi_bitmap_draw( fd->button_bitmap, win, &cr, &cr, FALSE );
else
{
int icon_rid;
XinColor color = ( BOOLEAN ) xi_get_pref( XI_PREF_3D_LOOK ) ? color_ctrl : xi_get_pref( XI_PREF_COLOR_CTRL );
// Guy was here: center icon in button
int x = (r.left+r.right-XinMetricGet(XinMetricIconWidth))/2; // x = r.left + 3;
int y = (r.top+r.bottom-XinMetricGet(XinMetricIconHeight))/2; // y = r.top + 2;
icon_rid = fd->icon_rid;
int icon_rid = fd->icon_rid;
if ( icon_rid == 0 )
icon_rid = ( int ) xi_get_pref( XI_PREF_COMBO_ICON );
if ( fd->down )

View File

@ -720,10 +720,7 @@ xi_clean_up( )
long
xi_get_pref( XI_PREF_TYPE pref_type )
{
long pref;
pref = xi_preferences[pref_type];
return pref;
return xi_preferences[pref_type];
}
void
@ -3985,7 +3982,7 @@ xi_draw_foc_and_dflt_if_necessary( XI_OBJ * focus_obj, XI_OBJ * next_obj )
BOOLEAN
xi_get_native_controls( XI_OBJ * obj )
{
if ( obj->type == XIT_BTN )
if ( obj != NULL && obj->type == XIT_BTN )
{
switch ( obj->v.btn->draw_as )
{