diff options
author | raveit65 <[email protected]> | 2015-09-02 17:03:24 +0200 |
---|---|---|
committer | infirit <[email protected]> | 2015-09-06 13:08:32 +0200 |
commit | ba88c34448a631f976351150a5f2fa4daec7cb95 (patch) | |
tree | e55d9c2d15235472ecc57dbcb1add770fdb8d1a3 /src/eom-thumb-nav.c | |
parent | b8278cd18980f51a64053d334febf2fd5fe4de94 (diff) | |
download | eom-ba88c34448a631f976351150a5f2fa4daec7cb95.tar.bz2 eom-ba88c34448a631f976351150a5f2fa4daec7cb95.tar.xz |
Gtk3: Stop deprecated GtkArrow usage
Use a matching GtkImage instead
Since gtkarrow scaling doesn't work in themes,
the arrow displays almost to huge and looks ugly.
taken from:
https://git.gnome.org/browse/eog/commit/?id=096806f
https://git.gnome.org/browse/eog/commit/?id=27fb212
Diffstat (limited to 'src/eom-thumb-nav.c')
-rw-r--r-- | src/eom-thumb-nav.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/eom-thumb-nav.c b/src/eom-thumb-nav.c index 11fd211..6e1cb66 100644 --- a/src/eom-thumb-nav.c +++ b/src/eom-thumb-nav.c @@ -363,15 +363,19 @@ eom_thumb_nav_init (EomThumbNav *nav) priv->show_buttons = TRUE; - priv->button_left = gtk_button_new (); + priv->button_left = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (priv->button_left), GTK_RELIEF_NONE); +#if GTK_CHECK_VERSION (3, 14, 0) + arrow = gtk_image_new_from_icon_name ("pan-start-symbolic", GTK_ICON_SIZE_BUTTON); +#else arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_ETCHED_IN); +#endif gtk_container_add (GTK_CONTAINER (priv->button_left), arrow); gtk_widget_set_size_request (GTK_WIDGET (priv->button_left), 25, 0); - gtk_box_pack_start (GTK_BOX (nav), priv->button_left, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (nav), priv->button_left, FALSE, FALSE, 0); g_signal_connect (priv->button_left, "clicked", @@ -416,17 +420,21 @@ eom_thumb_nav_init (EomThumbNav *nav) G_CALLBACK (eom_thumb_nav_adj_value_changed), nav); - gtk_box_pack_start (GTK_BOX (nav), priv->sw, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (nav), priv->sw, TRUE, TRUE, 0); - priv->button_right = gtk_button_new (); + priv->button_right = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (priv->button_right), GTK_RELIEF_NONE); +#if GTK_CHECK_VERSION (3, 14, 0) + arrow = gtk_image_new_from_icon_name ("pan-end-symbolic", GTK_ICON_SIZE_BUTTON); +#else arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE); +#endif gtk_container_add (GTK_CONTAINER (priv->button_right), arrow); gtk_widget_set_size_request (GTK_WIDGET (priv->button_right), 25, 0); - gtk_box_pack_start (GTK_BOX (nav), priv->button_right, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (nav), priv->button_right, FALSE, FALSE, 0); g_signal_connect (priv->button_right, "clicked", |