Skip to content

Commit

Permalink
add css styling to buttons, fixes ilgarmehmetali#16
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgarmehmetali committed Nov 2, 2017
1 parent 17ce478 commit 30c1f94
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/BudgiePixelSaverApplet.vala
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class Applet : Budgie.Applet
this.applet_container.pack_start (this.close_button, false, false, 0);
this.add (this.applet_container);

this.set_css_styles();

event_box.button_press_event.connect ((event) => {
if (event.type == Gdk.EventType.@2BUTTON_PRESS){
Expand Down Expand Up @@ -139,6 +140,19 @@ public class Applet : Budgie.Applet
this.title_bar_manager.unregister();
}

private void set_css_styles(){
this.applet_container.get_style_context().add_class("titlebar");

this.minimize_button.get_style_context().add_class("titlebutton");
this.minimize_button.get_style_context().add_class("minimize");

this.maximize_button.get_style_context().add_class("titlebutton");
this.maximize_button.get_style_context().add_class("maximize");

this.close_button.get_style_context().add_class("titlebutton");
this.close_button.get_style_context().add_class("close");
}

void on_settings_change(string key) {
if (key == "size") {
this.label.set_max_width_chars(settings.get_int(key));
Expand Down

0 comments on commit 30c1f94

Please sign in to comment.