Skip to content

Commit c37cd52

Browse files
committed
- adding color15 to themes
- color15 can be calculated from Stations background color - adding toggling calculated colors - updating themes and docs
1 parent 7c2ce58 commit c37cd52

15 files changed

+396
-185
lines changed

README.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,8 +1311,11 @@ <h2 id="pyradio-themes">PyRadio Themes <span style="padding-left: 10px;"><sup st
13111311
# (background color will come from Stations)
13121312
PyRadio URL #a3b367
13131313

1314-
# Message window borser foreground
1315-
# (background color will come from Stations)
1314+
# Message window border foreground and background.
1315+
# The background color can be left unset.
1316+
# Please refer to the following link for more info
1317+
# https://github.com/coderholic/pyradio#calculated_colors
1318+
#
13161319
Messages Border #a3b367
13171320

13181321
# Theme Transparency

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,8 +791,11 @@ Extra Func #69a9a7
791791
# (background color will come from Stations)
792792
PyRadio URL #a3b367
793793
794-
# Message window borser foreground
795-
# (background color will come from Stations)
794+
# Message window border foreground and background.
795+
# The background color can be left unset.
796+
# Please refer to the following link for more info
797+
# https://github.com/coderholic/pyradio#calculated_colors
798+
#
796799
Messages Border #a3b367
797800
798801
# Theme Transparency

pyradio/browser.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3778,7 +3778,7 @@ def show(self, parent=None):
37783778
self._win.box()
37793779
try:
37803780
self._win.addstr( 1, 1, msg,
3781-
curses.color_pair(5))
3781+
curses.color_pair(10))
37823782
except:
37833783
pass
37843784
self._win.refresh()
@@ -3794,18 +3794,18 @@ def show(self, parent=None):
37943794
self._win.box()
37953795
self._win.addstr(0, 1,
37963796
self.TITLE,
3797-
curses.color_pair(4))
3797+
curses.color_pair(11))
37983798
self._refresh()
37993799

38003800
def _refresh(self):
38013801
for i, n in enumerate(self.items.keys()):
3802-
col = 5
3802+
col = 10
38033803
if i == self.active == self.selection:
38043804
col = 9
38053805
elif i == self.selection:
38063806
col = 6
38073807
elif i == self.active:
3808-
col = 4
3808+
col = 11
38093809

38103810
self._win.addstr(i + 1, 1,
38113811
' {}'.format(n.ljust(self.maxX - 3)),
@@ -3945,7 +3945,7 @@ def show(self, parent=None):
39453945
self._win.box()
39463946
try:
39473947
self._win.addstr( 1, 1, msg,
3948-
curses.color_pair(5))
3948+
curses.color_pair(10))
39493949
except:
39503950
pass
39513951
self._win.refresh()
@@ -3973,7 +3973,7 @@ def _box_and_title(self):
39733973
self._win.addstr(
39743974
0, int((self.maxX - len(self.TITLE)) / 2),
39753975
self.TITLE,
3976-
curses.color_pair(4)
3976+
curses.color_pair(11)
39773977
)
39783978
self._win.refresh()
39793979

@@ -4099,13 +4099,13 @@ def show(self, parent=None):
40994099
Y + 1, X + 1
41004100
)
41014101
for i, n in enumerate(self.items):
4102-
col = 5
4102+
col = 10
41034103
if i == self.active == self.selection:
41044104
col = 9
41054105
elif i == self.selection:
41064106
col = 6
41074107
elif i == self.active:
4108-
col = 4
4108+
col = 11
41094109
try:
41104110
self._win.addstr(i, 0 , n, curses.color_pair(col))
41114111
except:

pyradio/config.py

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,9 @@ class PyRadioConfig(PyRadioStations):
11971197
'white_on_black', 'wob'
11981198
)
11991199

1200+
use_calculated_colors = False
1201+
has_border_background = False
1202+
12001203
def __init__(self):
12011204
self.backup_player_params = None
12021205
self._profile_name = 'pyradio'
@@ -2819,8 +2822,11 @@ def download(self, a_theme=None, a_path=None, print_errors=None):
28192822
# (background color will come from Stations)
28202823
PyRadio URL {color2}
28212824
2822-
# Message window borser foreground
2823-
# (background color will come from Stations)
2825+
# Message window border foreground and background.
2826+
# The background color can be left unset.
2827+
# Please refer to the following link for more info
2828+
# https://github.com/coderholic/pyradio#calculated_colors
2829+
#
28242830
Messages Border {color4}
28252831
28262832
# Theme Transparency
@@ -2859,8 +2865,11 @@ def download(self, a_theme=None, a_path=None, print_errors=None):
28592865
# (background color will come from Stations)
28602866
PyRadio URL {color4}
28612867
2862-
# Message window borser foreground
2863-
# (background color will come from Stations)
2868+
# Message window border foreground and background.
2869+
# The background color can be left unset.
2870+
# Please refer to the following link for more info
2871+
# https://github.com/coderholic/pyradio#calculated_colors
2872+
#
28642873
Messages Border {color2}
28652874
28662875
# Theme Transparency
@@ -3002,8 +3011,11 @@ def download(self, a_theme=None, a_path=None, print_errors=None):
30023011
# (background color will come from Stations)
30033012
PyRadio URL {color2}
30043013
3005-
# Message window borser foreground
3006-
# (background color will come from Stations)
3014+
# Message window border foreground and background.
3015+
# The background color can be left unset.
3016+
# Please refer to the following link for more info
3017+
# https://github.com/coderholic/pyradio#calculated_colors
3018+
#
30073019
Messages Border {color8}
30083020
30093021
# Theme Transparency
@@ -3042,8 +3054,11 @@ def download(self, a_theme=None, a_path=None, print_errors=None):
30423054
# (background color will come from Stations)
30433055
PyRadio URL {color2}
30443056
3045-
# Message window borser foreground
3046-
# (background color will come from Stations)
3057+
# Message window border foreground and background.
3058+
# The background color can be left unset.
3059+
# Please refer to the following link for more info
3060+
# https://github.com/coderholic/pyradio#calculated_colors
3061+
#
30473062
Messages Border {color8}
30483063
30493064
# Theme Transparency
@@ -3082,8 +3097,11 @@ def download(self, a_theme=None, a_path=None, print_errors=None):
30823097
# (background color will come from Stations)
30833098
PyRadio URL {foreground}
30843099
3085-
# Message window borser foreground
3086-
# (background color will come from Stations)
3100+
# Message window border foreground and background.
3101+
# The background color can be left unset.
3102+
# Please refer to the following link for more info
3103+
# https://github.com/coderholic/pyradio#calculated_colors
3104+
#
30873105
Messages Border {color8}
30883106
30893107
# Theme Transparency
@@ -3122,8 +3140,11 @@ def download(self, a_theme=None, a_path=None, print_errors=None):
31223140
# (background color will come from Stations)
31233141
PyRadio URL {foreground}
31243142
3125-
# Message window borser foreground
3126-
# (background color will come from Stations)
3143+
# Message window border foreground and background.
3144+
# The background color can be left unset.
3145+
# Please refer to the following link for more info
3146+
# https://github.com/coderholic/pyradio#calculated_colors
3147+
#
31273148
Messages Border {color8}
31283149
31293150
# Theme Transparency

0 commit comments

Comments
 (0)