This commit is contained in:
ehouse 2004-05-06 04:10:48 +00:00
parent da304002d2
commit 452b3869bd

View file

@ -281,30 +281,27 @@ getSizes( PalmAppGlobals* globals )
static void static void
locateTrayButtons( PalmAppGlobals* globals, XP_U16 trayTop, XP_U16 trayHt ) locateTrayButtons( PalmAppGlobals* globals, XP_U16 trayTop, XP_U16 trayHt )
{ {
RectangleType rect; if ( FrmGetActiveForm() != NULL ) {
XP_Bool buttonsAtTop, trayAtTop; RectangleType rect;
XP_S16 diff; XP_S16 diff;
if ( FrmGetActiveForm() == NULL ) { getObjectBounds( XW_MAIN_HIDE_BUTTON_ID, &rect );
return XP_FALSE; diff = trayTop - rect.topLeft.y;
}
getObjectBounds( XW_MAIN_HIDE_BUTTON_ID, &rect ); if ( diff != 0 ) {
diff = trayTop - rect.topLeft.y; XP_U16 i;
XP_U16 ids[] = {XW_MAIN_SHOWTRAY_BUTTON_ID,
XW_MAIN_HIDE_BUTTON_ID,
XW_MAIN_DONE_BUTTON_ID,
XW_MAIN_TRADE_BUTTON_ID,
XW_MAIN_JUGGLE_BUTTON_ID
};
if ( diff != 0 ) { for ( i = 0; i < sizeof(ids)/sizeof(ids[0]); ++i ) {
XP_U16 i; getObjectBounds( ids[i], &rect );
XP_U16 ids[] = {XW_MAIN_SHOWTRAY_BUTTON_ID, rect.topLeft.y += diff;
XW_MAIN_HIDE_BUTTON_ID, setObjectBounds( ids[i], &rect );
XW_MAIN_DONE_BUTTON_ID, }
XW_MAIN_TRADE_BUTTON_ID,
XW_MAIN_JUGGLE_BUTTON_ID
};
for ( i = 0; i < sizeof(ids)/sizeof(ids[0]); ++i ) {
getObjectBounds( ids[i], &rect );
rect.topLeft.y += diff;
setObjectBounds( ids[i], &rect );
} }
} }
} /* locateTrayButtons */ } /* locateTrayButtons */