summaryrefslogtreecommitdiff
path: root/xfce4-session
diff options
context:
space:
mode:
authorSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2019-06-27 01:39:10 +0200
committerSimon Steinbeiss <simon.steinbeiss@elfenbeinturm.at>2019-06-29 00:26:38 +0200
commit7e00dcf456e2c6bc05ab51e662e8c5cc0625d181 (patch)
tree9ca95c7f7fd5ac1ad53215e51ad767d0e876007c /xfce4-session
parent1ca6ba963450ce1193aa9c164c84b25a557109eb (diff)
downloadxfce4-session-7e00dcf456e2c6bc05ab51e662e8c5cc0625d181.tar.gz
Reset font-size of logout dialog to default (Bug #15505)
The keycap class sets a smaller font by default in Adwaita.
Diffstat (limited to 'xfce4-session')
-rw-r--r--xfce4-session/xfsm-logout-dialog.c55
1 files changed, 31 insertions, 24 deletions
diff --git a/xfce4-session/xfsm-logout-dialog.c b/xfce4-session/xfsm-logout-dialog.c
index 4af0bce9..6feca03d 100644
--- a/xfce4-session/xfsm-logout-dialog.c
+++ b/xfce4-session/xfsm-logout-dialog.c
@@ -131,30 +131,31 @@ xfsm_logout_dialog_class_init (XfsmLogoutDialogClass *klass)
static void
xfsm_logout_dialog_init (XfsmLogoutDialog *dialog)
{
- const gchar *username;
- GtkWidget *label;
- gchar *label_str;
- PangoAttrList *attrs;
- GtkWidget *vbox;
- GtkWidget *button_vbox;
- GtkWidget *main_vbox;
- GtkWidget *hbox;
- GtkWidget *button;
- gboolean can_shutdown;
- gboolean save_session = FALSE;
- gboolean can_restart;
- gboolean can_suspend = FALSE;
- gboolean can_hibernate = FALSE;
- gboolean can_hybrid_sleep = FALSE;
- gboolean can_switch_user = FALSE;
- gboolean auth_suspend = FALSE;
- gboolean auth_hibernate = FALSE;
- gboolean auth_hybrid_sleep = FALSE;
- GError *error = NULL;
- XfconfChannel *channel;
- GtkWidget *image;
- GtkWidget *separator;
- gboolean upower_not_found = FALSE;
+ const gchar *username;
+ GtkWidget *label;
+ gchar *label_str;
+ PangoAttrList *attrs;
+ GtkWidget *vbox;
+ GtkWidget *button_vbox;
+ GtkWidget *main_vbox;
+ GtkWidget *hbox;
+ GtkWidget *button;
+ gboolean can_shutdown;
+ gboolean save_session = FALSE;
+ gboolean can_restart;
+ gboolean can_suspend = FALSE;
+ gboolean can_hibernate = FALSE;
+ gboolean can_hybrid_sleep = FALSE;
+ gboolean can_switch_user = FALSE;
+ gboolean auth_suspend = FALSE;
+ gboolean auth_hibernate = FALSE;
+ gboolean auth_hybrid_sleep = FALSE;
+ GError *error = NULL;
+ XfconfChannel *channel;
+ GtkWidget *image;
+ GtkWidget *separator;
+ gboolean upower_not_found = FALSE;
+ GtkCssProvider *provider;
dialog->type_clicked = XFSM_SHUTDOWN_LOGOUT;
dialog->shutdown = xfsm_shutdown_get ();
@@ -165,6 +166,12 @@ xfsm_logout_dialog_init (XfsmLogoutDialog *dialog)
/* Use Adwaita's keycap style to get a meaningful look out of the box */
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (dialog)), "keycap");
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (dialog)), "xfsm-logout-dialog");
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_data (provider, ".xfsm-logout-dialog { font-size: initial; }", -1, NULL);
+ gtk_style_context_add_provider (gtk_widget_get_style_context (GTK_WIDGET (dialog)),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref (provider);
/* load xfconf settings */
channel = xfsm_open_config ();