Skip to content

Commit

Permalink
lock-plug: Only scale lock-screen widgets on older versions of GTK
Browse files Browse the repository at this point in the history
  • Loading branch information
vkareh authored and raveit65 committed Aug 13, 2018
1 parent 0c12ca0 commit 762ae73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gs-lock-plug.c
Expand Up @@ -976,6 +976,7 @@ set_face_image (GSLockPlug *plug)
return TRUE;
}

#if !GTK_CHECK_VERSION (3, 23, 0)
static void
gs_lock_plug_get_preferred_width (GtkWidget *widget, gint *minimum_width, gint *natural_width)
{
Expand All @@ -999,6 +1000,7 @@ gs_lock_plug_get_preferred_height_for_width (GtkWidget *widget, gint width, gint
*minimum_height /= scale;
*natural_height /= scale;
}
#endif

static void
gs_lock_plug_show (GtkWidget *widget)
Expand Down Expand Up @@ -1274,8 +1276,10 @@ gs_lock_plug_class_init (GSLockPlugClass *klass)
widget_class->style_set = gs_lock_plug_style_set;
widget_class->show = gs_lock_plug_show;
widget_class->hide = gs_lock_plug_hide;
#if !GTK_CHECK_VERSION (3, 23, 0)
widget_class->get_preferred_width = gs_lock_plug_get_preferred_width;
widget_class->get_preferred_height_for_width = gs_lock_plug_get_preferred_height_for_width;
#endif

klass->close = gs_lock_plug_close;

Expand Down

0 comments on commit 762ae73

Please sign in to comment.