diff options
-rw-r--r-- | src/ClockTool.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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) { | |||
217 | 217 | ||
218 | int new_width = m_theme.font().textWidth(text.c_str(), text.size()); | 218 | int new_width = m_theme.font().textWidth(text.c_str(), text.size()); |
219 | if (new_width != m_button.width()) { | 219 | if (new_width != m_button.width()) { |
220 | resize(m_theme.font().textWidth(text.c_str(), text.size()), m_button.height()); | 220 | resize(new_width, m_button.height()); |
221 | resizeSig().notify(); | 221 | resizeSig().notify(); |
222 | } | 222 | } |
223 | } | 223 | } |
@@ -260,6 +260,8 @@ void ClockTool::updateTime() { | |||
260 | // Just change things that affect the size | 260 | // Just change things that affect the size |
261 | void ClockTool::updateSizing() { | 261 | void ClockTool::updateSizing() { |
262 | m_button.setBorderWidth(m_theme.border().width()); | 262 | m_button.setBorderWidth(m_theme.border().width()); |
263 | // resizes if new timeformat | ||
264 | update(0); | ||
263 | } | 265 | } |
264 | 266 | ||
265 | void ClockTool::reRender() { | 267 | void ClockTool::reRender() { |