Skip to content

Commit

Permalink
🔀 Merge pull request #34 from davep/focus-cosmetics
Browse files Browse the repository at this point in the history
Improve the cosmetics of the main panels in the application
  • Loading branch information
davep authored Jan 5, 2025
2 parents dde6c26 + 0ae4de6 commit 029eec7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
([#30](https://github.com/davep/braindrop/pull/30))
- Improved the way the age and the tags share the line in the raindrops view
widget. ([#31](https://github.com/davep/braindrop/pull/31))
- Improved the styling of the main panels.
([#34](https://github.com/davep/braindrop/pull/34))

## v0.1.1

Expand Down
7 changes: 7 additions & 0 deletions src/braindrop/app/screens/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,18 @@ class Main(Screen[None]):
padding-right: 0;
border: none;
border-left: round $border 50%;
background: $surface;
scrollbar-gutter: stable;
scrollbar-background: $surface;
scrollbar-background-hover: $surface;
scrollbar-background-active: $surface;
&:focus, &:focus-within {
border: none;
border-left: round $border;
background: $panel 80%;
scrollbar-background: $panel;
scrollbar-background-hover: $panel;
scrollbar-background-active: $panel;
}
}
Expand Down
8 changes: 8 additions & 0 deletions src/braindrop/app/widgets/extended_option_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ def __exit__(
class OptionListEx(OptionList):
"""The Textual `OptionList` with more features."""

DEFAULT_CSS = """
OptionListEx {
&:focus {
background-tint: initial;
}
}
"""

BINDINGS = [
Binding("j, right", "cursor_down", show=False),
Binding("k, left", "cursor_up", show=False),
Expand Down
3 changes: 1 addition & 2 deletions src/braindrop/app/widgets/raindrop_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ class RaindropDetails(VerticalScroll):
background: $surface;
&:focus, &:focus-within {
background-tint: $foreground 5%;
.detail, Tags, Tags:focus{
background: $boost 150%;
background: $boost 200%;
}
}
Expand Down

0 comments on commit 029eec7

Please sign in to comment.