projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed multiple duplicate copies (with subtly different behaviour) of SetStringSelec...
[wxWidgets.git]
/
src
/
gtk
/
tglbtn.cpp
diff --git
a/src/gtk/tglbtn.cpp
b/src/gtk/tglbtn.cpp
index d8aac966f6ada216abb5e384c9177a70e342c586..973299339a186a84576fc5757faf54182bdc5f61 100644
(file)
--- a/
src/gtk/tglbtn.cpp
+++ b/
src/gtk/tglbtn.cpp
@@
-7,7
+7,7
@@
// Created: 08.02.01
// RCS-ID: $Id$
// Copyright: (c) 2000 Johnny C. Norris II
// Created: 08.02.01
// RCS-ID: $Id$
// Copyright: (c) 2000 Johnny C. Norris II
-// License:
Rocketeer licens
e
+// License:
wxWindows licenc
e
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
@@
-123,6
+123,7
@@
void wxToggleBitmapButton::SetLabel(const wxBitmap& label)
wxCHECK_RET(m_widget != NULL, wxT("invalid toggle button"));
m_bitmap = label;
wxCHECK_RET(m_widget != NULL, wxT("invalid toggle button"));
m_bitmap = label;
+ InvalidateBestSize();
OnSetBitmap();
}
OnSetBitmap();
}
@@
-159,11
+160,10
@@
bool wxToggleBitmapButton::Enable(bool enable /*=TRUE*/)
return TRUE;
}
return TRUE;
}
-void wxToggleBitmapButton::
ApplyWidgetStyle(
)
+void wxToggleBitmapButton::
DoApplyWidgetStyle(GtkRcStyle *style
)
{
{
- SetWidgetStyle();
- gtk_widget_set_style(m_widget, m_widgetStyle);
- gtk_widget_set_style(BUTTON_CHILD(m_widget), m_widgetStyle);
+ gtk_widget_modify_style(m_widget, style);
+ gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
}
bool wxToggleBitmapButton::IsOwnGtkWindow(GdkWindow *window)
}
bool wxToggleBitmapButton::IsOwnGtkWindow(GdkWindow *window)
@@
-193,7
+193,7
@@
void wxToggleBitmapButton::OnInternalIdle()
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
-// wxSize DoGetBestSize() const
+
// Get the "best" size for this control.
wxSize wxToggleBitmapButton::DoGetBestSize() const
{
// Get the "best" size for this control.
wxSize wxToggleBitmapButton::DoGetBestSize() const
{
@@
-205,6
+205,7
@@
wxSize wxToggleBitmapButton::DoGetBestSize() const
best.x = m_bitmap.GetWidth()+border;
best.y = m_bitmap.GetHeight()+border;
}
best.x = m_bitmap.GetWidth()+border;
best.y = m_bitmap.GetHeight()+border;
}
+ CacheBestSize(best);
return best;
}
return best;
}
@@
-300,11
+301,10
@@
bool wxToggleButton::Enable(bool enable /*=TRUE*/)
return TRUE;
}
return TRUE;
}
-void wxToggleButton::
ApplyWidgetStyle(
)
+void wxToggleButton::
DoApplyWidgetStyle(GtkRcStyle *style
)
{
{
- SetWidgetStyle();
- gtk_widget_set_style(m_widget, m_widgetStyle);
- gtk_widget_set_style(BUTTON_CHILD(m_widget), m_widgetStyle);
+ gtk_widget_modify_style(m_widget, style);
+ gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
}
bool wxToggleButton::IsOwnGtkWindow(GdkWindow *window)
}
bool wxToggleButton::IsOwnGtkWindow(GdkWindow *window)
@@
-334,7
+334,7
@@
void wxToggleButton::OnInternalIdle()
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
}
-// wxSize DoGetBestSize() const
+
// Get the "best" size for this control.
wxSize wxToggleButton::DoGetBestSize() const
{
// Get the "best" size for this control.
wxSize wxToggleButton::DoGetBestSize() const
{
@@
-345,8
+345,8
@@
wxSize wxToggleButton::DoGetBestSize() const
if (ret.x < 80) ret.x = 80;
}
if (ret.x < 80) ret.x = 80;
}
-
- return ret;
+ CacheBestSize(ret);
+
return ret;
}
// static
}
// static