Skip to content

Commit

Permalink
Wallpaper: set actionbar padding in CSS (#404)
Browse files Browse the repository at this point in the history
* Wallpaper: set actionbar padding in CSS

* Remove sizegroup

---------

Co-authored-by: Ryan Kornheisl <ryan@skarva.tech>
  • Loading branch information
danirabbit and zeebok authored Jun 11, 2024
1 parent c0c2b35 commit 93f5332
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
6 changes: 6 additions & 0 deletions data/plug.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
-gtk-icon-transform: scale(0.6);
}

settingspage.wallpaper actionbar box.end,
settingspage.wallpaper actionbar box.start {
border-spacing: 12px;
padding: 6px;
}

.appearance-view desktop-preview {
min-height: 96px;
margin: 6px 6px 12px 12px;
Expand Down
18 changes: 2 additions & 16 deletions src/Views/Wallpaper.vala
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,9 @@ public class PantheonShell.Wallpaper : Switchboard.SettingsPage {
child = wallpaper_scrolled_window
};

var add_wallpaper_button = new Gtk.Button.with_label (_("Import Photo…")) {
margin_top = 12,
margin_end = 12,
margin_bottom = 12,
margin_start = 12
};
var add_wallpaper_button = new Gtk.Button.with_label (_("Import Photo…"));

combo = new Gtk.ComboBoxText () {
margin_end = 6,
valign = CENTER
};
combo.append ("centered", _("Centered"));
Expand All @@ -101,19 +95,10 @@ public class PantheonShell.Wallpaper : Switchboard.SettingsPage {
}

color_button = new Gtk.ColorButton () {
margin_top = 12,
margin_end = 12,
margin_bottom = 12,
margin_start = 0,
rgba = rgba_color
};
color_button.color_set.connect (update_color);

var size_group = new Gtk.SizeGroup (HORIZONTAL);
size_group.add_widget (add_wallpaper_button);
size_group.add_widget (combo);
size_group.add_widget (color_button);

load_settings ();

var actionbar = new Gtk.ActionBar ();
Expand All @@ -128,6 +113,7 @@ public class PantheonShell.Wallpaper : Switchboard.SettingsPage {
box.add_css_class (Granite.STYLE_CLASS_FRAME);

child = box;
add_css_class ("wallpaper");

add_wallpaper_button.clicked.connect (show_wallpaper_chooser);

Expand Down

0 comments on commit 93f5332

Please sign in to comment.