Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
Changed some styles, fixed style not being loaded in normal Arc
Browse files Browse the repository at this point in the history
  • Loading branch information
cybre committed Aug 11, 2016
1 parent a28c752 commit 17d89e6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions budgie-screenshot-applet/HistoryView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace ScreenshotApplet
clear_all_button.clicked.connect(clear_all);
clear_all_button.can_focus = false;
clear_all_button.relief = Gtk.ReliefStyle.NONE;
clear_all_button.get_style_context().add_class("bottom-button");

Gtk.Separator clear_all_separator = new Gtk.Separator(Gtk.Orientation.HORIZONTAL);

Expand Down
8 changes: 6 additions & 2 deletions budgie-screenshot-applet/NewScreenshotView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ namespace ScreenshotApplet
label_widget = button_box;

get_child().can_focus = false;

get_child().get_style_context().add_class("mode-button");
}
}

Expand Down Expand Up @@ -103,14 +105,15 @@ namespace ScreenshotApplet
screenshot_window_button.clicked.connect(take_window_screenshot);
screenshot_area_button.clicked.connect(take_area_screenshot);

Gtk.Grid mode_selection = new Gtk.Grid();
mode_selection.attach(new Gtk.Separator(Gtk.Orientation.HORIZONTAL), 0, 0, 1, 1);
Gtk.Box mode_selection_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
mode_selection_box.add(screenshot_screen_button);
mode_selection_box.add(new Gtk.Separator(Gtk.Orientation.VERTICAL));
mode_selection_box.add(screenshot_window_button);
mode_selection_box.add(new Gtk.Separator(Gtk.Orientation.VERTICAL));
mode_selection_box.add(screenshot_area_button);

Gtk.Grid mode_selection = new Gtk.Grid();
mode_selection.attach(new Gtk.Separator(Gtk.Orientation.HORIZONTAL), 0, 0, 1, 1);
mode_selection.attach(mode_selection_box, 0, 1, 1, 1);
mode_selection.attach(new Gtk.Separator(Gtk.Orientation.HORIZONTAL), 0, 2, 1, 1);

Expand All @@ -120,6 +123,7 @@ namespace ScreenshotApplet
history_button.no_show_all = true;
history_button.visible = false;
history_button.get_child().margin = 5;
history_button.get_style_context().add_class("bottom-button");

history_button.clicked.connect(() => { stack.visible_child_name = "history_view"; });

Expand Down
17 changes: 16 additions & 1 deletion budgie-screenshot-applet/ScreenshotApplet.vala
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@ namespace ScreenshotApplet {
.action-button {
padding: 0;
}
.mode-button {
border-radius: 0;
border: 0;
}
.mode-button:hover {
-gtk-icon-effect: none;
}
.bottom-button {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-top: 0;
}
""";

public ScreenshotApplet(string uuid)
Expand All @@ -70,7 +85,7 @@ namespace ScreenshotApplet {
Gtk.Settings gtk_settings = Gtk.Settings.get_for_screen(screen);
string gtk_theme_name = gtk_settings.gtk_theme_name.down();

if (gtk_theme_name.has_prefix("arc-")) {
if (gtk_theme_name.has_prefix("arc")) {
Gtk.CssProvider provider = new Gtk.CssProvider();
try {
provider.load_from_data(ARC_STYLE_CSS, ARC_STYLE_CSS.length);
Expand Down
1 change: 1 addition & 0 deletions budgie-screenshot-applet/SettingsView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ namespace ScreenshotApplet
reset_button.relief = Gtk.ReliefStyle.NONE;
reset_button.can_focus = false;
reset_button.get_child().margin = 5;
reset_button.get_style_context().add_class("bottom-button");

reset_button.clicked.connect(() => {
settings.reset("enable-label");
Expand Down

0 comments on commit 17d89e6

Please sign in to comment.