aboutsummaryrefslogtreecommitdiff
path: root/src/ArrowButton.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/ArrowButton.cc
parent1657374940998176c7b63eb3296265fe6fbb5458 (diff)
downloadfluxbox_pavel-77f39235cf3ad79c5ff7d2b0f4717660476f3cf4.zip
fluxbox_pavel-77f39235cf3ad79c5ff7d2b0f4717660476f3cf4.tar.bz2
added FbTk::Util::clamp() and simplified related code
Diffstat (limited to 'src/ArrowButton.cc')
-rw-r--r--src/ArrowButton.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ArrowButton.cc b/src/ArrowButton.cc
index b764a8f..e46ffc4 100644
--- a/src/ArrowButton.cc
+++ b/src/ArrowButton.cc
@@ -22,6 +22,8 @@
22#include "ArrowButton.hh" 22#include "ArrowButton.hh"
23#include "ButtonTheme.hh" 23#include "ButtonTheme.hh"
24 24
25#include "FbTk/Util.hh"
26
25ArrowButton::ArrowButton(FbTk::FbDrawable::TriangleType arrow_type, 27ArrowButton::ArrowButton(FbTk::FbDrawable::TriangleType arrow_type,
26 const FbTk::FbWindow &parent, 28 const FbTk::FbWindow &parent,
27 int x, int y, 29 int x, int y,
@@ -92,6 +94,6 @@ void ArrowButton::updateTheme(const FbTk::Theme &theme) {
92 94
93 m_arrowscale = btheme.scale(); 95 m_arrowscale = btheme.scale();
94 if (m_arrowscale == 0) m_arrowscale = 250; // default is 0 => 300 96 if (m_arrowscale == 0) m_arrowscale = 250; // default is 0 => 300
95 else if (m_arrowscale < 100) m_arrowscale = 100; // otherwise clamp 97
96 else if (m_arrowscale > 100000) m_arrowscale = 100000; // clamp below overflow when *100 98 m_arrowscale = FbTk::Util::clamp(m_arrowscale, 100, 100000);
97} 99}