From 8ecb2626e3c035771285d0dc6f2993d75d7632c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 30 Jan 2026 08:26:15 -0800 Subject: [PATCH 1/2] Replace Granite StyleClass deprecations --- src/Access/Dialog.vala | 4 ++-- src/AppChooser/Dialog.vala | 2 +- src/ScreenCast/Dialog.vala | 2 +- src/ScreenCast/SelectionRow.vala | 4 ++-- src/Screenshot/SetupDialog.vala | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Access/Dialog.vala b/src/Access/Dialog.vala index d438c66d..58b32d29 100644 --- a/src/Access/Dialog.vala +++ b/src/Access/Dialog.vala @@ -64,10 +64,10 @@ public class Access.Dialog : Granite.MessageDialog, PantheonWayland.ExtendedBeha grant_button = add_button (_("Grant Access"), Gtk.ResponseType.OK) as Gtk.Button; if (action == ButtonAction.SUGGESTED) { - grant_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); + grant_button.add_css_class (Granite.CssClass.SUGGESTED); default_widget = grant_button; } else { - grant_button.add_css_class (Granite.STYLE_CLASS_DESTRUCTIVE_ACTION); + grant_button.add_css_class (Granite.CssClass.DESTRUCTIVE); default_widget = deny_button; } diff --git a/src/AppChooser/Dialog.vala b/src/AppChooser/Dialog.vala index 04495758..5373ef91 100644 --- a/src/AppChooser/Dialog.vala +++ b/src/AppChooser/Dialog.vala @@ -134,7 +134,7 @@ public class AppChooser.Dialog : Gtk.Window { open_button = new Gtk.Button.with_label (_("Open")) { receives_default = true }; - open_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); + open_button.add_css_class (Granite.CssClass.DESTRUCTIVE); var button_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { halign = Gtk.Align.END diff --git a/src/ScreenCast/Dialog.vala b/src/ScreenCast/Dialog.vala index 072daeba..8cade2b5 100644 --- a/src/ScreenCast/Dialog.vala +++ b/src/ScreenCast/Dialog.vala @@ -74,7 +74,7 @@ public class ScreenCast.Dialog : Granite.MessageDialog { add_button (_("Cancel"), Gtk.ResponseType.CANCEL); var accept_button = add_button (_("Share"), Gtk.ResponseType.ACCEPT); - accept_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); + accept_button.add_css_class (Granite.CssClass.DESTRUCTIVE); bind_property ("n-selected", accept_button, "sensitive", SYNC_CREATE, (binding, from_val, ref to_val) => { to_val.set_boolean (n_selected > 0); return true; diff --git a/src/ScreenCast/SelectionRow.vala b/src/ScreenCast/SelectionRow.vala index 58bb7c7e..e0703078 100644 --- a/src/ScreenCast/SelectionRow.vala +++ b/src/ScreenCast/SelectionRow.vala @@ -25,8 +25,8 @@ public class ScreenCast.SelectionRow : Gtk.ListBoxRow { wrap = true, xalign = 0 }; - description_label.add_css_class (Granite.STYLE_CLASS_DIM_LABEL); - description_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); + description_label.add_css_class (Granite.CssClass.DIM); + description_label.add_css_class (Granite.CssClass.SMALL); label_box.append (description_label); } diff --git a/src/Screenshot/SetupDialog.vala b/src/Screenshot/SetupDialog.vala index 18a83068..eb818ee8 100644 --- a/src/Screenshot/SetupDialog.vala +++ b/src/Screenshot/SetupDialog.vala @@ -55,7 +55,7 @@ public class Screenshot.SetupDialog : Gtk.Window { }; var all_label = new Gtk.Label (_("Screen")) ; - all_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); + all_label.add_css_class (Granite.CssClass.SMALL); var all_box = new Gtk.Box (VERTICAL, 3); all_box.append (all_image); @@ -73,7 +73,7 @@ public class Screenshot.SetupDialog : Gtk.Window { }; var curr_label = new Gtk.Label (_("Window")); - curr_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); + curr_label.add_css_class (Granite.CssClass.SMALL); var curr_box = new Gtk.Box (VERTICAL, 3); curr_box.append (curr_image); @@ -92,7 +92,7 @@ public class Screenshot.SetupDialog : Gtk.Window { }; var selection_label = new Gtk.Label (_("Area")); - selection_label.add_css_class (Granite.STYLE_CLASS_SMALL_LABEL); + selection_label.add_css_class (Granite.CssClass.SMALL); var selection_box = new Gtk.Box (VERTICAL, 3); selection_box.append (selection_image); @@ -133,7 +133,7 @@ public class Screenshot.SetupDialog : Gtk.Window { var take_btn = new Gtk.Button.with_label (_("Take Screenshot")) { receives_default = true }; - take_btn.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); + take_btn.add_css_class (Granite.CssClass.DESTRUCTIVE); take_btn.clicked.connect (() => { response (Gtk.ResponseType.OK); From c2aa699f87e5f85277b7fc5d30e5c6bc71d2360a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danielle=20For=C3=A9?= Date: Fri, 30 Jan 2026 09:19:44 -0800 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20destructive=20=E2=86=92=20suggested?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AppChooser/Dialog.vala | 2 +- src/ScreenCast/Dialog.vala | 2 +- src/Screenshot/SetupDialog.vala | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AppChooser/Dialog.vala b/src/AppChooser/Dialog.vala index 5373ef91..b6a68816 100644 --- a/src/AppChooser/Dialog.vala +++ b/src/AppChooser/Dialog.vala @@ -134,7 +134,7 @@ public class AppChooser.Dialog : Gtk.Window { open_button = new Gtk.Button.with_label (_("Open")) { receives_default = true }; - open_button.add_css_class (Granite.CssClass.DESTRUCTIVE); + open_button.add_css_class (Granite.CssClass.SUGGESTED); var button_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0) { halign = Gtk.Align.END diff --git a/src/ScreenCast/Dialog.vala b/src/ScreenCast/Dialog.vala index 8cade2b5..47fc3a00 100644 --- a/src/ScreenCast/Dialog.vala +++ b/src/ScreenCast/Dialog.vala @@ -74,7 +74,7 @@ public class ScreenCast.Dialog : Granite.MessageDialog { add_button (_("Cancel"), Gtk.ResponseType.CANCEL); var accept_button = add_button (_("Share"), Gtk.ResponseType.ACCEPT); - accept_button.add_css_class (Granite.CssClass.DESTRUCTIVE); + accept_button.add_css_class (Granite.CssClass.SUGGESTED); bind_property ("n-selected", accept_button, "sensitive", SYNC_CREATE, (binding, from_val, ref to_val) => { to_val.set_boolean (n_selected > 0); return true; diff --git a/src/Screenshot/SetupDialog.vala b/src/Screenshot/SetupDialog.vala index eb818ee8..9075fa44 100644 --- a/src/Screenshot/SetupDialog.vala +++ b/src/Screenshot/SetupDialog.vala @@ -133,7 +133,7 @@ public class Screenshot.SetupDialog : Gtk.Window { var take_btn = new Gtk.Button.with_label (_("Take Screenshot")) { receives_default = true }; - take_btn.add_css_class (Granite.CssClass.DESTRUCTIVE); + take_btn.add_css_class (Granite.CssClass.SUGGESTED); take_btn.clicked.connect (() => { response (Gtk.ResponseType.OK);