Skip to content

Commit de719a9

Browse files
committed
Improve terminal default theme and fix shortcut for installaton driver
1 parent 3482b71 commit de719a9

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed

sqlit/domains/connections/ui/driver_status.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def build_driver_status_display(
5151
detail_hint = escape(detail) if detail else "Import failed."
5252
message = (
5353
f"[yellow]⚠ Driver failed to load:[/] {error.package_name}\n"
54-
f"[dim]{detail_hint} Press ^i for details.[/]"
54+
f"[dim]{detail_hint} Press ^d for details.[/]"
5555
)
56-
subtitle = "[bold]Help ^i[/] Cancel <esc>"
56+
subtitle = "[bold]Help ^d[/] Cancel <esc>"
5757
return DriverStatusDisplay(message=message, subtitle=subtitle)
5858

5959
strategy = strategy_resolver.detect(
@@ -66,15 +66,15 @@ def build_driver_status_display(
6666
f"[yellow]⚠ Missing driver:[/] {error.package_name}\n"
6767
f"[dim]Install with:[/] {escape(install_cmd)}"
6868
)
69-
subtitle = "[bold]Install ^i[/] Cancel <esc>"
69+
subtitle = "[bold]Install ^d[/] Cancel <esc>"
7070
return DriverStatusDisplay(message=message, subtitle=subtitle)
7171

7272
reason = strategy.reason_unavailable or "Auto-install not available"
7373
message = (
7474
f"[yellow]⚠ Missing driver:[/] {error.package_name}\n"
75-
f"[dim]{escape(reason)} Press ^i for install instructions.[/]"
75+
f"[dim]{escape(reason)} Press ^d for install instructions.[/]"
7676
)
77-
subtitle = "[bold]Help ^i[/] Cancel <esc>"
77+
subtitle = "[bold]Help ^d[/] Cancel <esc>"
7878
return DriverStatusDisplay(message=message, subtitle=subtitle)
7979

8080
if post_install_message:

sqlit/domains/connections/ui/screens/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ConnectionScreen(ModalScreen):
5252
Binding("escape", "cancel", "Cancel", priority=True),
5353
Binding("ctrl+s", "save", "Save", priority=True),
5454
Binding("ctrl+t", "test_connection", "Test", priority=True),
55-
Binding("ctrl+i", "install_driver", "Install driver", show=False, priority=True),
55+
Binding("ctrl+d", "install_driver", "Install driver", show=False, priority=True),
5656
Binding("tab", "next_field", "Next field", priority=True),
5757
Binding("shift+tab", "prev_field", "Previous field", priority=True),
5858
Binding("down", "focus_tab_content", "Focus content", show=False),

sqlit/domains/connections/ui/screens/connection_styles.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@
109109
text-style: strike;
110110
}
111111
112+
Tab.-active:ansi {
113+
color: ansi_bright_blue;
114+
}
115+
112116
Tab.has-error {
113117
color: $error;
114118
}

sqlit/domains/shell/app/main.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
}
44

55
TextArea {
6+
background: $surface-darken-1;
67
& > .text-area--cursor-line {
78
background: transparent;
89
}
@@ -11,6 +12,15 @@
1112
}
1213
}
1314

15+
Input {
16+
background: $surface-darken-1;
17+
}
18+
19+
Input:focus,
20+
TextArea:focus {
21+
background: $surface;
22+
}
23+
1424
DataTable.flash-cell:focus > .datatable--cursor,
1525
DataTable.flash-row:focus > .datatable--cursor,
1626
DataTable.flash-all:focus > .datatable--cursor {

sqlit/domains/shell/app/themes.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@
186186
# Terminal Default - uses ANSI colors from terminal
187187
Theme(
188188
name="textual-ansi",
189-
primary="#FFFFFF",
189+
primary="ansi_bright_blue",
190190
secondary="ansi_blue",
191-
accent="ansi_blue",
191+
accent="ansi_bright_blue",
192192
warning="ansi_yellow",
193193
error="ansi_red",
194194
success="ansi_green",
@@ -198,7 +198,20 @@
198198
panel="ansi_default",
199199
dark=True,
200200
variables={
201-
"border": "#555555",
201+
"border": "ansi_bright_black",
202+
"border-blurred": "ansi_black",
203+
"button-color-foreground": "ansi_black",
204+
"input-cursor-background": "ansi_bright_yellow",
205+
"input-cursor-foreground": "ansi_black",
206+
"input-selection-background": "ansi_bright_blue 70%",
207+
"input-selection-foreground": "ansi_black",
208+
"scrollbar": "ansi_bright_blue",
209+
"scrollbar-hover": "ansi_bright_cyan",
210+
"scrollbar-active": "ansi_bright_blue",
211+
"scrollbar-background": "ansi_black",
212+
"scrollbar-background-hover": "ansi_black",
213+
"scrollbar-background-active": "ansi_black",
214+
"scrollbar-corner-color": "ansi_black",
202215
},
203216
),
204217
# Built-in theme overrides (only adding border variable for contrast)

0 commit comments

Comments
 (0)