Skip to content

Commit 2da1f4c

Browse files
committed
Color tweaks
1 parent 3033af6 commit 2da1f4c

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/textual/widgets/_selection_list.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class SelectionList(Generic[SelectionType], OptionList):
105105
106106
& > .selection-list--button-highlighted {
107107
text-style: bold;
108-
color: $highlight-cursor-blurred;
108+
color: $surface;
109109
background: $foreground 15%;
110110
}
111111
@@ -144,7 +144,6 @@ class SelectionList(Generic[SelectionType], OptionList):
144144
145145
& > .selection-list--button-highlighted {
146146
text-style: bold;
147-
color: $highlight-cursor;
148147
background: $foreground 25%;
149148
}
150149
@@ -583,6 +582,13 @@ def render_line(self, y: int) -> Strip:
583582
# Get the style for the button.
584583
button_style = self.get_component_rich_style(component_style)
585584

585+
# If the button is in the unselected state, we're going to do a bit
586+
# of a switcharound to make it look like it's a "cutout".
587+
# if selection.value not in self._selected:
588+
# button_style += Style.from_color(
589+
# self.background_colors[1].rich_color, button_style.bgcolor
590+
# )
591+
586592
# Build the style for the side characters. Note that this is
587593
# sensitive to the type of character used, so pay attention to
588594
# BUTTON_LEFT and BUTTON_RIGHT.

src/textual/widgets/_switch.py

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class Switch(Widget, can_focus=True):
5959
color: $surface-lighten-2;
6060
}
6161
&:hover {
62-
border: tall $background;
6362
& > .switch--slider {
6463
color: $surface-lighten-3;
6564
}

src/textual/widgets/_toggle_button.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ToggleButton(Static, can_focus=True):
5555
DEFAULT_CSS = """
5656
ToggleButton {
5757
width: auto;
58-
border: tall transparent;
58+
border: tall $border-blurred;
5959
padding: 0 1;
6060
background: $surface;
6161
}

src/textual/widgets/_tree.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,13 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
588588
589589
}
590590
& > .tree--guides {
591-
text-style: bold;
592591
color: $surface-lighten-1;
593592
}
594593
& > .tree--guides-hover {
595594
color: $surface-lighten-1;
596595
}
597596
& > .tree--guides-selected {
598-
color: $surface-lighten-1;
597+
color: $primary;
599598
}
600599
& > .tree--cursor {
601600
background: $highlight-cursor-blurred;

0 commit comments

Comments
 (0)