aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/IconButton.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/IconButton.cc b/src/IconButton.cc
index d8205fb..a4cd8af 100644
--- a/src/IconButton.cc
+++ b/src/IconButton.cc
@@ -288,7 +288,13 @@ bool IconButton::setOrientation(FbTk::Orientation orient) {
288} 288}
289 289
290unsigned int IconButton::preferredWidth() const { 290unsigned int IconButton::preferredWidth() const {
291 IconButton *that = const_cast<IconButton*>(this);
292 that->setFont(that->m_theme.focusedTheme()->text().font());
291 unsigned int r = TextButton::preferredWidth(); 293 unsigned int r = TextButton::preferredWidth();
294 that->setFont(that->m_theme.unfocusedTheme()->text().font());
295 unsigned int r2 = TextButton::preferredWidth();
296 that->setFont(that->m_theme->text().font());
297 r = std::max(r, r2);
292 if (m_icon_pixmap.drawable()) 298 if (m_icon_pixmap.drawable())
293 r += m_icon_window.width() + 1; 299 r += m_icon_window.width() + 1;
294 return r; 300 return r;