From dcf6050d3e90e8cefa6be7ad4178012c555c2b57 Mon Sep 17 00:00:00 2001 From: Dimitar Tsenev Date: Sun, 21 Jan 2024 16:22:21 +0200 Subject: [PATCH 1/2] [Fixed] rounded progressbars rendering --- lib/gui/eslider.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/gui/eslider.cpp b/lib/gui/eslider.cpp index d7e21312b7..7f74ad04e9 100644 --- a/lib/gui/eslider.cpp +++ b/lib/gui/eslider.cpp @@ -124,11 +124,9 @@ int eSlider::event(int event, void *data, void *data2) painter.setRadius(cornerRadius, getCornerRadiusEdges()); eRect rect = eRect(m_currently_filled.extends); if (m_orientation == orHorizontal) - rect.setHeight(size().height()-m_border_width); + rect.setHeight(size().height()-m_border_width*2); else - rect.setWidth(size().width()-m_border_width); - rect.setX(m_border_width); - rect.setY(m_border_width); + rect.setWidth(size().width()-m_border_width*2); painter.drawRectangle(rect); } else { @@ -183,14 +181,24 @@ int eSlider::event(int event, void *data, void *data2) num_pix = 0; if (m_orientation == orHorizontal) - m_currently_filled = eRect(start_pix, 0, num_pix, pixsize); + m_currently_filled = eRect(start_pix + m_border_width, m_border_width, num_pix, pixsize); else - m_currently_filled = eRect(0, start_pix, pixsize, num_pix); + m_currently_filled = eRect(m_border_width, start_pix + m_border_width, pixsize, num_pix); + const int cornerRadius = getCornerRadius(); + + if (cornerRadius) + { + invalidate(old_currently_filled); + invalidate(m_currently_filled); + } + else + { // redraw what *was* filled before and now isn't. - invalidate(m_currently_filled - old_currently_filled); + invalidate(m_currently_filled - old_currently_filled); // redraw what wasn't filled before and is now. - invalidate(old_currently_filled - m_currently_filled); + invalidate(old_currently_filled - m_currently_filled); + } return 0; } From c6f6cfef5526955ea0dabf8545814edada35f705 Mon Sep 17 00:00:00 2001 From: Huevos Date: Sun, 21 Jan 2024 16:16:06 +0100 Subject: [PATCH 2/2] [Directories] add comment --- lib/python/Tools/Directories.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/python/Tools/Directories.py b/lib/python/Tools/Directories.py index 6eb56becee..e667c81815 100644 --- a/lib/python/Tools/Directories.py +++ b/lib/python/Tools/Directories.py @@ -48,6 +48,12 @@ PATH_CREATE = 0 PATH_DONTCREATE = 1 +# +# ${libdir} = /usr/lib +# ${sysconfdir} = /etc/enigma2 +# ${datadir} = /usr/share +# + defaultPaths = { SCOPE_HOME: ("", PATH_DONTCREATE), # User home directory SCOPE_LANGUAGE: (eEnv.resolve("${datadir}/enigma2/po/"), PATH_DONTCREATE),