[nautilus/gtk4-preparation-trunk: 42/49] general: Stop using GtkButton:relief and GtkScrolledWindow:shadow-type




commit 23066051aaa92ff2afc18fab66fa90b1f51195e6
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 b7134eb3f..d71e2f331 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -267,8 +267,8 @@ build_tab_label (GtkNotebook        *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 2daf8161b..4f84fb5bf 100644
--- a/src/resources/ui/nautilus-batch-rename-dialog.ui
+++ b/src/resources/ui/nautilus-batch-rename-dialog.ui
@@ -459,7 +459,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">
@@ -468,12 +467,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">
@@ -482,6 +483,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 0d5d55077..c9f2b4eff 100644
--- a/src/resources/ui/nautilus-window.ui
+++ b/src/resources/ui/nautilus-window.ui
@@ -108,7 +108,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">
@@ -120,6 +119,7 @@
                                 </child>
                                 <style>
                                   <class name="image-button"/>
+                                  <class name="flat"/>
                                 </style>
                               </object>
                             </child>
@@ -176,7 +176,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>
@@ -189,6 +188,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]