From 0e3e32fd2c96bcc5279c43ad0a7496ad8dc0e7c1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 28 Jan 2017 23:06:47 +0100 Subject: [PATCH] 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. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3f0b81f0a70675f2a52a68dd06f96d790c2f65be Author: Thilo Graf Date: 2017-01-28 (Sat, 28 Jan 2017) ------------------ This commit was generated by Migit --- src/gui/volumebar.cpp | 8 ++++---- src/gui/volumebar.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 69d54b269..c18d3737e 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -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(); diff --git a/src/gui/volumebar.h b/src/gui/volumebar.h index 62ce4d90c..9989eded3 100644 --- a/src/gui/volumebar.h +++ b/src/gui/volumebar.h @@ -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