1) minor modifications in fileconf.cpp
2) new MSW function (private.h): wxGetWindowText() which works with wxString instead of (horror) fixed size buffers. All calls to ::GetWindowText() should be replaced with this! 3) remains of casts to float in different wxControl classes removed, (EDIT|BUTTON)_HEIGHT_FROM_CHAR_HEIGHT macros introduced (could be made inline functions as well...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
|
||||
#endif
|
||||
|
||||
#define BUTTON_HEIGHT_FACTOR (EDIT_CONTROL_FACTOR * 1.1)
|
||||
#define BUTTON_HEIGHT_FROM_CHAR_HEIGHT(cy) (11*EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)/10)
|
||||
|
||||
// Buttons
|
||||
|
||||
@@ -135,7 +135,7 @@ void wxButton::SetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
actualHeight = hh;
|
||||
else if (height == -1)
|
||||
{
|
||||
actualHeight = (int)(cyf*BUTTON_HEIGHT_FACTOR) ;
|
||||
actualHeight = BUTTON_HEIGHT_FROM_CHAR_HEIGHT(cyf);
|
||||
}
|
||||
|
||||
MoveWindow((HWND) GetHWND(), x1, y1, actualWidth, actualHeight, TRUE);
|
||||
|
Reference in New Issue
Block a user