From f4f41d9db5af3999a99d5c00ad33c0353fe693f9 Mon Sep 17 00:00:00 2001 From: Adrien Plazas Date: Thu, 15 Jul 2021 09:35:32 +0200 Subject: [PATCH] main-window: Make it a HdyApplicationWindow This gives the window some nice rounded corners, and gives us more freedom in how to implement the UI. This purposefully leaves the indentation broken to ease code review, it will be fixed in the next commit. --- src/calls-main-window.c | 4 ++-- src/calls-main-window.h | 4 ++-- src/ui/main-window.ui | 38 ++++++++++++++++++++++---------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/calls-main-window.c b/src/calls-main-window.c index 57c3fd3..b764547 100644 --- a/src/calls-main-window.c +++ b/src/calls-main-window.c @@ -42,7 +42,7 @@ struct _CallsMainWindow { - GtkApplicationWindow parent_instance; + HdyApplicationWindow parent_instance; GListModel *record_store; @@ -67,7 +67,7 @@ struct _CallsMainWindow GtkButton *ussd_reply_button; }; -G_DEFINE_TYPE (CallsMainWindow, calls_main_window, GTK_TYPE_APPLICATION_WINDOW); +G_DEFINE_TYPE (CallsMainWindow, calls_main_window, HDY_TYPE_APPLICATION_WINDOW); enum { PROP_0, diff --git a/src/calls-main-window.h b/src/calls-main-window.h index 2627704..a058ff4 100644 --- a/src/calls-main-window.h +++ b/src/calls-main-window.h @@ -25,13 +25,13 @@ #ifndef CALLS_MAIN_WINDOW_H__ #define CALLS_MAIN_WINDOW_H__ -#include +#include G_BEGIN_DECLS #define CALLS_TYPE_MAIN_WINDOW (calls_main_window_get_type ()) -G_DECLARE_FINAL_TYPE (CallsMainWindow, calls_main_window, CALLS, MAIN_WINDOW, GtkApplicationWindow); +G_DECLARE_FINAL_TYPE (CallsMainWindow, calls_main_window, CALLS, MAIN_WINDOW, HdyApplicationWindow); CallsMainWindow *calls_main_window_new (GtkApplication *application, GListModel *record_store); diff --git a/src/ui/main-window.ui b/src/ui/main-window.ui index c6393aa..d2fcf37 100644 --- a/src/ui/main-window.ui +++ b/src/ui/main-window.ui @@ -3,12 +3,33 @@ -