Skip to content

Commit

Permalink
Use flat class, fix rtl (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Oct 19, 2017
1 parent ede63eb commit 9c5e6ec
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
39 changes: 32 additions & 7 deletions data/Application.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,48 @@ grid.titlebar {
.results {
background-color: @colorBackground;
color: @colorForeground;
box-shadow:
inset 1px 0 0 0 shade (@colorBackground, 1.07),
inset -1px 0 0 0 shade (@colorBackground, 1.07),
inset 0 -1px 0 0 shade (@colorBackground, 1.1);
}

.results:dir(ltr) {
border-bottom-right-radius: 3px;
border-left: solid 1px shade (@colorBackground, 0.8);
box-shadow: inset 1px 0 0 0 shade (@colorBackground, 1.07);
}

.input-header,
.results:dir(rtl) {
border-bottom-left-radius: 3px;
border-right: solid 1px shade (@colorBackground, 0.8);
}

.titlebar {
background-color: @bg_color;
background-image: none;
border: none;
}

.input-header:dir(ltr) {
border-top-right-radius: 0;
}

.input-header:dir(rtl) {
border-top-left-radius: 0;
}

.output-header {
background-color: @colorBackground;
background-image: none;
border-bottom: none;
box-shadow:
inset 1px 0 0 0 shade (@colorBackground, 1.07),
inset -1px 0 0 0 shade (@colorBackground, 1.07),
inset 0 1px 0 0 shade (@colorBackground, 1.2);
}

.output-header:dir(ltr) {
border-left: solid 1px shade (@colorBackground, 0.8);
border-top-left-radius: 0;
box-shadow: inset 1px 0 0 0 shade (@colorBackground, 1.07);
}

.output-header:dir(rtl) {
border-right: solid 1px shade (@colorBackground, 0.8);
border-top-right-radius: 0;
}
2 changes: 2 additions & 0 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ public class MainWindow : Gtk.Window {
input_header_context.add_class ("input-header");
input_header_context.add_class ("titlebar");
input_header_context.add_class ("default-decoration");
input_header_context.add_class (Gtk.STYLE_CLASS_FLAT);

var output_header = new Gtk.HeaderBar ();
output_header.hexpand = true;
Expand All @@ -117,6 +118,7 @@ public class MainWindow : Gtk.Window {
output_header_context.add_class ("output-header");
output_header_context.add_class ("titlebar");
output_header_context.add_class ("default-decoration");
output_header_context.add_class (Gtk.STYLE_CLASS_FLAT);

var header_grid = new Gtk.Grid ();
header_grid.add (input_header);
Expand Down

0 comments on commit 9c5e6ec

Please sign in to comment.