[nautilus/wip/cdavis/hdywindow: 4/4] properties-window: Make bottom corners rounded
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/cdavis/hdywindow: 4/4] properties-window: Make bottom corners rounded
- Date: Tue, 9 Feb 2021 00:40:09 +0000 (UTC)
commit a35b6befb4b127cd47b79a5cc3012f3f6eb36d08
Author: Christopher Davis <brainblasted disroot org>
Date: Sat Feb 6 15:48:44 2021 -0800
properties-window: Make bottom corners rounded
As we have already done for the app's main window.
In this case, we must use HdyWindow.
src/nautilus-properties-window.c | 4 ++--
src/nautilus-properties-window.h | 3 ++-
src/resources/ui/nautilus-properties-window.ui | 19 ++++++++++---------
3 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index d21d6a56c..ec20ca0cb 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -74,7 +74,7 @@ typedef struct
struct _NautilusPropertiesWindow
{
- GtkWindow parent_instance;
+ HdyWindow parent_instance;
GList *original_files;
GList *target_files;
@@ -315,7 +315,7 @@ static void name_field_activate (GtkWidget *name_field,
gpointer user_data);
static void setup_pie_widget (NautilusPropertiesWindow *self);
-G_DEFINE_TYPE (NautilusPropertiesWindow, nautilus_properties_window, GTK_TYPE_WINDOW);
+G_DEFINE_TYPE (NautilusPropertiesWindow, nautilus_properties_window, HDY_TYPE_WINDOW);
static gboolean
is_multi_file_window (NautilusPropertiesWindow *self)
diff --git a/src/nautilus-properties-window.h b/src/nautilus-properties-window.h
index c1b44a103..84f8166a9 100644
--- a/src/nautilus-properties-window.h
+++ b/src/nautilus-properties-window.h
@@ -24,12 +24,13 @@
#pragma once
#include <gtk/gtk.h>
+#include <libhandy-1/handy.h>
#define NAUTILUS_TYPE_PROPERTIES_WINDOW (nautilus_properties_window_get_type ())
G_DECLARE_FINAL_TYPE (NautilusPropertiesWindow, nautilus_properties_window,
NAUTILUS, PROPERTIES_WINDOW,
- GtkWindow)
+ HdyWindow)
typedef void (* NautilusPropertiesWindowCallback) (gpointer callback_data);
diff --git a/src/resources/ui/nautilus-properties-window.ui b/src/resources/ui/nautilus-properties-window.ui
index 23916f5a2..4ffc5932e 100644
--- a/src/resources/ui/nautilus-properties-window.ui
+++ b/src/resources/ui/nautilus-properties-window.ui
@@ -2,7 +2,7 @@
<!-- Generated with glade 3.36.0 -->
<interface>
<requires lib="gtk+" version="3.20"/>
- <template class="NautilusPropertiesWindow" parent="GtkWindow">
+ <template class="NautilusPropertiesWindow" parent="HdyWindow">
<property name="can_focus">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property>
@@ -10,6 +10,15 @@
<object class="GtkBox" id="content_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="HdyHeaderBar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_close_button">True</property>
+ <property name="title" bind-source="NautilusPropertiesWindow" bind-property="title"
bind-flags="sync-create"/>
+ </object>
+ </child>
<child>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
@@ -1390,19 +1399,11 @@
<placeholder/>
</child>
</object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
</child>
<style>
<class name="view"/>
</style>
</object>
</child>
- <child type="titlebar">
- <placeholder/>
- </child>
</template>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]