CVolumeBar: use CORNER_RADIUS_MID

cornerRad() is not really the best solution.
Inner items are fit with full height and should use the same value.
This commit is contained in:
2017-01-28 23:06:47 +01:00
committed by M. Liebmann
parent 4d2dd415c1
commit 3f0b81f0a7
2 changed files with 4 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ CVolumeBar::CVolumeBar()
void CVolumeBar::initVarVolumeBar()
{
col_body = COL_MENUCONTENT_PLUS_0;
corner_rad = CORNER_RADIUS_MID;
vb_item_offset = 4;
height = g_settings.volume_size; //default height
@@ -87,7 +87,7 @@ void CVolumeBar::initVolumeBarSize()
cvh->getDimensions(&x, &y, &sw, &sh, &vb_icon_w, &vb_digit_w);
cvh->getVolBarDimensions(&y, &height);
vb_digit_w += cornerRad()/2;
//vb_digit_w += corner_rad/2;
//scale
vb_pbw = 200;
@@ -180,7 +180,7 @@ void CVolumeBar::initVolumeBarIcon()
vb_icon = new CComponentsPicture(vb_icon_x, CC_CENTERED, vb_icon_w, height, NEUTRINO_ICON_VOLUME);
vb_icon->setColorBody(col_body);
vb_icon->setCorner(cornerRad(), CORNER_LEFT);
vb_icon->setCorner(corner_rad, CORNER_LEFT);
//add icon to container
addCCItem(vb_icon);
@@ -213,7 +213,7 @@ void CVolumeBar::initVolumeBarDigit()
vb_digit->setDimensionsAll(vb_digit_x, 0, vb_digit_w, height);
vb_digit->setTextColor(COL_MENUCONTENT_TEXT);
vb_digit->setCorner(cornerRad(), CORNER_RIGHT);
vb_digit->setCorner(corner_rad, CORNER_RIGHT);
vb_digit->doPaintTextBoxBg(true);
initVolumeBarDigitValue();

View File

@@ -72,9 +72,6 @@ class CVolumeBar : public CComponentsForm
void paintVolScale();
void paintVolumeBarDigit();
// inline int cornerRad() { return (g_settings.rounded_corners) ? height/2 : 0; }
inline int cornerRad() { return (g_settings.rounded_corners) ? CORNER_RADIUS_SMALL : 0; }
public:
enum