[nautilus/wip/antoniof/gtk4-preparation-discontinued-api: 69/73] general: Stop using GtkButton:relief and GtkScrolledWindow:shadow-type




commit df15f206f0414b3e5f1a9a0674beeeb384459355
Author: António Fernandes <antoniof gnome org>
Date:   Thu Dec 16 01:52:06 2021 +0000

    general: Stop using GtkButton:relief and GtkScrolledWindow:shadow-type
    
    Both properties are gone in GTK 4. Use style classes instead.

 src/nautilus-notebook.c                          | 4 ++--
 src/resources/ui/nautilus-batch-rename-dialog.ui | 8 ++++++--
 src/resources/ui/nautilus-column-chooser.ui      | 4 +++-
 src/resources/ui/nautilus-window.ui              | 4 ++--
 4 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index 7a7212945..755c8c7e8 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -374,8 +374,8 @@ build_tab_label (NautilusNotebook   *notebook,
 
     /* Tab close button */
     close_button = gtk_button_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_MENU);
-    gtk_button_set_relief (GTK_BUTTON (close_button),
-                           GTK_RELIEF_NONE);
+    gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (close_button)),
+                                 "flat");
     /* don't allow focus on the close button */
     gtk_widget_set_focus_on_click (close_button, FALSE);
 
diff --git a/src/resources/ui/nautilus-batch-rename-dialog.ui 
b/src/resources/ui/nautilus-batch-rename-dialog.ui
index 025628d9a..8920e4b20 100644
--- a/src/resources/ui/nautilus-batch-rename-dialog.ui
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -369,7 +369,6 @@
                     <child>
                       <object class="GtkButton" id="conflict_down">
                         <property name="visible">True</property>
-                        <property name="relief">none</property>
                          <signal name="clicked" handler="select_next_conflict_down" swapped="yes" />
                         <child>
                           <object class="GtkImage">
@@ -378,12 +377,14 @@
                             <property name="icon-size">1</property>
                           </object>
                         </child>
+                        <style>
+                          <class name="flat"/>
+                        </style>
                       </object>
                     </child>
                     <child>
                       <object class="GtkButton" id="conflict_up">
                         <property name="visible">True</property>
-                        <property name="relief">GTK_RELIEF_NONE</property>
                         <signal name="clicked" handler="select_next_conflict_up" swapped="yes" />
                         <child>
                           <object class="GtkImage">
@@ -392,6 +393,9 @@
                             <property name="icon-size">1</property>
                           </object>
                         </child>
+                        <style>
+                          <class name="flat"/>
+                        </style>
                       </object>
                     </child>
                   </object>
diff --git a/src/resources/ui/nautilus-column-chooser.ui b/src/resources/ui/nautilus-column-chooser.ui
index 21af73ae2..5f44ea8f9 100644
--- a/src/resources/ui/nautilus-column-chooser.ui
+++ b/src/resources/ui/nautilus-column-chooser.ui
@@ -22,7 +22,6 @@
       <object class="GtkScrolledWindow">
         <property name="visible">True</property>
         <property name="can-focus">False</property>
-        <property name="shadow-type">in</property>
         <child>
           <object class="GtkTreeView" id="view">
             <property name="visible">True</property>
@@ -63,6 +62,9 @@
             </child>
           </object>
         </child>
+        <style>
+          <class name="frame"/>
+        </style>
       </object>
       <packing>
         <property name="expand">False</property>
diff --git a/src/resources/ui/nautilus-window.ui b/src/resources/ui/nautilus-window.ui
index 407014ecc..472ee7fce 100644
--- a/src/resources/ui/nautilus-window.ui
+++ b/src/resources/ui/nautilus-window.ui
@@ -80,7 +80,6 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
-                                <property name="relief">none</property>
                                 <property name="focus_on_click">False</property>
                                 <child>
                                   <object class="GtkImage">
@@ -92,6 +91,7 @@
                                 </child>
                                 <style>
                                   <class name="image-button"/>
+                                  <class name="flat"/>
                                 </style>
                               </object>
                             </child>
@@ -148,7 +148,6 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">True</property>
-                                <property name="relief">none</property>
                                 <property name="focus_on_click">False</property>
                                 <signal name="clicked" handler="on_notification_operation_close_clicked" 
object="NautilusWindow" swapped="no"/>
                                 <child>
@@ -161,6 +160,7 @@
                                 </child>
                                 <style>
                                   <class name="image-button"/>
+                                  <class name="flat"/>
                                 </style>
                               </object>
                             </child>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]