Skip to content

Commit a4e3693

Browse files
committed
Adding themes "Edit Cursor" field
1 parent 316561b commit a4e3693

File tree

7 files changed

+22
-5
lines changed

7 files changed

+22
-5
lines changed

pyradio/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ def BACKGROUND(): return 1
2020
('Stations', 5, 0 ,0),
2121
('Active Station', 4, 0, 3),
2222
('Normal Cursor', 6, 0, 0),
23-
('Active Cursor', 9, 0, 0) )
23+
('Active Cursor', 9, 0, 0),
24+
('Edit Cursor', 8, 0, 0 ) )

pyradio/edit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def _add_editors(self):
240240
box_color = curses.color_pair(9),
241241
caption_color = curses.color_pair(4),
242242
edit_color = curses.color_pair(9),
243-
cursor_color = curses.color_pair(6),
243+
cursor_color = curses.color_pair(8),
244244
unfocused_color = curses.color_pair(5))
245245
self._line_editor[ed].bracket = False
246246

pyradio/radio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def _give_me_a_search_class(self, operation_mode):
609609
box_color = curses.color_pair(5),
610610
caption_color = curses.color_pair(4),
611611
edit_color = curses.color_pair(5),
612-
cursor_color = curses.color_pair(6))
612+
cursor_color = curses.color_pair(8))
613613
self.search = self._search_classes[self._mode_to_search[operation_mode]]
614614
if self.ws.previous_operation_mode == self.ws.CONFIG_MODE:
615615
self.search.box_color = curses.color_pair(3)

pyradio/themes.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ def _do_init_pairs(self):
5252
curses.init_pair(6, self._active_colors[THEME_ITEMS[5][0]][FOREGROUND()], self._active_colors[THEME_ITEMS[5][0]][BACKGROUND()])
5353
# status bar
5454
curses.init_pair(7, self._active_colors[THEME_ITEMS[2][0]][FOREGROUND()], self._active_colors[THEME_ITEMS[2][0]][BACKGROUND()])
55-
# search cursor
56-
curses.init_pair(8, self._active_colors[THEME_ITEMS[5][0]][BACKGROUND()], self._active_colors[THEME_ITEMS[3][0]][BACKGROUND()])
55+
# edit cursor
56+
curses.init_pair(8, self._active_colors[THEME_ITEMS[7][0]][FOREGROUND()], self._active_colors[THEME_ITEMS[7][0]][BACKGROUND()])
5757
# cursor when playing
5858
curses.init_pair(9, self._active_colors[THEME_ITEMS[6][0]][FOREGROUND()], self._active_colors[THEME_ITEMS[6][0]][BACKGROUND()])
59+
logger.error('DE _do_init_pairs:\n{}'.format(self._active_colors))
5960

