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
mathias mathias
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
src/ClockTool.cc
→
src/ClockTool.cc
@@ -217,7 +217,7 @@ std::string text(m_button.text().size() + 2, '0');
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 @@
// 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() {