Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 13 additions & 42 deletions src/Views/Appearance.vala
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,9 @@ public class PantheonShell.Appearance : Switchboard.SettingsPage {
prefer_style_box.append (prefer_default_radio);
prefer_style_box.append (prefer_dark_radio);

var dim_switch = new Gtk.Switch () {
valign = CENTER
};

var dim_label = new Granite.HeaderLabel (_("Dim Wallpaper With Dark Style")) {
hexpand = true,
mnemonic_widget = dim_switch
};

var dim_box = new Gtk.Box (HORIZONTAL, 12) {
var dim_switch = new Granite.SwitchModelButton (_("Dim Wallpaper With Dark Style")) {
margin_top = 18
};
dim_box.append (dim_label);
dim_box.append (dim_switch);

var schedule_disabled_radio = new Gtk.CheckButton.with_label (_("Disabled")) {
action_name = "desktop-appearance.prefer-dark-schedule",
Expand Down Expand Up @@ -202,7 +191,7 @@ public class PantheonShell.Appearance : Switchboard.SettingsPage {
row_spacing = 6
};
grid.attach (prefer_style_box, 0, 2, 2);
grid.attach (dim_box, 0, 3, 2);
grid.attach (dim_switch, 0, 3, 2);
grid.attach (schedule_label, 0, 4, 2);
grid.attach (schedule_box, 0, 5, 2);

Expand Down Expand Up @@ -279,41 +268,23 @@ public class PantheonShell.Appearance : Switchboard.SettingsPage {
grid.attach (accent_label, 0, 8, 2);
grid.attach (accent_box, 0, 9, 2);

var animations_switch = new Gtk.Switch () {
halign = Gtk.Align.END,
hexpand = true,
valign = Gtk.Align.CENTER
};

var animations_label = new Granite.HeaderLabel (_("Reduce Motion")) {
mnemonic_widget = animations_switch,
secondary_text = _("Disable animations in the window manager and some other interface elements.")
var animations_switch = new Granite.SwitchModelButton (_("Reduce Motion")) {
description = _("Disable animations in the window manager and some other interface elements.")
};

var animations_box = new Gtk.Box (HORIZONTAL, 12) {
margin_top = 18
};
animations_box.append (animations_label);
animations_box.append (animations_switch);

var scrollbar_switch = new Gtk.Switch () {
valign = CENTER
};

var scrollbar_label = new Granite.HeaderLabel (_("Always Show Scrollbars")) {
hexpand = true,
mnemonic_widget = scrollbar_switch,
secondary_text = _("Scrollbars will take up space, even when not in use.")
var scrollbar_switch = new Granite.SwitchModelButton (_("Always Show Scrollbars")) {
description = _("Scrollbars will take up space, even when not in use.")
};

var scrollbar_box = new Gtk.Box (HORIZONTAL, 12) {
margin_top = 18
var a11y_box = new Gtk.ListBox () {
margin_top = 18,
show_separators = true
};
scrollbar_box.append (scrollbar_label);
scrollbar_box.append (scrollbar_switch);
a11y_box.add_css_class (Granite.CssClass.CARD);
a11y_box.append (new Granite.ListItem () { child = animations_switch });
a11y_box.append (new Granite.ListItem () { child = scrollbar_switch });

grid.attach (animations_box, 0, 10, 2);
grid.attach (scrollbar_box, 0, 11, 2);
grid.attach (a11y_box, 0, 10, 2);

child = grid;
add_css_class ("appearance-view");
Expand Down