[gnome-themes-standard] progressbar: remove hack to draw the progressbar fill over the trough



commit ec8a9376c0a4caa324c80d5800467f6b1fefc584
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri May 6 15:14:09 2011 -0400

    progressbar: remove hack to draw the progressbar fill over the trough
    
    It's not needed anymore now that things have been fixed in GTK+ proper.

 src/adwaita_engine.c                   |   46 --------------------------------
 themes/Adwaita/gtk-3.0/gtk-widgets.css |    5 +++
 2 files changed, 5 insertions(+), 46 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index 1de8b80..c3acea7 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -726,29 +726,6 @@ adwaita_engine_render_frame (GtkThemingEngine *engine,
 			}
 		}
 
-		if (gtk_widget_path_is_type (path, GTK_TYPE_PROGRESS_BAR) &&
-		    gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_TROUGH)) {
-			GtkBorder *border_width;
-			gint border_line;
-
-			/* draw the border inside the trough itself, so it will
-			 * be overdrawn by the fill.
-			 */
-			gtk_theming_engine_get (engine, state,
-						"border-width", &border_width,
-						NULL);
-
-			border_line = MIN (MIN (border_width->top, border_width->bottom),
-					   MIN (border_width->left, border_width->right));
-
-			y += border_line;
-			x += border_line;
-			width -= 2 * border_line;
-			height -= 2 * border_line;
-
-			gtk_border_free (border_width);
-		}
-
 		render_frame_default (engine, cr, x, y, width, height);
 	}
 
@@ -918,29 +895,6 @@ adwaita_engine_render_background (GtkThemingEngine *engine,
 		}
 	}
 
-	if (gtk_widget_path_is_type (path, GTK_TYPE_PROGRESS_BAR) &&
-	    gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_TROUGH)) {
-		GtkBorder *border_width;
-		gint border_line;
-
-		/* draw the border inside the trough itself, so it will
-		 * be overdrawn by the fill.
-		 */
-		gtk_theming_engine_get (engine, state,
-					"border-width", &border_width,
-					NULL);
-
-		border_line = MIN (MIN (border_width->top, border_width->bottom),
-				   MIN (border_width->left, border_width->right));
-
-		y += border_line;
-		x += border_line;
-		width -= 2 * border_line;
-		height -= 2 * border_line;
-
-		gtk_border_free (border_width);
-	}
-
 	GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_background (engine, cr, x, y,
 										   width, height);
 
diff --git a/themes/Adwaita/gtk-3.0/gtk-widgets.css b/themes/Adwaita/gtk-3.0/gtk-widgets.css
index 21244fc..7fb8eaa 100644
--- a/themes/Adwaita/gtk-3.0/gtk-widgets.css
+++ b/themes/Adwaita/gtk-3.0/gtk-widgets.css
@@ -238,6 +238,11 @@ GtkProgressBar.trough,
                                      to (mix (@trough_bg_color_b, @theme_selected_bg_color, 0.25)));
 }
 
+GtkProgressBar,
+.trough row {
+    padding: 0;
+}
+
 /************
  * GtkScale *
  ************/



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