summaryrefslogtreecommitdiffstats
path: root/gui/slider.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2015-03-11 17:17:15 +0100
committerEthan Yonker <dees_troy@teamw.in>2015-03-13 00:41:34 +0100
commit591b9205365e6bc1cefece2e0a05f29b9cddee32 (patch)
tree23f9902b89fd368efe0fd5e661426c4bac6cb06c /gui/slider.cpp
parentHandle sdk version 22 as lollipop (diff)
downloadandroid_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.gz
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.bz2
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.lz
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.xz
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.tar.zst
android_bootable_recovery-591b9205365e6bc1cefece2e0a05f29b9cddee32.zip
Diffstat (limited to 'gui/slider.cpp')
-rw-r--r--gui/slider.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/gui/slider.cpp b/gui/slider.cpp
index 2fd114d88..a3884474b 100644
--- a/gui/slider.cpp
+++ b/gui/slider.cpp
@@ -68,6 +68,12 @@ GUISlider::GUISlider(xml_node<>* node) : GUIObject(node)
mRenderW = sSlider->GetWidth();
mRenderH = sSlider->GetHeight();
+ if (TextPlacement == CENTER || TextPlacement == CENTER_X_ONLY) {
+ mRenderX = mRenderX - (mRenderW / 2);
+ if (TextPlacement == CENTER) {
+ mRenderY = mRenderY - (mRenderH / 2);
+ }
+ }
if (sSliderLabel) {
int sTextX = mRenderX + (mRenderW / 2);
int w, h;