diff options
-rw-r--r-- | src/ClockTool.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ClockTool.cc b/src/ClockTool.cc index 64d70d1..f4fb4c5 100644 --- a/src/ClockTool.cc +++ b/src/ClockTool.cc | |||
@@ -213,9 +213,7 @@ void ClockTool::update(FbTk::Subject *subj) { | |||
213 | updateTime(); | 213 | updateTime(); |
214 | 214 | ||
215 | // + 2 to make the entire text fit inside | 215 | // + 2 to make the entire text fit inside |
216 | std::string text; | 216 | std::string text(m_button.text().size() + 2, '0'); |
217 | for (size_t i=0; i<m_button.text().size() + 2; ++i) | ||
218 | text += '0'; | ||
219 | 217 | ||
220 | 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()); |
221 | if (new_width != m_button.width()) { | 219 | if (new_width != m_button.width()) { |