Skip to content

Commit 9dc4f0c

Browse files
ofeknissanCube707
andauthored
Add support for a Red theme to the currently provided built-in themes… (#687)
* Add support for a Red theme to the currently provided built-in themes. Complete the RGB. * Update src/inquirer/themes.py looks good Co-authored-by: Jan Wille <mail@janwille.de> * Apply review suggestions --------- Co-authored-by: Jan Wille <mail@janwille.de>
1 parent 00114c7 commit 9dc4f0c

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
14.9 KB
Loading

src/inquirer/themes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,20 @@ def __init__(self):
100100
self.List.unselected_color = term.normal
101101

102102

103+
class RedSolace(Default):
104+
def __init__(self):
105+
super().__init__()
106+
self.Question.brackets_color = term.red2
107+
self.Question.default_color = term.firebrick1
108+
self.Checkbox.selection_icon = "➠"
109+
self.Checkbox.selection_color = term.bold_black_on_bright_red
110+
self.Checkbox.selected_icon = "🔥"
111+
self.Checkbox.selected_color = term.webmaroon
112+
self.Checkbox.unselected_icon = "❑"
113+
self.List.selection_color = term.bold_black_on_bright_red
114+
self.List.selection_cursor = "➠"
115+
116+
103117
class GreenPassion(Default):
104118
def __init__(self):
105119
super().__init__()

tests/unit/test_themes.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,25 @@ def test_themes_blue_composure():
8484
assert hasattr(t.List, "selection_color")
8585
assert hasattr(t.List, "selection_cursor")
8686
assert hasattr(t.List, "unselected_color")
87+
88+
89+
def test_themes_red_composure():
90+
t = themes.RedSolace()
91+
92+
assert hasattr(t, "Question")
93+
assert hasattr(t.Question, "mark_color")
94+
assert hasattr(t.Question, "brackets_color")
95+
assert hasattr(t.Question, "default_color")
96+
assert hasattr(t, "Editor")
97+
assert hasattr(t.Editor, "opening_prompt")
98+
assert hasattr(t, "Checkbox")
99+
assert hasattr(t.Checkbox, "selection_color")
100+
assert hasattr(t.Checkbox, "selection_icon")
101+
assert hasattr(t.Checkbox, "selected_icon")
102+
assert hasattr(t.Checkbox, "selected_color")
103+
assert hasattr(t.Checkbox, "unselected_icon")
104+
assert hasattr(t.Checkbox, "unselected_color")
105+
assert hasattr(t, "List")
106+
assert hasattr(t.List, "selection_color")
107+
assert hasattr(t.List, "selection_cursor")
108+
assert hasattr(t.List, "unselected_color")

0 commit comments

Comments
 (0)