aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-09 13:31:54 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-09 13:31:54 (GMT)
commit77f39235cf3ad79c5ff7d2b0f4717660476f3cf4 (patch)
tree45cc07526285fc74af54f340782eb11a9d7bc55c /src/IconbarTool.cc
parent1657374940998176c7b63eb3296265fe6fbb5458 (diff)
downloadfluxbox_pavel-77f39235cf3ad79c5ff7d2b0f4717660476f3cf4.zip
fluxbox_pavel-77f39235cf3ad79c5ff7d2b0f4717660476f3cf4.tar.bz2
added FbTk::Util::clamp() and simplified related code
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 85997ed..14835cb 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -47,6 +47,7 @@
47#include "FbTk/ImageControl.hh" 47#include "FbTk/ImageControl.hh"
48#include "FbTk/MacroCommand.hh" 48#include "FbTk/MacroCommand.hh"
49#include "FbTk/MenuSeparator.hh" 49#include "FbTk/MenuSeparator.hh"
50#include "FbTk/Util.hh"
50 51
51#include <typeinfo> 52#include <typeinfo>
52#include <iterator> 53#include <iterator>
@@ -389,12 +390,8 @@ void IconbarTool::update(FbTk::Subject *subj) {
389 } 390 }
390 391
391 m_icon_container.setAlignment(*m_rc_alignment); 392 m_icon_container.setAlignment(*m_rc_alignment);
392 // clamp to normal values
393 if (*m_rc_client_width < 1)
394 *m_rc_client_width = 10;
395 else if (*m_rc_client_width > 400)
396 *m_rc_client_width = 400;
397 393
394 *m_rc_client_width = FbTk::Util::clamp(*m_rc_client_width, 10, 400);
398 m_icon_container.setMaxSizePerClient(*m_rc_client_width); 395 m_icon_container.setMaxSizePerClient(*m_rc_client_width);
399 396
400 if (subj == &m_focused_theme.reconfigSig() || 397 if (subj == &m_focused_theme.reconfigSig() ||