mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
volumebar: added rounded corners on, off
Origin commit data
------------------
Branch: ni/coolstream
Commit: 48d233adfb
Author: Frankenstone <dampf_acc@online.de>
Date: 2021-06-14 (Mon, 14 Jun 2021)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -51,7 +51,16 @@ CVolumeBar::CVolumeBar()
|
|||||||
void CVolumeBar::initVarVolumeBar()
|
void CVolumeBar::initVarVolumeBar()
|
||||||
{
|
{
|
||||||
col_body_std = COL_MENUCONTENT_PLUS_0;
|
col_body_std = COL_MENUCONTENT_PLUS_0;
|
||||||
corner_rad = CORNER_RADIUS_MID;
|
|
||||||
|
if (g_settings.theme.rounded_corners == 1)
|
||||||
|
{
|
||||||
|
corner_rad = CORNER_RADIUS_MID;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
corner_rad = CORNER_RADIUS_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
vb_item_offset = OFFSET_INNER_SMALL;
|
vb_item_offset = OFFSET_INNER_SMALL;
|
||||||
height = CFrameBuffer::getInstance()->scale2Res(g_settings.volume_size);
|
height = CFrameBuffer::getInstance()->scale2Res(g_settings.volume_size);
|
||||||
|
|
||||||
@@ -95,7 +104,14 @@ void CVolumeBar::initVolumeBarSize()
|
|||||||
vb_pbh = height-2*vb_item_offset;
|
vb_pbh = height-2*vb_item_offset;
|
||||||
|
|
||||||
//result for width
|
//result for width
|
||||||
width = (vb_icon_w + vb_pbw + vb_digit_w) + 4*vb_item_offset + corner_rad/2;
|
if (g_settings.theme.rounded_corners == 1)
|
||||||
|
{
|
||||||
|
width = (vb_icon_w + vb_pbw + vb_digit_w) + 4*vb_item_offset;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
width = (vb_icon_w + vb_pbw + vb_digit_w) + 4*vb_item_offset + corner_rad/2;
|
||||||
|
}
|
||||||
|
|
||||||
//adapt x-pos
|
//adapt x-pos
|
||||||
vb_pbx = vb_item_offset + vb_icon_w + vb_item_offset;
|
vb_pbx = vb_item_offset + vb_icon_w + vb_item_offset;
|
||||||
|
Reference in New Issue
Block a user