Skip to content

Commit

Permalink
fix uses of get_style_context
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Oct 14, 2023
1 parent ca6530e commit d42bc2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/DeviceRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ public class Sound.DeviceRow : Gtk.ListBoxRow {
var description_label = new Gtk.Label (device.description) {
xalign = 0
};

unowned var description_style_context = description_label.get_style_context ();
description_style_context.add_class (Granite.STYLE_CLASS_DIM_LABEL);
description_style_context.add_class (Granite.STYLE_CLASS_SMALL_LABEL);
description_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL);
description_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL);

var grid = new Gtk.Grid () {
margin_top = 6,
Expand Down
2 changes: 1 addition & 1 deletion src/InputPanel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class Sound.InputPanel : Gtk.Box {
};

level_bar = new Gtk.LevelBar.for_interval (0.0, 1.0);
level_bar.get_style_context ().add_class ("inverted");
level_bar.add_css_class ("inverted");

level_bar.add_offset_value ("low", 0.8);
level_bar.add_offset_value ("high", 0.95);
Expand Down
2 changes: 1 addition & 1 deletion src/TestPopover.vala
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public class Sound.TestPopover : Gtk.Popover {
}

construct {
get_style_context ().add_class (Granite.STYLE_CLASS_FLAT);
add_css_class (Granite.STYLE_CLASS_FLAT);

image = new Gtk.Image.from_icon_name (get_icon ()) {
pixel_size = 48
Expand Down

0 comments on commit d42bc2d

Please sign in to comment.