Skip to content

Commit

Permalink
Remove IconSize
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed May 14, 2024
1 parent 2e152be commit 5b02220
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 29 deletions.
5 changes: 3 additions & 2 deletions src/Views/CheckView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class Installer.CheckView : AbstractInstallerView {
}

construct {
var image = new Gtk.Image.from_icon_name ("io.elementary.installer.caution", Gtk.IconSize.DIALOG) {
var image = new Gtk.Image.from_icon_name ("io.elementary.installer.caution") {
pixel_size = 128,
valign = Gtk.Align.END
};
Expand Down Expand Up @@ -176,7 +176,8 @@ public class Installer.CheckView : AbstractInstallerView {

private class CheckView : Gtk.Grid {
public CheckView (string title, string description, string icon_name) {
var image = new Gtk.Image.from_icon_name (icon_name, Gtk.IconSize.DND) {
var image = new Gtk.Image.from_icon_name (icon_name) {
icon_size = LARGE,
valign = Gtk.Align.START
};

Expand Down
4 changes: 2 additions & 2 deletions src/Views/DiskView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public class Installer.DiskView : AbstractInstallerView {
}

construct {
var install_image = new Gtk.Image.from_icon_name ("drive-harddisk", Gtk.IconSize.DIALOG) {
var install_image = new Gtk.Image.from_icon_name ("drive-harddisk") {
pixel_size = 128
};

var install_badge = new Gtk.Image.from_icon_name ("io.elementary.installer.emblem-downloads", Gtk.IconSize.DND) {
var install_badge = new Gtk.Image.from_icon_name ("io.elementary.installer.emblem-downloads") {
pixel_size = 64,
halign = Gtk.Align.END,
valign = Gtk.Align.END
Expand Down
14 changes: 10 additions & 4 deletions src/Views/DriversView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public signal void next_step ();

construct {
var image = new Gtk.Image.from_icon_name ("application-x-firmware", Gtk.IconSize.INVALID) {
var image = new Gtk.Image.from_icon_name ("application-x-firmware") {
pixel_size = 128,
valign = Gtk.Align.END
};
Expand All @@ -36,7 +36,9 @@
};
description_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);

var warning_image = new Gtk.Image.from_icon_name ("security-low-symbolic", LARGE_TOOLBAR);
var warning_image = new Gtk.Image.from_icon_name ("security-low-symbolic") {
pixel_size = 24
};
warning_image.add_css_class ("accent");
warning_image.add_css_class ("yellow");

Expand All @@ -47,7 +49,9 @@
xalign = 0
};

var internet_image = new Gtk.Image.from_icon_name ("network-wireless-symbolic", LARGE_TOOLBAR);
var internet_image = new Gtk.Image.from_icon_name ("network-wireless-symbolic") {
pixel_size = 24
};
internet_image.add_css_class ("accent");
internet_image.add_css_class ("blue");

Expand All @@ -58,7 +62,9 @@
xalign = 0
};

var install_later_image = new Gtk.Image.from_icon_name ("system-software-install-symbolic", LARGE_TOOLBAR);
var install_later_image = new Gtk.Image.from_icon_name ("system-software-install-symbolic") {
pixel_size = 24
};
install_later_image.add_css_class ("accent");
install_later_image.add_css_class ("purple");

Expand Down
16 changes: 11 additions & 5 deletions src/Views/EncryptView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public class EncryptView : AbstractInstallerView {
}

construct {
var image = new Gtk.Image.from_icon_name ("drive-harddisk", Gtk.IconSize.INVALID) {
var image = new Gtk.Image.from_icon_name ("drive-harddisk") {
pixel_size = 128
};

var overlay_image = new Gtk.Image.from_icon_name ("security-high", Gtk.IconSize.INVALID) {
var overlay_image = new Gtk.Image.from_icon_name ("security-high") {
pixel_size = 64,
halign = Gtk.Align.END,
valign = Gtk.Align.END
Expand All @@ -61,7 +61,9 @@ public class EncryptView : AbstractInstallerView {
};
details_label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);

var protect_image = new Gtk.Image.from_icon_name ("security-high-symbolic", Gtk.IconSize.LARGE_TOOLBAR);
var protect_image = new Gtk.Image.from_icon_name ("security-high-symbolic") {
pixel_size = 24
};

var protect_label = new Gtk.Label (_("Data will only be protected from others with physical access to this device when it is shut down.")) {
hexpand = true,
Expand All @@ -70,7 +72,9 @@ public class EncryptView : AbstractInstallerView {
xalign = 0
};

var restart_image = new Gtk.Image.from_icon_name ("system-reboot-symbolic", Gtk.IconSize.LARGE_TOOLBAR);
var restart_image = new Gtk.Image.from_icon_name ("system-reboot-symbolic") {
pixel_size = 24
};

var restart_label = new Gtk.Label (_("The encryption password will be required each time this device is turned on. Store it somewhere safe.")) {
hexpand = true,
Expand All @@ -79,7 +83,9 @@ public class EncryptView : AbstractInstallerView {
xalign = 0
};

var keyboard_image = new Gtk.Image.from_icon_name ("input-keyboard-symbolic", Gtk.IconSize.LARGE_TOOLBAR);
var keyboard_image = new Gtk.Image.from_icon_name ("input-keyboard-symbolic") {
pixel_size = 24
};

var keyboard_label = new Gtk.Label (_("A built-in or USB keyboard will be required to type the encryption password each time this device is turned on.")) {
hexpand = true,
Expand Down
10 changes: 5 additions & 5 deletions src/Views/ErrorView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ErrorView : AbstractInstallerView {
}

construct {
var image = new Gtk.Image.from_icon_name ("dialog-error", Gtk.IconSize.DIALOG) {
var image = new Gtk.Image.from_icon_name ("dialog-error") {
pixel_size = 128,
valign = Gtk.Align.END
};
Expand All @@ -41,7 +41,7 @@ public class ErrorView : AbstractInstallerView {
xalign = 0
};

var redo_image = new Gtk.Image.from_icon_name ("edit-undo-symbolic", Gtk.IconSize.MENU) {
var redo_image = new Gtk.Image.from_icon_name ("edit-undo-symbolic") {
margin_start = 6
};

Expand All @@ -52,7 +52,7 @@ public class ErrorView : AbstractInstallerView {
xalign = 0
};

var demo_image = new Gtk.Image.from_icon_name ("document-properties-symbolic", Gtk.IconSize.MENU) {
var demo_image = new Gtk.Image.from_icon_name ("document-properties-symbolic") {
margin_start = 6
};

Expand All @@ -62,7 +62,7 @@ public class ErrorView : AbstractInstallerView {
xalign = 0
};

var restart_image = new Gtk.Image.from_icon_name ("system-reboot-symbolic", Gtk.IconSize.MENU) {
var restart_image = new Gtk.Image.from_icon_name ("system-reboot-symbolic") {
margin_start = 6
};

Expand All @@ -75,7 +75,7 @@ public class ErrorView : AbstractInstallerView {
var terminal_button = new Gtk.ToggleButton () {
always_show_image = true,
halign = Gtk.Align.START,
image = new Gtk.Image.from_icon_name ("utilities-terminal-symbolic", Gtk.IconSize.SMALL_TOOLBAR),
image = new Gtk.Image.from_icon_name ("utilities-terminal-symbolic"),
label = _("Details"),
margin_top = 12
};
Expand Down
2 changes: 1 addition & 1 deletion src/Views/KeyboardLayoutView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class KeyboardLayoutView : AbstractInstallerView {
construct {
keyboard_settings = new GLib.Settings ("org.gnome.desktop.input-sources");

var image = new Gtk.Image.from_icon_name ("input-keyboard", Gtk.IconSize.DIALOG) {
var image = new Gtk.Image.from_icon_name ("input-keyboard") {
pixel_size = 128,
valign = Gtk.Align.END
};
Expand Down
4 changes: 1 addition & 3 deletions src/Views/LanguageView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Installer.LanguageView : AbstractInstallerView {
preferred_langs.add (lang);
}

var image = new Gtk.Image.from_icon_name ("preferences-desktop-locale", Gtk.IconSize.DIALOG) {
var image = new Gtk.Image.from_icon_name ("preferences-desktop-locale") {
pixel_size = 128,
valign = Gtk.Align.END
};
Expand Down Expand Up @@ -315,7 +315,6 @@ public class Installer.LanguageView : AbstractInstallerView {
image = new Gtk.Image ();
image.hexpand = true;
image.halign = Gtk.Align.END;
image.icon_size = Gtk.IconSize.BUTTON;

var label = new Gtk.Label (lang_entry.name) {
ellipsize = Pango.EllipsizeMode.END,
Expand Down Expand Up @@ -362,7 +361,6 @@ public class Installer.LanguageView : AbstractInstallerView {
image = new Gtk.Image ();
image.hexpand = true;
image.halign = Gtk.Align.END;
image.icon_size = Gtk.IconSize.BUTTON;

var label = new Gtk.Label (country_entry.name);
label.add_css_class (Granite.STYLE_CLASS_H3_LABEL);
Expand Down
2 changes: 1 addition & 1 deletion src/Views/ProgressView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class ProgressView : AbstractInstallerView {

var terminal_button = new Gtk.ToggleButton () {
halign = Gtk.Align.END,
image = new Gtk.Image.from_icon_name ("utilities-terminal-symbolic", Gtk.IconSize.SMALL_TOOLBAR),
image = new Gtk.Image.from_icon_name ("utilities-terminal-symbolic"),
tooltip_text = _("Show log")
};
terminal_button.add_css_class (Granite.STYLE_CLASS_FLAT);
Expand Down
2 changes: 1 addition & 1 deletion src/Views/SuccessView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SuccessView : AbstractInstallerView {
private Gtk.Label secondary_label;

construct {
var image = new Gtk.Image.from_icon_name ("process-completed", Gtk.IconSize.DIALOG) {
var image = new Gtk.Image.from_icon_name ("process-completed") {
pixel_size = 128,
valign = Gtk.Align.END
};
Expand Down
2 changes: 1 addition & 1 deletion src/Views/TryInstallView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Installer.TryInstallView : AbstractInstallerView {
public signal void next_step ();

construct {
var type_image = new Gtk.Image.from_icon_name (Application.get_default ().application_id, Gtk.IconSize.DIALOG) {
var type_image = new Gtk.Image.from_icon_name (Application.get_default ().application_id) {
pixel_size = 128,
valign = Gtk.Align.END
};
Expand Down
8 changes: 6 additions & 2 deletions src/Widgets/DecryptMenu.vala
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ public class Installer.DecryptMenu: Gtk.Popover {
}

private void create_decrypt_view () {
var image = new Gtk.Image.from_icon_name ("drive-harddisk", Gtk.IconSize.DIALOG);
var image = new Gtk.Image.from_icon_name ("drive-harddisk") {
pixel_size = 48
};
image.valign = Gtk.Align.START;

var overlay_image = new Gtk.Image.from_icon_name ("dialog-password", Gtk.IconSize.DND);
var overlay_image = new Gtk.Image.from_icon_name ("dialog-password") {
icon_size = LARGE
};
overlay_image.halign = Gtk.Align.END;
overlay_image.valign = Gtk.Align.END;

Expand Down
3 changes: 2 additions & 1 deletion src/Widgets/DiskGrid.vala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public class Installer.DiskButton : Gtk.CheckButton {
construct {
add_css_class ("image-button");

var disk_image = new Gtk.Image.from_icon_name (icon_name, Gtk.IconSize.DIALOG) {
var disk_image = new Gtk.Image.from_icon_name (icon_name) {
pixel_size = 48,
use_fallback = true
};

Expand Down
4 changes: 3 additions & 1 deletion src/Widgets/InstallTypeGrid.vala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public class Installer.InstallTypeButton : Gtk.CheckButton {
construct {
add_css_class ("image-button");

var image = new Gtk.Image.from_icon_name (icon_name, Gtk.IconSize.DIALOG);
var image = new Gtk.Image.from_icon_name (icon_name) {
pixel_size = 48
};

var title_label = new Gtk.Label (title) {
hexpand = true,
Expand Down

0 comments on commit 5b02220

Please sign in to comment.