Skip to content

Commit d27f934

Browse files
committed
Expand gtk.css template to cover Nautilus and pinentry password popup
Adds missing libadwaita @define-color variables (headerbar_border_color, shade_color, scrollbar_outline_color, thumbnail_*_color, card_shade_color) and explicit entry/selection/placeholder styling so pinentry-gnome3 password fields and Nautilus search are readable. Reconciles backdrop colors to @background for consistent focus transitions, makes insensitive_bg distinguishable from window_bg, and drops dead alertdialog selectors. Global border-radius: 0 preserved.
1 parent 69eae26 commit d27f934

1 file changed

Lines changed: 73 additions & 56 deletions

File tree

templates/gtk.css

Lines changed: 73 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Aether Theme with Sharp Corners (Hyprland-inspired)
3-
* GTK4/Adwaita Custom Styling
3+
* GTK4 / libadwaita + GTK3 legacy
44
*/
55

66
/* Dynamic color palette from Aether */
@@ -24,32 +24,41 @@
2424
@define-color bright_cyan {bright_cyan};
2525
@define-color bright_white {bright_white};
2626

27-
/* Adwaita Color Overrides */
27+
/* Adwaita color overrides (libadwaita / GTK4) */
2828
@define-color accent_bg_color @blue;
2929
@define-color accent_fg_color @background;
3030
@define-color accent_color @cyan;
3131

3232
@define-color window_bg_color @background;
3333
@define-color window_fg_color @foreground;
3434

35-
/* Sidebar background and content */
36-
@define-color view_bg_color @black;
35+
@define-color view_bg_color @background;
3736
@define-color view_fg_color @foreground;
38-
@define-color sidebar_bg_color @black;
37+
38+
@define-color sidebar_bg_color @background;
3939
@define-color sidebar_fg_color @foreground;
40-
@define-color sidebar_backdrop_color @black;
41-
@define-color sidebar_shade_color @black;
40+
@define-color sidebar_backdrop_color @background;
41+
@define-color sidebar_shade_color @background;
4242

4343
@define-color headerbar_bg_color @background;
4444
@define-color headerbar_fg_color @foreground;
45-
@define-color headerbar_backdrop_color @black;
46-
@define-color headerbar_shade_color @black;
47-
@define-color card_bg_color @background;
45+
@define-color headerbar_backdrop_color @background;
46+
@define-color headerbar_shade_color @background;
47+
@define-color headerbar_border_color alpha(@foreground, 0.15);
48+
49+
@define-color card_bg_color alpha(@foreground, 0.03);
4850
@define-color card_fg_color @foreground;
51+
@define-color card_shade_color @background;
52+
53+
@define-color thumbnail_bg_color @background;
54+
@define-color thumbnail_fg_color @foreground;
4955

50-
@define-color popover_bg_color @black;
56+
@define-color popover_bg_color @background;
5157
@define-color popover_fg_color @foreground;
5258

59+
@define-color dialog_bg_color @background;
60+
@define-color dialog_fg_color @foreground;
61+
5362
@define-color destructive_bg_color @red;
5463
@define-color destructive_fg_color @background;
5564

@@ -62,67 +71,92 @@
6271
@define-color error_bg_color @red;
6372
@define-color error_fg_color @background;
6473

65-
@define-color dialog_bg_color @background;
66-
@define-color dialog_fg_color @foreground;
67-
68-
@define-color borders alpha(@foreground, 0.1);
74+
@define-color shade_color alpha(@foreground, 0.07);
75+
@define-color scrollbar_outline_color alpha(@foreground, 0.15);
76+
@define-color borders alpha(@foreground, 0.15);
6977

