projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for (re)positioning the main window when the style changes
[wxWidgets.git]
/
src
/
univ
/
button.cpp
diff --git
a/src/univ/button.cpp
b/src/univ/button.cpp
index 95d4ce4aee40b65e7ea17e67e9aa5674a88a686e..65a5b69c9bbfbd87f5e64f0ff4a7d143207e4133 100644
(file)
--- a/
src/univ/button.cpp
+++ b/
src/univ/button.cpp
@@
-136,9
+136,12
@@
wxSize wxButton::DoGetBestClientSize() const
// for compatibility with other ports, the buttons default size is never
// less than the standard one
// for compatibility with other ports, the buttons default size is never
// less than the standard one
- wxSize szDef = GetDefaultSize();
- if ( width < szDef.x )
- width = szDef.x;
+ if ( !(GetWindowStyle() & wxBU_EXACTFIT) )
+ {
+ wxSize szDef = GetDefaultSize();
+ if ( width < szDef.x )
+ width = szDef.x;
+ }
return wxSize(width, height);
}
return wxSize(width, height);
}
@@
-149,7
+152,11
@@
wxSize wxButton::DoGetBestClientSize() const
void wxButton::DoDraw(wxControlRenderer *renderer)
{
void wxButton::DoDraw(wxControlRenderer *renderer)
{
- renderer->DrawButtonBorder();
+ if ( !(GetWindowStyle() & wxBORDER_NONE) )
+ {
+ renderer->DrawButtonBorder();
+ }
+
renderer->DrawLabel(m_bitmap, m_marginBmpX, m_marginBmpY);
}
renderer->DrawLabel(m_bitmap, m_marginBmpX, m_marginBmpY);
}