[Xfce4-commits] <xfce4-indicator-plugin:master> Fixed a regression, inconsistent border sizes.

Andrzej noreply at xfce.org
Thu Apr 4 17:44:29 CEST 2013


Updating branch refs/heads/master
         to 8eb305349bff65313d8300defa8918675cc38bf6 (commit)
       from 81c78516eec9103da0ba00c79ab2d936a91b6c99 (commit)

commit 8eb305349bff65313d8300defa8918675cc38bf6
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Thu Mar 14 01:22:35 2013 +0000

    Fixed a regression, inconsistent border sizes.
    
    Not sure why different buttons had different x/ythickness values.
    Fixed that by checking container's style. Also, reduced the border
    size by 2px.

 panel-plugin/indicator-button.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/indicator-button.c b/panel-plugin/indicator-button.c
index 98f547d..0508674 100644
--- a/panel-plugin/indicator-button.c
+++ b/panel-plugin/indicator-button.c
@@ -469,8 +469,8 @@ xfce_indicator_button_get_icon_size (XfceIndicatorButton *button)
 
   indicator_size = xfce_indicator_button_get_size (button);
 
-  style = gtk_widget_get_style (GTK_WIDGET (button));
-  border_thickness = 2 * MAX (style->xthickness, style->ythickness) + 2;
+  style = gtk_widget_get_style (GTK_WIDGET (button->plugin));
+  border_thickness = 2 * MAX (style->xthickness, style->ythickness);
 
   return MIN (indicator_size - border_thickness,
               indicator_config_get_icon_size_max (button->config));
@@ -486,8 +486,8 @@ xfce_indicator_button_get_size (XfceIndicatorButton *button)
 
   g_return_val_if_fail (XFCE_IS_INDICATOR_BUTTON (button), 24);
 
-  style = gtk_widget_get_style (GTK_WIDGET (button));
-  border_thickness = 2 * MAX (style->xthickness, style->ythickness) + 2;
+  style = gtk_widget_get_style (GTK_WIDGET (button->plugin));
+  border_thickness = 2 * MAX (style->xthickness, style->ythickness) ;
 
   return MIN (indicator_config_get_panel_size (button->config) /
               indicator_config_get_nrows (button->config),


More information about the Xfce4-commits mailing list