Skip to content

Commit 9c5e6ec

Browse files
authored
Use flat class, fix rtl (#14)
1 parent ede63eb commit 9c5e6ec

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

data/Application.css

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,48 @@ grid.titlebar {
3131
.results {
3232
background-color: @colorBackground;
3333
color: @colorForeground;
34+
box-shadow:
35+
inset 1px 0 0 0 shade (@colorBackground, 1.07),
36+
inset -1px 0 0 0 shade (@colorBackground, 1.07),
37+
inset 0 -1px 0 0 shade (@colorBackground, 1.1);
38+
}
39+
40+
.results:dir(ltr) {
3441
border-bottom-right-radius: 3px;
3542
border-left: solid 1px shade (@colorBackground, 0.8);
36-
box-shadow: inset 1px 0 0 0 shade (@colorBackground, 1.07);
3743
}
3844

39-
.input-header,
45+
.results:dir(rtl) {
46+
border-bottom-left-radius: 3px;
47+
border-right: solid 1px shade (@colorBackground, 0.8);
48+
}
49+
4050
.titlebar {
41-
background-color: @bg_color;
42-
background-image: none;
4351
border: none;
4452
}
4553

54+
.input-header:dir(ltr) {
55+
border-top-right-radius: 0;
56+
}
57+
58+
.input-header:dir(rtl) {
59+
border-top-left-radius: 0;
60+
}
61+
4662
.output-header {
4763
background-color: @colorBackground;
48-
background-image: none;
49-
border-bottom: none;
64+
box-shadow:
65+
inset 1px 0 0 0 shade (@colorBackground, 1.07),
66+
inset -1px 0 0 0 shade (@colorBackground, 1.07),
67+
inset 0 1px 0 0 shade (@colorBackground, 1.2);
68+
}
69+
70+
.output-header:dir(ltr) {
5071
border-left: solid 1px shade (@colorBackground, 0.8);
5172
border-top-left-radius: 0;
52-
box-shadow: inset 1px 0 0 0 shade (@colorBackground, 1.07);
73+
}
74+
75+
.output-header:dir(rtl) {
76+
border-right: solid 1px shade (@colorBackground, 0.8);
77+
border-top-right-radius: 0;
5378
}

src/MainWindow.vala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public class MainWindow : Gtk.Window {
109109
input_header_context.add_class ("input-header");
110110
input_header_context.add_class ("titlebar");
111111
input_header_context.add_class ("default-decoration");
112+
input_header_context.add_class (Gtk.STYLE_CLASS_FLAT);
112113

113114
var output_header = new Gtk.HeaderBar ();
114115
output_header.hexpand = true;
@@ -117,6 +118,7 @@ public class MainWindow : Gtk.Window {
117118
output_header_context.add_class ("output-header");
118119
output_header_context.add_class ("titlebar");
119120
output_header_context.add_class ("default-decoration");
121+
output_header_context.add_class (Gtk.STYLE_CLASS_FLAT);
120122

121123
var header_grid = new Gtk.Grid ();
122124
header_grid.add (input_header);

0 commit comments

Comments
 (0)