summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-11 22:30:56 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-11 22:30:56 +0300
commit561f5e1f0010e61d648efe340edf5d4c43b51761 (patch)
treec223aadde6d7f6eb23b3a42ffe4d99c3ab853c9e
parent0b373909f1ad987e38b9c07f799f48c3c0b0c3fd (diff)
downloadplus-561f5e1f0010e61d648efe340edf5d4c43b51761.tar.gz
plus-561f5e1f0010e61d648efe340edf5d4c43b51761.tar.bz2
plus-561f5e1f0010e61d648efe340edf5d4c43b51761.tar.xz
plus-561f5e1f0010e61d648efe340edf5d4c43b51761.zip
Add theme option to set scrollbar width/height.
New theme option: scrollbarsize - set scrollbar size. Default value 12.
-rw-r--r--data/themes/jewelry/scrollbuttons.xml1
-rw-r--r--src/gui/widgets/scrollarea.cpp3
-rw-r--r--src/gui/widgets/scrollarea.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/data/themes/jewelry/scrollbuttons.xml b/data/themes/jewelry/scrollbuttons.xml
index 6a42d7dba..afb023e44 100644
--- a/data/themes/jewelry/scrollbuttons.xml
+++ b/data/themes/jewelry/scrollbuttons.xml
@@ -3,6 +3,7 @@
<widget type="Window" xpos="41" ypos="100">
<option name="showbuttons" value="0" />
<option name="markersize" value="0" />
+ <option name="scrollbarsize" value="12" />
<part type="left" xpos="0" ypos="0" width="12" height="12" />
<part type="right" xpos="0" ypos="16" width="12" height="12" />
<part type="down" xpos="0" ypos="32" width="12" height="12" />
diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp
index b7073372c..838e5dad2 100644
--- a/src/gui/widgets/scrollarea.cpp
+++ b/src/gui/widgets/scrollarea.cpp
@@ -34,6 +34,7 @@ int ScrollArea::instances = 0;
float ScrollArea::mAlpha = 1.0;
bool ScrollArea::mShowButtons = true;
int ScrollArea::mMarkerSize = 0;
+int ScrollArea::mScrollbarSize = 12;
ImageRect ScrollArea::background;
ImageRect ScrollArea::vMarker;
ImageRect ScrollArea::vMarkerHi;
@@ -172,6 +173,7 @@ void ScrollArea::init(std::string skinName)
{
mShowButtons = (skin->getOption("showbuttons", 1) == 1);
mMarkerSize = skin->getOption("markersize", 0);
+ mScrollbarSize = skin->getOption("scrollbarsize", 12);
}
}
else
@@ -182,6 +184,7 @@ void ScrollArea::init(std::string skinName)
Theme::instance()->unload(skin);
}
}
+ mScrollbarWidth = mScrollbarSize;
instances++;
}
diff --git a/src/gui/widgets/scrollarea.h b/src/gui/widgets/scrollarea.h
index 3c391e4ae..6772e9e0c 100644
--- a/src/gui/widgets/scrollarea.h
+++ b/src/gui/widgets/scrollarea.h
@@ -175,6 +175,7 @@ class ScrollArea final : public gcn::ScrollArea,
static float mAlpha;
static bool mShowButtons;
static int mMarkerSize;
+ static int mScrollbarSize;
static ImageRect background;
static ImageRect vMarker;
static ImageRect vMarkerHi;