70-
/* GTK3 Adwaita Legacy Color Variables */
78+
/* GTK3 / Adwaita legacy color variables */
7179
@define-color theme_fg_color @foreground;
7280
@define-color theme_text_color @foreground;
7381
@define-color theme_bg_color @background;
74-
@define-color theme_base_color @black;
82+
@define-color theme_base_color @background;
7583
@define-color theme_selected_bg_color @blue;
7684
@define-color theme_selected_fg_color @background;
77-
@define-color insensitive_bg_color @background;
85+
@define-color insensitive_bg_color alpha(@foreground, 0.05);
7886
@define-color insensitive_fg_color @bright_black;
79-
@define-color insensitive_base_color @black;
87+
@define-color insensitive_base_color @background;
8088
@define-color theme_unfocused_fg_color @foreground;
8189
@define-color theme_unfocused_text_color @foreground;
8290
@define-color theme_unfocused_bg_color @background;
83-
@define-color theme_unfocused_base_color @black;
91+
@define-color theme_unfocused_base_color @background;
8492
@define-color theme_unfocused_selected_bg_color @blue;
8593
@define-color theme_unfocused_selected_fg_color @background;
8694
@define-color unfocused_insensitive_color @bright_black;
87-
@define-color unfocused_borders alpha(@foreground, 0.1);
95+
@define-color unfocused_borders alpha(@foreground, 0.15);
8896
@define-color warning_color @yellow;
8997
@define-color error_color @red;
9098
@define-color success_color @green;
9199
@define-color destructive_color @red;
100+
@define-color placeholder_text_color alpha(@foreground, 0.5);
101+
@define-color link_color @blue;
102+
@define-color link_visited_color @magenta;
103+
104+
/* Content view colors */
105+
@define-color content_view_bg @background;
106+
@define-color text_view_bg @background;
107+
108+
/* Text-selection highlight (entries, labels, text views) */
109+
selection {
110+
background-color: @blue;
111+
color: @background;
112+
}
113+
114+
/* Entry styling — readable pinentry-gnome3 password field, Nautilus search, etc. */
115+
entry,
116+
entry > text {
117+
background-color: alpha(@foreground, 0.05);
118+
color: @foreground;
119+
}
120+
121+
entry:focus-within,
122+
entry:focus-within > text {
123+
background-color: alpha(@foreground, 0.08);
124+
}
92125

93-
/* Content View Colors */
94-
@define-color content_view_bg @black;
95-
@define-color text_view_bg @black;
126+
entry:disabled,
127+
entry:disabled > text {
128+
color: @bright_black;
129+
}
96130

97-
/* GtkMessageDialog styling */
98-
/* Target the entire dialog's background */
131+
entry > text > placeholder {
132+
color: alpha(@foreground, 0.5);
133+
}
134+
135+
/* GtkMessageDialog */
99136
messagedialog {
100137
background-color: @dialog_bg_color;
101138
}
102139

103-
/* Target the main message label inside the dialog */
104140
messagedialog label {
105141
color: @dialog_fg_color;
106142
font-size: 14pt;
107143
font-weight: bold;
108144
}
109145

110-
/* Target the secondary, more detailed text (if any) */
111146
messagedialog .secondary-text {
112147
font-size: 10pt;
113148
font-style: italic;
114149
}
115150

116-
/* Target the buttons in the dialog's action area */
117151
messagedialog button {
118-
background-color: @black;
152+
background-color: @background;
119153
color: @foreground;
120-
border: 1px solid @bright_black;
121-
padding: 10px;
154+
border: 1px solid @borders;
122155
}
123156

124157
messagedialog button:hover {
125158
background-color: @blue;
159+
color: @background;
126160
}
127161

128162
banner revealer widget {
@@ -131,45 +165,29 @@ banner revealer widget {
131165
color: @foreground;
132166
}
133167

134-
/* GtkAlertDialog styling */
135-
alertdialog.background {
136-
background-color: @dialog_bg_color;
137-
color: @dialog_fg_color;
138-
}
139-
140-
alertdialog .titlebar {
141-
background-color: @headerbar_bg_color;
142-
color: @headerbar_fg_color;
143-
}
144-
145-
alertdialog box {
146-
background-color: @dialog_bg_color;
147-
}
148-
149-
alertdialog label {
150-
color: @dialog_fg_color;
151-
}
152-
168+
/* Filechooser */
153169
filechooser .dialog-action-box {
154-
border-top: 1px solid @bright_black;
170+
border-top: 1px solid @borders;
155171
}
156172

157173
filechooser .dialog-action-box:backdrop {
158-
border-top-color: @black;
174+
border-top-color: @borders;
159175
}
160176

161177
filechooser #pathbarbox {
162-
border-bottom: 1px solid @bright_black;
178+
border-bottom: 1px solid @borders;
163179
}
164180

165181
filechooserbutton:drop(active) {
166182
box-shadow: none;
167183
border-color: transparent;
168184
}
169185

186+
/* Toast */
170187
toast {
171-
background-color: @black;
188+
background-color: @background;
172189
color: @foreground;
190+
border: 1px solid @borders;
173191
}
174192

175193
toast button.circular.flat.image-button:hover {
@@ -181,4 +199,3 @@ toast button.circular.flat.image-button:hover {
181199
* {
182200
border-radius: 0;
183201
}
184-

0 commit comments

Comments
 (0)