Changeset 22096 for branches/swt/src


Ignore:
Timestamp:
May 14, 2015, 9:55:41 PM (11 years ago)
Author:
rousseau
Message:

Cleanup button text alignment fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/swt/src/user32/button.cpp

    r22094 r22096  
    776776  INT format = 0;
    777777
    778   if (dwStyle & BS_LEFT) format = DT_LEFT;
    779   else if (dwStyle & BS_CENTER) format = DT_CENTER;
    780   else if ((dwStyle & BS_RIGHT) || (dwExStyle & WS_EX_RIGHT)) format = DT_RIGHT;
    781   else format = defHorz;
    782 
    783 /*
    784   if (dwStyle & BS_TOP) format |= DT_TOP;
    785   else if (dwStyle & BS_VCENTER) format |= DT_VCENTER;
    786   else if (dwStyle & BS_BOTTOM) format |= DT_BOTTOM;
    787   else format |= defVert;
    788 */
    789 
    790778  /*
    791779   * BS_CENTER is not a single bit-flag, but is actually BS_LEFT | BS_RIGHT.
     
    797785  else if (((dwStyle & BS_RIGHT) == BS_RIGHT) || ((dwExStyle & WS_EX_RIGHT) == BS_RIGHT)) format = DT_RIGHT;
    798786  else format = defHorz;
     787
     788  if (dwStyle & BS_TOP) format |= DT_TOP;
     789  else if (dwStyle & BS_VCENTER) format |= DT_VCENTER;
     790  else if (dwStyle & BS_BOTTOM) format |= DT_BOTTOM;
     791  else format |= defVert;
     792
    799793  if (!(dwStyle & BS_MULTILINE)) format |= DT_SINGLELINE;
    800794
Note: See TracChangeset for help on using the changeset viewer.