From 82a03ec83ef56d4ee8bb7b52fe4e8cd035c437a4 Mon Sep 17 00:00:00 2001 From: mathias Date: Fri, 10 Dec 2004 01:58:09 +0000 Subject: changing the timeformat of the clocktool is done via the editdialog which causes a reconfigure .. which causes a loop over all toolbaritems and call updateSizing() .. where we should check, if a new timeformat makes the clock bigger or smaller... closes #1026096 --- src/ClockTool.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ClockTool.cc b/src/ClockTool.cc index f4fb4c5..c81513b 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc @@ -217,7 +217,7 @@ void ClockTool::update(FbTk::Subject *subj) { int new_width = m_theme.font().textWidth(text.c_str(), text.size()); if (new_width != m_button.width()) { - resize(m_theme.font().textWidth(text.c_str(), text.size()), m_button.height()); + resize(new_width, m_button.height()); resizeSig().notify(); } } @@ -260,6 +260,8 @@ void ClockTool::updateTime() { // Just change things that affect the size void ClockTool::updateSizing() { m_button.setBorderWidth(m_theme.border().width()); + // resizes if new timeformat + update(0); } void ClockTool::reRender() { -- cgit v0.11.2