diff --git a/data/meson.build b/data/meson.build index e8fcedf..cd82de3 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,4 +1,4 @@ -po_extra_dir = join_paths(meson.source_root(), 'po', 'extra') +po_extra_dir = join_paths(meson.project_source_root(), 'po', 'extra') install_data( 'settings.gschema.xml', diff --git a/fuses/about/OSView.vala b/fuses/about/OSView.vala index 235da58..e280481 100644 --- a/fuses/about/OSView.vala +++ b/fuses/about/OSView.vala @@ -93,13 +93,12 @@ public class About.OSView : Gtk.Box { } hostname_image.icon_name = icon_name; hostname_image.add_css_class ("rounded-icon"); - var hostname_button = new Gtk.Button () { - icon_name = "pan-end-symbolic", + var hostname_button = new He.Button (null, null) { + icon = "pan-end-symbolic", + is_disclosure = true, hexpand = true, halign = Gtk.Align.END }; - hostname_button.add_css_class ("flat"); - hostname_button.add_css_class ("circular"); var hostname_action_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6); hostname_action_box.append (hostname_title); hostname_action_box.append (hostname_button); @@ -269,8 +268,9 @@ public class About.OSView : Gtk.Box { }); hostname_button.clicked.connect (() => { - var rename_button = new He.FillButton (_("Rename")) { - sensitive = false + var rename_button = new He.Button (null, _("Rename")) { + sensitive = false, + is_fill = true }; var title_label = new Gtk.Label ("Rename Your Computer") { halign = Gtk.Align.CENTER @@ -308,7 +308,9 @@ public class About.OSView : Gtk.Box { main_box.append (t_label); main_box.append (rename_entry); - var cancel_button = new He.TextButton ("Cancel"); + var cancel_button = new He.Button (null, "Cancel") { + is_textual = true + }; var action_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6) { homogeneous = true diff --git a/fuses/accounts/AccountRow.vala b/fuses/accounts/AccountRow.vala index 26daea3..9b9bc61 100644 --- a/fuses/accounts/AccountRow.vala +++ b/fuses/accounts/AccountRow.vala @@ -30,7 +30,9 @@ public class Accounts.AccountRow : Gtk.ListBoxRow { }; main_box.append (button_box); - var delete_button = new He.DisclosureButton ("user-trash-symbolic"); + var delete_button = new He.Button ("user-trash-symbolic", null) { + is_disclosure = true + }; delete_button.visible = GLib.Environment.get_user_name () != user.user_name; delete_button.add_css_class ("bg-meson-red"); delete_button.clicked.connect (() => { @@ -41,7 +43,9 @@ public class Accounts.AccountRow : Gtk.ListBoxRow { "Are you sure you want to delete this account?", "You cannot undo this action, and will delete " + user.real_name + "'s data.", "dialog-warning-symbolic", - new He.FillButton ("Delete"), + new He.Button (null, "Delete") { + is_fill = true + }, null ); @@ -58,14 +62,18 @@ public class Accounts.AccountRow : Gtk.ListBoxRow { }); button_box.append (delete_button); - var change_password_button = new He.DisclosureButton ("dialog-password-symbolic"); + var change_password_button = new He.Button ("dialog-password-symbolic", null) { + is_disclosure = true + }; change_password_button.clicked.connect (() => { var dialog = new Accounts.ChangePassword (user, He.Misc.find_ancestor_of_type (this)); dialog.present (); }); button_box.append (change_password_button); - var edit_button = new He.DisclosureButton ("document-edit-symbolic"); + var edit_button = new He.Button ("document-edit-symbolic", null) { + is_disclosure = true + }; edit_button.clicked.connect (() => { var dialog = new Accounts.EditAccount (user, He.Misc.find_ancestor_of_type (this)); dialog.present (); diff --git a/fuses/accounts/ChangePassword.vala b/fuses/accounts/ChangePassword.vala index 2d5fdd7..47ed6e0 100644 --- a/fuses/accounts/ChangePassword.vala +++ b/fuses/accounts/ChangePassword.vala @@ -37,15 +37,18 @@ class Accounts.ChangePassword : He.Window { }; main.append (button_box); - var cancel_button = new He.TextButton (_("Cancel")); + var cancel_button = new He.Button (null, _("Cancel")) { + is_textual = true + }; cancel_button.set_size_request (200, -1); cancel_button.clicked.connect (() => { this.destroy (); }); button_box.append (cancel_button); - var apply_button = new He.FillButton (_("Update")) { + var apply_button = new He.Button (null, _("Update")) { sensitive = false, + is_fill = true }; apply_button.set_size_request (200, -1); apply_button.clicked.connect (() => { diff --git a/fuses/accounts/CreateAccount.vala b/fuses/accounts/CreateAccount.vala index 91d62f7..2f6b0bf 100644 --- a/fuses/accounts/CreateAccount.vala +++ b/fuses/accounts/CreateAccount.vala @@ -40,9 +40,10 @@ class Accounts.CreateAccount : He.Window { main_box.append (avatar_box); var avatar = new He.Avatar (96, null, "New User", false); - var avatar_edit_button = new He.DisclosureButton ("document-edit-symbolic") { + var avatar_edit_button = new He.Button ("document-edit-symbolic", null) { valign = Gtk.Align.END, halign = Gtk.Align.END, + is_disclosure = true }; var avatar_overlay = new Gtk.Overlay () { @@ -110,15 +111,18 @@ class Accounts.CreateAccount : He.Window { }; main_box.append (button_box); - var cancel_button = new He.TextButton (_("Cancel")); + var cancel_button = new He.Button (null, _("Cancel")) { + is_textual = true + }; cancel_button.set_size_request (200, -1); cancel_button.clicked.connect (() => { this.destroy (); }); button_box.append (cancel_button); - var apply_button = new He.FillButton (_("Create Account")) { + var apply_button = new He.Button (null, _("Create Account")) { sensitive = false, + is_fill = true }; apply_button.clicked.connect (() => { create_user ( diff --git a/fuses/accounts/EditAccount.vala b/fuses/accounts/EditAccount.vala index 8087fbe..29c27be 100644 --- a/fuses/accounts/EditAccount.vala +++ b/fuses/accounts/EditAccount.vala @@ -50,9 +50,10 @@ class Accounts.EditAccount : He.Window { main_box.append (avatar_box); var avatar = new He.Avatar (96, user.icon_file != null ? "file://" + user.icon_file : null, user.real_name, false); - var avatar_edit_button = new He.DisclosureButton ("document-edit-symbolic") { + var avatar_edit_button = new He.Button ("document-edit-symbolic", null) { valign = Gtk.Align.END, halign = Gtk.Align.END, + is_disclosure = true }; var avatar_overlay = new Gtk.Overlay () { @@ -106,15 +107,18 @@ class Accounts.EditAccount : He.Window { }; main_box.append (button_box); - var cancel_button = new He.TextButton (_("Cancel")); + var cancel_button = new He.Button (null, _("Cancel")) { + is_textual = true + }; cancel_button.set_size_request (200, -1); cancel_button.clicked.connect (() => { this.destroy (); }); button_box.append (cancel_button); - var apply_button = new He.FillButton (_("Edit Account")) { + var apply_button = new He.Button (null, _("Edit Account")) { sensitive = false, + is_fill = true }; apply_button.clicked.connect (() => { this.update_user (); diff --git a/fuses/appearance/AppearanceView.vala b/fuses/appearance/AppearanceView.vala index 692c4ef..2c9486e 100644 --- a/fuses/appearance/AppearanceView.vala +++ b/fuses/appearance/AppearanceView.vala @@ -127,11 +127,12 @@ public class AppearanceView : Gtk.Box { wallpaper_box.append (wallpaper_label); wallpaper_box.append (wallpaper_sublabel); - var wallpaper_grid_button = new He.IconicButton ("pan-end-symbolic") { + var wallpaper_grid_button = new He.Button ("pan-end-symbolic", null) { hexpand = true, vexpand = true, halign = Gtk.Align.END, - valign = Gtk.Align.START + valign = Gtk.Align.START, + is_iconic = true }; var wallpaper_header_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 24); @@ -354,11 +355,12 @@ public class AppearanceView : Gtk.Box { }; contrast_label.add_css_class ("cb-title"); - var contrast_grid_button = new He.IconicButton ("pan-end-symbolic") { + var contrast_grid_button = new He.Button ("pan-end-symbolic", null) { hexpand = true, vexpand = true, halign = Gtk.Align.END, - valign = Gtk.Align.START + valign = Gtk.Align.START, + is_iconic = true }; var contrast_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12); @@ -486,8 +488,9 @@ public class AppearanceView : Gtk.Box { grid.attach (accent_main_box, 0, 1); grid.attach (wallpaper_accent_box, 0, 2); grid.attach (ensor_main_box, 0, 3); - grid.attach (contrast_box, 0, 4); - grid.attach (roundness_box, 0, 5); + grid.attach (roundness_box, 0, 4); + + grid.attach (contrast_box, 0, 6); grid.add_css_class ("mini-content-block"); fusebox_appearance_settings.bind ("wallpaper-accent", wp_switch.iswitch, "active", SettingsBindFlags.DEFAULT); diff --git a/fuses/appearance/ContrastView.vala b/fuses/appearance/ContrastView.vala index 5709308..edc77ca 100644 --- a/fuses/appearance/ContrastView.vala +++ b/fuses/appearance/ContrastView.vala @@ -53,8 +53,9 @@ public class Appearance.ContrastView : Gtk.Box { can_target = false, margin_start = margin_end = 18 }; - var contrast_preview_button = new He.PillButton (_("Action")) { - can_target = false + var contrast_preview_button = new He.Button (null, _("Action")) { + can_target = false, + is_pill = true }; contrast_preview_box.primary_button = (contrast_preview_button); var contrast_preview_mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0) { diff --git a/fuses/appearance/WallpaperGrid.vala b/fuses/appearance/WallpaperGrid.vala index 509d3c6..c88745a 100644 --- a/fuses/appearance/WallpaperGrid.vala +++ b/fuses/appearance/WallpaperGrid.vala @@ -36,8 +36,8 @@ public class Appearance.WallpaperGrid : Gtk.Grid { private Gtk.ScrolledWindow wallpaper_scrolled_window; private Gtk.FlowBox wallpaper_view; - private He.TextButton wallpaper_add_button; - private He.TextButton wallpaper_removal_button; + private He.Button wallpaper_add_button; + private He.Button wallpaper_removal_button; public He.AppBar wappbar; @@ -104,7 +104,8 @@ public class Appearance.WallpaperGrid : Gtk.Grid { halign = Gtk.Align.END }; - wallpaper_add_button = new He.TextButton ("") { + wallpaper_add_button = new He.Button (null, "") { + is_textual = true, child = new He.ButtonContent () { label = "Add Wallpaper…", icon = "list-add-symbolic" @@ -112,11 +113,12 @@ public class Appearance.WallpaperGrid : Gtk.Grid { }; wallpaper_add_button.clicked.connect (show_wallpaper_chooser); - wallpaper_removal_button = new He.TextButton ("") { + wallpaper_removal_button = new He.Button (null, "") { hexpand = true, halign = Gtk.Align.END, icon = "user-trash-symbolic", - visible = false + visible = false, + is_textual = true }; wallpaper_removal_button.clicked.connect (() => { var wallpaper = (Appearance.WallpaperContainer) wallpaper_view.get_selected_children ().data; @@ -163,7 +165,7 @@ public class Appearance.WallpaperGrid : Gtk.Grid { settings.set_string ("picture-uri-dark", furi); if (appearance_view.wp_switch.iswitch.active) appearance_view.accent_setup.begin (); - + appearance_view.wallpaper_preview.file = furi; try { diff --git a/fuses/bluetooth/src/DeviceRow.vala b/fuses/bluetooth/src/DeviceRow.vala index 961b8ba..812a72c 100644 --- a/fuses/bluetooth/src/DeviceRow.vala +++ b/fuses/bluetooth/src/DeviceRow.vala @@ -54,8 +54,8 @@ public class Bluetooth.DeviceRow : Gtk.ListBoxRow { } } - private He.FillButton connect_button; - private He.TintButton forget_button; + private He.Button connect_button; + private He.Button forget_button; private He.ModifierBadge state; private Gtk.Label state_label; private Gtk.LinkButton settings_button; @@ -136,8 +136,9 @@ public class Bluetooth.DeviceRow : Gtk.ListBoxRow { }; settings_button.add_css_class ("disclosure-button"); - forget_button = new He.TintButton ("") { + forget_button = new He.Button (null, "") { margin_end = 3, + is_tint = true, label = _("Forget"), visible = false, valign = Gtk.Align.CENTER, @@ -145,8 +146,9 @@ public class Bluetooth.DeviceRow : Gtk.ListBoxRow { tooltip_text = _("Forget this device") }; - connect_button = new He.FillButton ("") { - valign = Gtk.Align.CENTER + connect_button = new He.Button (null, "") { + valign = Gtk.Align.CENTER, + is_fill = true }; size_group.add_widget (connect_button); diff --git a/fuses/bluetooth/src/PairDialog.vala b/fuses/bluetooth/src/PairDialog.vala index 398df3e..de65c8e 100644 --- a/fuses/bluetooth/src/PairDialog.vala +++ b/fuses/bluetooth/src/PairDialog.vala @@ -99,14 +99,18 @@ public class PairDialog : He.Dialog { case AuthType.REQUEST_CONFIRMATION: info = _("See if the code displayed on “%s” matches below.").printf (device_name); - var confirm_button = new He.FillButton (_("Pair")); + var confirm_button = new He.Button (null, _("Pair")) { + is_fill = true + }; primary_button = confirm_button; break; case AuthType.DISPLAY_PASSKEY: info = _("“%s” wants to pair with this device. See if the code displayed on “%s” matches below.") .printf (device_name, device_name); - var confirm_button = new He.FillButton (_("Pair")); + var confirm_button = new He.Button (null, _("Pair")) { + is_fill = true + }; primary_button = confirm_button; break; case AuthType.DISPLAY_PIN_CODE: @@ -115,7 +119,9 @@ public class PairDialog : He.Dialog { case AuthType.REQUEST_AUTHORIZATION: info = _("“%s” wants to pair with this device.").printf (device_name); - var confirm_button = new He.FillButton (_("Pair")); + var confirm_button = new He.Button (null, _("Pair")) { + is_fill = true + }; primary_button = confirm_button; break; } diff --git a/fuses/datetime/WorldLocationFinder.vala b/fuses/datetime/WorldLocationFinder.vala index 5c65fdb..c2efebb 100644 --- a/fuses/datetime/WorldLocationFinder.vala +++ b/fuses/datetime/WorldLocationFinder.vala @@ -85,7 +85,7 @@ public class DateTime.WorldLocationFinder : Gtk.Box { private Gtk.Stack search_stack; private Gtk.ListBox listbox; private Gtk.SearchEntry search_entry; - private He.PillButton add_button; + private He.Button add_button; construct { var main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12); @@ -119,8 +119,9 @@ public class DateTime.WorldLocationFinder : Gtk.Box { search_stack.add_named (search_label, "empty"); search_stack.add_named (listbox, "results"); - add_button = new He.PillButton ("") { + add_button = new He.Button (null, "") { margin_bottom = 18, + is_pill = true, label = _("Add Location") }; diff --git a/fuses/locale/FormatPicker.vala b/fuses/locale/FormatPicker.vala index 0ddfa3b..dd31762 100644 --- a/fuses/locale/FormatPicker.vala +++ b/fuses/locale/FormatPicker.vala @@ -63,15 +63,18 @@ class Locale.FormatPicker : He.Window { }; main.append (button_box); - var cancel_button = new He.TextButton (_("Cancel")); + var cancel_button = new He.Button (null, _("Cancel")) { + is_textual = true + }; cancel_button.set_size_request (200, -1); cancel_button.clicked.connect (() => { this.destroy (); }); button_box.append (cancel_button); - var apply_button = new He.FillButton (_("Set Format")) { + var apply_button = new He.Button (null, _("Set Format")) { sensitive = false, + is_fill = true }; apply_button.set_size_request (200, -1); apply_button.clicked.connect (() => { diff --git a/fuses/locale/LanguagePicker.vala b/fuses/locale/LanguagePicker.vala index 4920cd4..850cedd 100644 --- a/fuses/locale/LanguagePicker.vala +++ b/fuses/locale/LanguagePicker.vala @@ -58,14 +58,17 @@ class Locale.LanguagePicker : He.Window { }; content.append (button_box); - var cancel_button = new He.TextButton (_("Cancel")); + var cancel_button = new He.Button (null, _("Cancel")) { + is_textual = true + }; cancel_button.clicked.connect (() => { this.destroy (); }); button_box.append (cancel_button); - var apply_button = new He.FillButton (_("Set Language")) { + var apply_button = new He.Button (null, _("Set Language")) { sensitive = false, + is_fill = true }; apply_button.clicked.connect (() => { var selected = listbox.get_selected_row () as Locale.LocaleRow; diff --git a/fuses/locale/LocaleView.vala b/fuses/locale/LocaleView.vala index 8466fec..d777e1f 100644 --- a/fuses/locale/LocaleView.vala +++ b/fuses/locale/LocaleView.vala @@ -41,7 +41,9 @@ public class Locale.LocaleView : Gtk.Box { var mbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 6); - var language_button = new He.DisclosureButton ("document-edit-symbolic"); + var language_button = new He.Button ("document-edit-symbolic", null) { + is_disclosure = true + }; language_button.clicked.connect (() => { var dialog = new Locale.LanguagePicker (He.Misc.find_ancestor_of_type (mbox)); dialog.show (); @@ -70,7 +72,9 @@ public class Locale.LocaleView : Gtk.Box { }); mbox.append (language_block); - var format_button = new He.DisclosureButton ("document-edit-symbolic"); + var format_button = new He.Button ("document-edit-symbolic", null) { + is_disclosure = true + }; format_button.clicked.connect (() => { var dialog = new Locale.FormatPicker (He.Misc.find_ancestor_of_type (mbox)); dialog.show (); diff --git a/fuses/mouse/LayoutPageDisplay.vala b/fuses/mouse/LayoutPageDisplay.vala index 7d4c448..aaf602f 100644 --- a/fuses/mouse/LayoutPageDisplay.vala +++ b/fuses/mouse/LayoutPageDisplay.vala @@ -22,10 +22,10 @@ public class Mouse.LayoutPageDisplay : Gtk.Frame { private SourceSettings settings; private Gtk.TreeView tree; - private He.IconicButton up_button; - private He.IconicButton down_button; - private He.IconicButton add_button; - private He.IconicButton remove_button; + private He.Button up_button; + private He.Button down_button; + private He.Button add_button; + private He.Button remove_button; /* * Set to true when the user has just clicked on the list to prevent @@ -53,22 +53,26 @@ public class Mouse.LayoutPageDisplay : Gtk.Frame { }; scroll.set_child (tree); - add_button = new He.IconicButton ("list-add-symbolic") { - tooltip_text = _("Add…") + add_button = new He.Button ("list-add-symbolic", null) { + tooltip_text = _("Add…"), + is_iconic = true }; - remove_button = new He.IconicButton ("list-remove-symbolic") { + remove_button = new He.Button ("list-remove-symbolic", null) { sensitive = false, + is_iconic = true, tooltip_text = _("Remove") }; - up_button = new He.IconicButton ("go-up-symbolic") { + up_button = new He.Button ("go-up-symbolic", null) { sensitive = false, + is_iconic = true, tooltip_text = _("Move up") }; - down_button = new He.IconicButton ("go-down-symbolic") { + down_button = new He.Button ("go-down-symbolic", null) { sensitive = false, + is_iconic = true, tooltip_text = _("Move down") }; @@ -386,9 +390,10 @@ public class Mouse.AddLayoutDialog : He.Window { input_language_grid.attach (search_entry, 0, 0); input_language_grid.attach (input_language_scrolled, 0, 1); - var back_button = new He.DisclosureButton ("") { + var back_button = new He.Button (null, null) { halign = Gtk.Align.START, hexpand = true, + is_disclosure = true, icon = "go-previous-symbolic" }; @@ -406,7 +411,8 @@ public class Mouse.AddLayoutDialog : He.Window { }; layout_scrolled.set_child (layout_list_box); - var keyboard_map_button = new He.TintButton (_("Preview Layout")) { + var keyboard_map_button = new He.Button (null, _("Preview Layout")) { + is_tint = true, halign = Gtk.Align.END }; @@ -439,7 +445,9 @@ public class Mouse.AddLayoutDialog : He.Window { frame_grid.attach (header_revealer, 0, 0); frame_grid.attach (deck, 0, 1); - var button_add = new He.PillButton (_("Add Layout")); + var button_add = new He.Button (null, _("Add Layout")) { + is_pill = true + }; button_add.sensitive = false; var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 12) { diff --git a/fuses/sound/src/OutputPanel.vala b/fuses/sound/src/OutputPanel.vala index 4315f27..6951714 100644 --- a/fuses/sound/src/OutputPanel.vala +++ b/fuses/sound/src/OutputPanel.vala @@ -256,7 +256,9 @@ public class Sound.OutputPanel : Gtk.Grid { private void audio_alert_dialog_cb () { var settings = new GLib.Settings ("com.fyralabs.Fusebox"); if (volume_scale.scale.get_value () > (float) 70.0) { - var ok_button = new He.FillButton ("Understood"); + var ok_button = new He.Button (null, "Understood") { + is_fill = true + }; var volume_alert_dialog = new He.Dialog ( true,