projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compilation fix for wxUSE_INTL == 0 (patch 646466)
[wxWidgets.git]
/
src
/
mac
/
statbmp.cpp
diff --git
a/src/mac/statbmp.cpp
b/src/mac/statbmp.cpp
index b66b32f07248f99891befa8646b5774d468261e3..d04e549b0e80dc7990bce4596cabe0c669a99b8e 100644
(file)
--- a/
src/mac/statbmp.cpp
+++ b/
src/mac/statbmp.cpp
@@
-39,6
+39,13
@@
bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
{
SetName(name);
wxSize size = s ;
{
SetName(name);
wxSize size = s ;
+ if ( bitmap.Ok() )
+ {
+ if ( size.x == -1 )
+ size.x = bitmap.GetWidth() ;
+ if ( size.y == -1 )
+ size.y = bitmap.GetHeight() ;
+ }
m_backgroundColour = parent->GetBackgroundColour() ;
m_foregroundColour = parent->GetForegroundColour() ;
m_backgroundColour = parent->GetBackgroundColour() ;
m_foregroundColour = parent->GetForegroundColour() ;
@@
-60,8
+67,8
@@
bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
{
m_bitmap = bitmap;
void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap)
{
m_bitmap = bitmap;
+ SetSize(wxSize(bitmap.GetWidth(), bitmap.GetHeight()));
Refresh() ;
Refresh() ;
- SetBestSize(wxSize(bitmap.GetWidth(), bitmap.GetHeight()));
}
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
}
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
@@
-74,9
+81,6
@@
void wxStaticBitmap::OnPaint( wxPaintEvent &event )
wxSize wxStaticBitmap::DoGetBestSize() const
{
wxSize wxStaticBitmap::DoGetBestSize() const
{
- if ( m_bitmap.Ok() )
- return wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight());
- else
- return wxSize(16, 16); // completely arbitrary
+ return wxWindow::DoGetBestSize() ;
}
}