6061
def restoreActiveTheme(self):
6162
self._active_colors = deepcopy(self._read_colors)
@@ -136,6 +137,8 @@ def open_theme(self, a_theme = '', a_path=''):
136137
# help window
137138
self._colors[THEME_ITEMS[1][0]] = [ curses.COLOR_YELLOW, self._colors[THEME_ITEMS[3][0]][BACKGROUND()] ]
138139
# calculated value: self._colors['Messages'] = [ self._colors[THEME_ITEMS[4][0]][FOREGROUND()], self._colors[THEME_ITEMS[2][0]][FOREGROUND()] ]
140+
# Edit Cursor
141+
self._colors[THEME_ITEMS[7][0]] = [ curses.COLOR_WHITE, curses.COLOR_MAGENTA ]
139142
# info
140143
self._colors['Colors'] = 8
141144
self._colors['Name'] = 'dark'
@@ -155,6 +158,8 @@ def open_theme(self, a_theme = '', a_path=''):
155158
# help window
156159
self._colors[THEME_ITEMS[1][0]] = [ 11, self._colors[THEME_ITEMS[3][0]][BACKGROUND()] ]
157160
# calculated value: self._colors['Messages'] = [ self._colors[THEME_ITEMS[4][0]][FOREGROUND()], self._colors[THEME_ITEMS[2][0]][FOREGROUND()] ]
161+
# Edit Cursor
162+
self._colors[THEME_ITEMS[7][0]] = [ 15, curses.COLOR_MAGENTA ]
158163
# info
159164
self._colors['Colors'] = 16
160165
self._colors['Name'] = 'dark_16_colors'
@@ -174,6 +179,8 @@ def open_theme(self, a_theme = '', a_path=''):
174179
# help window
175180
self._colors[THEME_ITEMS[1][0]] = [ curses.COLOR_MAGENTA, self._colors[THEME_ITEMS[3][0]][BACKGROUND()] ]
176181
# calculated value: self._colors['Messages'] = [ self._colors[THEME_ITEMS[4][0]][FOREGROUND()], self._colors[THEME_ITEMS[2][0]][FOREGROUND()] ]
182+
# Edit Cursor
183+
self._colors[THEME_ITEMS[7][0]] = [ curses.COLOR_WHITE, curses.COLOR_MAGENTA ]
177184
# info
178185
self._colors['Colors'] = 8
179186
self._colors['Name'] = 'light'
@@ -193,6 +200,8 @@ def open_theme(self, a_theme = '', a_path=''):
193200
# help window
194201
self._colors[THEME_ITEMS[1][0]] = [ 13, self._colors[THEME_ITEMS[3][0]][BACKGROUND()] ]
195202
# calculated value: self._colors['Messages'] = [ self._colors[THEME_ITEMS[4][0]][FOREGROUND()], self._colors[THEME_ITEMS[2][0]][FOREGROUND()] ]
203+
# Edit Cursor
204+
self._colors[THEME_ITEMS[7][0]] = [ 15, 13 ]
196205
# info
197206
self._colors['Colors'] = 16
198207
self._colors['Name'] = 'light_16_colors'
@@ -212,6 +221,8 @@ def open_theme(self, a_theme = '', a_path=''):
212221
# help window
213222
self._colors[THEME_ITEMS[1][0]] = [ 245, self._colors[THEME_ITEMS[3][0]][BACKGROUND()] ]
214223
# calculated value: self._colors['Messages'] = [ self._colors[THEME_ITEMS[4][0]][FOREGROUND()], self._colors[THEME_ITEMS[2][0]][FOREGROUND()] ]
224+
# Edit Cursor
225+
self._colors[THEME_ITEMS[7][0]] = [ 15, 238 ]
215226
# info
216227
self._colors['Colors'] = 256
217228
self._colors['Name'] = 'black_on_white'
@@ -231,6 +242,8 @@ def open_theme(self, a_theme = '', a_path=''):
231242
# help window
232243
self._colors[THEME_ITEMS[1][0]] = [ 247, self._colors[THEME_ITEMS[3][0]][BACKGROUND()] ]
233244
# calculated value: self._colors['Messages'] = [ self._colors[THEME_ITEMS[4][0]][FOREGROUND()], self._colors[THEME_ITEMS[2][0]][FOREGROUND()] ]
245+
# Edit Cursor
246+
self._colors[THEME_ITEMS[7][0]] = [ 15, 247 ]
234247
# info
235248
self._colors['Colors'] = 256
236249
self._colors['Name'] = 'white_on_black'

pyradio/themes/brown_by_sng.pyradio-theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Stations = 120,94
55
Active Station = 184,94
66
Active Cursor = 94,184
77
Normal Cursor = 130,112
8+
Edit Cursor = 130,112

pyradio/themes/pink_by_sng.pyradio-theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Stations = 127,219
55
Active Station = 199,219
66
Active Cursor = 231,201
77
Normal Cursor = 123,213
8+
Edit Cursor = 123,213

pyradio/themes/purple_by_sng.pyradio-theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ Stations = 195,134
55
Active Station = 56,134
66
Active Cursor = 226,129
77
Normal Cursor = 123,171
8+
Edit Cursor = 123,171

0 commit comments

Comments
 (0)