Skip to content

Commit

Permalink
Standardize m,argins, paddings and spacings
Browse files Browse the repository at this point in the history
  • Loading branch information
lainsce committed Jul 30, 2024
1 parent c29e96d commit cb90138
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 59 deletions.
5 changes: 2 additions & 3 deletions fuses/about/OSView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ public class About.OSView : Gtk.Box {
var os_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
os_box.append (os_title);
os_box.append (os_subtitle);
os_box.add_css_class ("mini-content-block");
os_box.add_css_class ("content-block");
os_box.add_css_class ("surface-container-highest-bg-color");
os_box.add_css_class ("x-large-radius");

var hostname_title = new Gtk.Label (_("Device Name")) {
selectable = true,
Expand Down Expand Up @@ -210,7 +209,7 @@ public class About.OSView : Gtk.Box {
stor_host_box.append (hostname_box);
stor_host_box.append (storage_box);

var info_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 2);
var info_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
info_box.append (os_box);
info_box.append (stor_host_box);
info_box.append (model_box);
Expand Down
2 changes: 1 addition & 1 deletion fuses/accounts/AccountRow.vala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public class Accounts.AccountRow : Gtk.ListBoxRow {
public AccountRow (Act.User user) {
var main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
var main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);

var avatar = new He.Avatar (64, user.icon_file != null ? "file://" + user.icon_file : null, user.real_name, false) {
margin_end = 24,
Expand Down
5 changes: 2 additions & 3 deletions fuses/accounts/AccountsView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class Accounts.AccountsView : Gtk.Box {
dialog.present ();
});

var mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
var mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
overlay_button.child = mbox;

var user_list = new Gtk.ListBox () {
Expand All @@ -26,8 +26,7 @@ public class Accounts.AccountsView : Gtk.Box {
mbox.append (user_list);

var autologin_box = new He.MiniContentBlock () {
title = _("Automatic Login"),
margin_top = 12
title = _("Automatic Login")
};
mbox.append (autologin_box);

Expand Down
23 changes: 11 additions & 12 deletions fuses/appearance/AppearanceView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class AppearanceView : Gtk.Box {
wallpaper_details_box.append (wallpaper_details_label);
wallpaper_details_box.append (wallpaper_details_sublabel);

var wallpaper_preview_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 24);
var wallpaper_preview_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
wallpaper_preview_box.append (wallpaper_preview);
wallpaper_preview_box.append (wallpaper_details_box);

Expand All @@ -135,11 +135,11 @@ public class AppearanceView : Gtk.Box {
is_iconic = true
};

var wallpaper_header_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 24);
var wallpaper_header_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
wallpaper_header_box.append (wallpaper_box);
wallpaper_header_box.append (wallpaper_grid_button);

var wallpaper_main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
var wallpaper_main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
wallpaper_main_box.append (wallpaper_header_box);
wallpaper_main_box.append (wallpaper_preview_box);
wallpaper_main_box.add_css_class ("mini-content-block");
Expand Down Expand Up @@ -245,7 +245,7 @@ public class AppearanceView : Gtk.Box {
prefer_dark_radio.add_css_class ("color-scheme-button");
prefer_dark_radio.child = (dark_grid);

var prefer_style_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 24) {
var prefer_style_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) {
hexpand = true,
halign = Gtk.Align.START
};
Expand All @@ -257,7 +257,7 @@ public class AppearanceView : Gtk.Box {
prefer_label_box.append (prefer_label);
prefer_label_box.append (prefer_sublabel);

var prefer_main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 18);
var prefer_main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
prefer_main_box.append (prefer_label_box);
prefer_main_box.append (prefer_style_box);

Expand Down Expand Up @@ -311,7 +311,7 @@ public class AppearanceView : Gtk.Box {
valign = Gtk.Align.CENTER,
};

wallpaper_accent_choices_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) {
wallpaper_accent_choices_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) {
halign = Gtk.Align.END,
valign = Gtk.Align.CENTER,
hexpand = true
Expand Down Expand Up @@ -367,8 +367,7 @@ public class AppearanceView : Gtk.Box {
contrast_box.append (contrast_label);
contrast_box.append (contrast_grid_button);

accent_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) {
homogeneous = true,
accent_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) {
halign = Gtk.Align.END,
hexpand = true
};
Expand All @@ -381,7 +380,7 @@ public class AppearanceView : Gtk.Box {
accent_box.append (blue);
accent_box.append (mono);

var accent_main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
var accent_main_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
accent_main_box.append (accent_label);
accent_main_box.append (accent_box);

Expand Down Expand Up @@ -410,7 +409,7 @@ public class AppearanceView : Gtk.Box {
main_flowbox = new Gtk.FlowBox () {
hexpand = true,
halign = Gtk.Align.END,
column_spacing = 12,
column_spacing = 24,
homogeneous = true,
min_children_per_line = 5,
max_children_per_line = 5
Expand Down Expand Up @@ -519,7 +518,7 @@ public class AppearanceView : Gtk.Box {
return Gdk.EVENT_PROPAGATE;
});

var main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) {
var main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
margin_start = 18,
margin_end = 18
};
Expand Down Expand Up @@ -551,7 +550,7 @@ public class AppearanceView : Gtk.Box {
viewtitle_widget = stack_switcher
};

var abox = new Gtk.Box (Gtk.Orientation.VERTICAL,0);
var abox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
abox.append (appbar);
abox.append (main_stack);

Expand Down
4 changes: 2 additions & 2 deletions fuses/appearance/ContrastView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class Appearance.ContrastView : Gtk.Box {
is_pill = true
};
contrast_preview_box.primary_button = (contrast_preview_button);
var contrast_preview_mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) {
var contrast_preview_mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
margin_bottom = 24,
margin_top = 24,
margin_start = 48,
Expand All @@ -75,7 +75,7 @@ public class Appearance.ContrastView : Gtk.Box {
margin_top = 64
};
contrast_preview_mbox.append (contrast_preview_overlay_button);
contrast_preview = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) {
contrast_preview = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
};
contrast_preview.add_css_class ("circle-radius");
contrast_preview.add_css_class ("surface-container-bg-color");
Expand Down
2 changes: 1 addition & 1 deletion fuses/appearance/TextView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ proclaimed as the highest aspiration of the common people…"""));
dyslexia_control_box.append (dyslexia_font_label);
dyslexia_control_box.append (dyslexia_font_description_label);

var dyslexia_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
var dyslexia_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
dyslexia_box.append (dyslexia_control_box);
dyslexia_box.append (dyslexia_font_switch);
dyslexia_box.add_css_class ("mini-content-block");
Expand Down
7 changes: 3 additions & 4 deletions fuses/appearance/WallpaperGrid.vala
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public class Appearance.WallpaperGrid : Gtk.Grid {
wallpaper_view = new Gtk.FlowBox () {
activate_on_single_click = true,
column_spacing = 12,
row_spacing = 12,
valign = Gtk.Align.START,
selection_mode = Gtk.SelectionMode.SINGLE,
max_children_per_line = 4,
Expand All @@ -99,7 +100,6 @@ public class Appearance.WallpaperGrid : Gtk.Grid {
wallpaper_label.add_css_class ("cb-title");

var wallpaper_title_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) {
spacing = 12,
hexpand = true,
halign = Gtk.Align.END
};
Expand Down Expand Up @@ -135,7 +135,6 @@ public class Appearance.WallpaperGrid : Gtk.Grid {
wallpaper_title_box.append (wallpaper_removal_button);

var wallpaper_main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
spacing = 12,
hexpand = true,
margin_start = 18,
margin_end = 18
Expand Down Expand Up @@ -520,8 +519,8 @@ public class Appearance.WallpaperContainer : Gtk.FlowBoxChild {

construct {
image = new He.ContentBlockImage ("") {
requested_width = 135,
requested_height = 135
requested_width = 128,
requested_height = 128
};
image.add_css_class ("large-radius");
image.tooltip_text = (thumb_path);
Expand Down
16 changes: 8 additions & 8 deletions fuses/appearance/WindowView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
can_target = false,
viewtitle_widget = wm_layout_preview_label
};
var wm_layout_preview_mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) {
var wm_layout_preview_mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
margin_top = 24,
margin_start = 48,
margin_end = 48
};
wm_layout_preview_mbox.append (wm_layout_preview_bar);
wm_layout_preview_mbox.add_css_class ("medium-radius");
wm_layout_preview_mbox.add_css_class ("surface-bg-color");
wm_layout_preview = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) {
wm_layout_preview = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
};
wm_layout_preview.add_css_class ("circle-radius");
wm_layout_preview.add_css_class ("surface-container-bg-color");
Expand Down Expand Up @@ -65,7 +65,7 @@
}
);

var wm_layout_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
var wm_layout_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
wm_layout_box.append (wm_layout_box_cb);
wm_layout_box.append (wm_layout_cb);
wm_layout_box.hexpand = true;
Expand Down Expand Up @@ -96,7 +96,7 @@
wm_dc_cb.append_text (_("None"));
wm_dc_cb.active = 0;

var wm_dc_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
var wm_dc_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
wm_dc_box.append (
new Gtk.Label (_("Double Click")) {
css_classes = { "cb-title" },
Expand All @@ -121,7 +121,7 @@
wm_sc_cb.append_text (_("None"));
wm_sc_cb.active = 2;

var wm_sc_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
var wm_sc_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
wm_sc_box.append (
new Gtk.Label (_("Secondary Click")) {
css_classes = { "cb-title" },
Expand All @@ -144,7 +144,7 @@
wm_focus_cb.append_text ("Focus on Hover");
wm_focus_cb.active = 0;

var wm_focus_box_cb = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
var wm_focus_box_cb = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
wm_focus_box_cb.append (
new Gtk.Label (_("Focusing")) {
css_classes = { "cb-title" },
Expand All @@ -163,14 +163,14 @@
}
);

var wm_focus_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6);
var wm_focus_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
wm_focus_box.append (wm_focus_box_cb);
wm_focus_box.append (wm_focus_cb);
wm_focus_box.hexpand = true;
wm_focus_box.add_css_class ("mini-content-block");

var grid = new Gtk.Grid () {
row_spacing = 18,
row_spacing = 6,
margin_start = 18,
margin_end = 18,
margin_bottom = 18,
Expand Down
2 changes: 1 addition & 1 deletion fuses/bluetooth/src/BluetoothFuse.vala
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class Bluetooth.Fuse : Fusebox.Fuse {
};

main_grid = new Gtk.Grid () {
row_spacing = 12,
row_spacing = 6,
};
main_grid.attach (appbar, 0, 0);
main_grid.attach (main_view, 0, 1);
Expand Down
2 changes: 1 addition & 1 deletion fuses/datetime/DateTimeFuse.vala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class DateTime.Fuse : Fusebox.Fuse {
};

main_grid = new Gtk.Grid () {
row_spacing = 12
row_spacing = 6
};
main_grid.attach (appbar, 0, 0);
main_grid.attach (datetime_view, 0, 1);
Expand Down
10 changes: 5 additions & 5 deletions fuses/datetime/DateTimeView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DateTime.DateTimeView : Gtk.Box {
};
date_time_sublabel.add_css_class ("cb-subtitle");

var date_time_label_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
var date_time_label_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
date_time_label_box.append (date_time_label);
date_time_label_box.append (date_time_sublabel);

Expand Down Expand Up @@ -71,7 +71,7 @@ public class DateTime.DateTimeView : Gtk.Box {
visible = false
};

var date_time_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) {
var date_time_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
margin_end = 18,
margin_start = 18
};
Expand All @@ -89,7 +89,7 @@ public class DateTime.DateTimeView : Gtk.Box {
};
timezone_sublabel.add_css_class ("cb-subtitle");

var timezone_label_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
var timezone_label_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
timezone_label_box.append (timezone_label);
timezone_label_box.append (timezone_sublabel);

Expand Down Expand Up @@ -152,7 +152,7 @@ public class DateTime.DateTimeView : Gtk.Box {
visible = false
};

var timezone_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) {
var timezone_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 6) {
margin_end = 18,
margin_start = 18
};
Expand Down Expand Up @@ -190,7 +190,7 @@ public class DateTime.DateTimeView : Gtk.Box {
timeformat_box.append (timeformat_label);
timeformat_box.append (timeformat_toggle_box);

var mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
var mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
mbox.append (date_time_box);
mbox.append (timezone_box);
mbox.append (timeformat_box);
Expand Down
2 changes: 1 addition & 1 deletion fuses/display/src/DisplayFuse.vala
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class Display.Fuse : Fusebox.Fuse {
public override Gtk.Widget get_widget () {
if (main_grid == null) {
main_grid = new Gtk.Grid () {
row_spacing = 12,
row_spacing = 6,
column_homogeneous = true
};
var displays_view = new DisplaysView ();
Expand Down
6 changes: 3 additions & 3 deletions fuses/locale/FormatPicker.vala
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class Locale.FormatPicker : He.Window {
this.set_size_request (440, 550);
this.add_css_class ("dialog-content");

var main = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
var main = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
main.add_css_class ("dialog-content");
var side = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
var side = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12);
main.append (side);
var content = new Gtk.Box (Gtk.Orientation.VERTICAL, 12);
var content = new Gtk.Box (Gtk.Orientation.VERTICAL, 6);
side.append (content);

var title = new Gtk.Label (_("Format")) {
Expand Down
2 changes: 1 addition & 1 deletion fuses/locale/LocaleFuse.vala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Locale.Fuse : Fusebox.Fuse {
};

main_grid = new Gtk.Grid () {
row_spacing = 12
row_spacing = 6
};
main_grid.attach (appbar, 0, 0);
main_grid.attach (locale_view, 0, 1);
Expand Down
2 changes: 1 addition & 1 deletion fuses/mouse/LayoutPage.vala
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace Mouse {
var sep = new Gtk.Separator (Gtk.Orientation.VERTICAL);

column_spacing = 12;
row_spacing = 12;
row_spacing = 6;
attach (display, 0, 0, 1, 4);
attach (sep, 1, 0, 1, 4);
attach (switch_layout_label, 2, 0, 1, 1);
Expand Down
Loading

0 comments on commit cb90138

Please sign in to comment.