From ad5eb1e2a29e1ff5ae344591a7447dcc540ba1eb Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 25 Jan 2015 20:01:35 +0100 Subject: [PATCH] CVolumeBar: optimize icon position Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/6a50e563219ba33ade341f43d00a0e7b6a7a2881 Author: Thilo Graf Date: 2015-01-25 (Sun, 25 Jan 2015) --- src/gui/volumebar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 8a9fd60ca..66e6a5804 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -89,14 +89,14 @@ void CVolumeBar::initVolumeBarSize() vb_pbw = 200; vb_pbh = height-4*vb_item_offset; - //adapt x-pos - vb_icon_x = vb_item_offset; - vb_pbx = vb_icon_x + vb_icon_w + vb_item_offset; - vb_digit_x = vb_pbx + vb_pbw + vb_item_offset; - //result for width width = (vb_icon_w + vb_pbw + vb_digit_w) + 4*vb_item_offset; + //adapt x-pos + vb_pbx = vb_item_offset + vb_icon_w + vb_item_offset; + vb_icon_x = vb_pbx/2 - vb_icon_w/2 + vb_item_offset; + vb_digit_x = vb_pbx + vb_pbw + vb_item_offset; + // mute icon cvh->getMuteIconDimensions(&mute_ax, &mute_ay, &mute_dx, &mute_dy); // info clock