[totem] backend: Make cogwheel button square



commit 74e0b9d41fdc506b6ebf5da30aaa16e04dd3afa1
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jan 17 15:44:30 2014 +0100

    backend: Make cogwheel button square
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699237

 src/backend/bacon-video-header-actor.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-header-actor.c b/src/backend/bacon-video-header-actor.c
index 4c3b3a8..08668f2 100644
--- a/src/backend/bacon-video-header-actor.c
+++ b/src/backend/bacon-video-header-actor.c
@@ -75,10 +75,14 @@ add_button (BaconVideoHeaderActor *header,
            const char            *object_name)
 {
        GtkWidget *image;
+       GtkStyleContext *context;
 
        image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
        gtk_button_set_image (GTK_BUTTON (button), image);
        setup_object (header, object_name, button);
+       context = gtk_widget_get_style_context (button);
+       gtk_style_context_add_class (context, "image-button");
+       g_object_set (G_OBJECT (button), "valign", GTK_ALIGN_CENTER, NULL);
 
        gtk_header_bar_pack_end (GTK_HEADER_BAR (header->priv->widget), button);
        return button;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]