mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
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:
@@ -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();
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user