notifications-dialog: Make dialog adaptive
This commit is contained in:
parent
6df43c5b4f
commit
ed6ddf162a
3 changed files with 8 additions and 6 deletions
|
@ -49,7 +49,7 @@ static void update_sound_switch (CcAppNotificationsDialog *dialog);
|
|||
static void update_notification_switch (CcAppNotificationsDialog *dialog);
|
||||
|
||||
struct _CcAppNotificationsDialog {
|
||||
GtkDialog parent;
|
||||
HdyDialog parent;
|
||||
|
||||
GSettings *settings;
|
||||
GSettings *master_settings;
|
||||
|
@ -65,7 +65,7 @@ struct _CcAppNotificationsDialog {
|
|||
GtkWidget *lock_screen_content_switch;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, GTK_TYPE_DIALOG)
|
||||
G_DEFINE_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, HDY_TYPE_DIALOG)
|
||||
|
||||
static void
|
||||
on_perm_store_set_done (GObject *source_object,
|
||||
|
|
|
@ -20,11 +20,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#define HANDY_USE_UNSTABLE_API
|
||||
#include <handy.h>
|
||||
#undef HANDY_USE_UNSTABLE_API
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define CC_TYPE_APP_NOTIFICATIONS_DIALOG (cc_app_notifications_dialog_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, CC, APP_NOTIFICATIONS_DIALOG, GtkDialog)
|
||||
G_DECLARE_FINAL_TYPE (CcAppNotificationsDialog, cc_app_notifications_dialog, CC, APP_NOTIFICATIONS_DIALOG, HdyDialog)
|
||||
|
||||
CcAppNotificationsDialog *cc_app_notifications_dialog_new (const gchar *app_id,
|
||||
const gchar *title,
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="CcAppNotificationsDialog" parent="GtkDialog">
|
||||
<property name="width_request">450</property>
|
||||
<template class="CcAppNotificationsDialog" parent="HdyDialog">
|
||||
<property name="width_request">360</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="response" handler="gtk_widget_destroy" swapped="no"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue