[eog] Tweak statusbar ui



commit d0d42990888d282d5a322ab42b23c1c541d62499
Author: Trinh Anh Ngoc <atw1990 gmail com>
Date:   Tue Oct 27 13:52:23 2015 +0700

    Tweak statusbar ui

 data/eog.css        |    4 ++++
 src/eog-statusbar.c |   18 +++++-------------
 2 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/data/eog.css b/data/eog.css
index 4d4be3c..b82e0da 100644
--- a/data/eog.css
+++ b/data/eog.css
@@ -18,3 +18,7 @@ EogScrollView GtkOverlay GtkButton:hover,
 EogScrollView GtkOverlay GtkButton:prelight {
        opacity: 1.0;
 }
+
+EogStatusbar {
+       border-top: 1px solid @borders;
+}
diff --git a/src/eog-statusbar.c b/src/eog-statusbar.c
index 52c7435..7ddd836 100644
--- a/src/eog-statusbar.c
+++ b/src/eog-statusbar.c
@@ -50,18 +50,19 @@ eog_statusbar_init (EogStatusbar *statusbar)
        EogStatusbarPrivate *priv;
        GtkWidget *vbox;
 
+       g_object_set (statusbar, "margin", 0, NULL);
+
        statusbar->priv = eog_statusbar_get_instance_private (statusbar);
        priv = statusbar->priv;
 
        priv->img_num_label = gtk_label_new (NULL);
-       gtk_widget_set_size_request (priv->img_num_label, 100, 10);
        gtk_widget_show (priv->img_num_label);
 
        gtk_box_pack_end (GTK_BOX (statusbar),
                          priv->img_num_label,
                          FALSE,
                          TRUE,
-                         0);
+                         6);
 
        vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
 
@@ -69,25 +70,16 @@ eog_statusbar_init (EogStatusbar *statusbar)
                          vbox,
                          FALSE,
                          FALSE,
-                         2);
+                         6);
 
        statusbar->priv->progressbar = gtk_progress_bar_new ();
 
        gtk_box_pack_end (GTK_BOX (vbox),
                          priv->progressbar,
                          TRUE,
-                         TRUE,
+                         FALSE,
                          0);
 
-       /* Set margins by hand to avoid causing redraws due to the statusbar
-        * becoming too small for the progressbar */
-       gtk_widget_set_margin_start (priv->progressbar, 2);
-       gtk_widget_set_margin_end (priv->progressbar, 2);
-       gtk_widget_set_margin_top (priv->progressbar, 1);
-       gtk_widget_set_margin_bottom (priv->progressbar, 0);
-
-       gtk_widget_set_size_request (priv->progressbar, -1, 10);
-
        gtk_widget_show (vbox);
 
        gtk_widget_hide (statusbar->priv->progressbar);


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