[gnome-themes-standard] Bug 641859 - fill-level on scales looks bad
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-themes-standard] Bug 641859 - fill-level on scales looks bad
- Date: Mon, 14 Feb 2011 17:27:03 +0000 (UTC)
commit 5a9cccc7e956adeb0297ae3c87a3de2186dc44f1
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Feb 14 18:24:57 2011 +0100
Bug 641859 - fill-level on scales looks bad
Render the sliders' fill level as thin as the trough. Reported
by Bastien Nocera.
src/adwaita_engine.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/adwaita_engine.c b/src/adwaita_engine.c
index ed7bc00..4bb26c4 100644
--- a/src/adwaita_engine.c
+++ b/src/adwaita_engine.c
@@ -542,7 +542,26 @@ adwaita_engine_render_activity (GtkThemingEngine *engine,
gdouble width,
gdouble height)
{
+ const GtkWidgetPath *path;
+
cairo_save (cr);
+ path = gtk_theming_engine_get_path (engine);
+
+ if (gtk_widget_path_is_type (path, GTK_TYPE_SCALE) &&
+ gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_PROGRESSBAR))
+ {
+ /* Render GtkScale fill level thinner */
+ if (!gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_VERTICAL))
+ {
+ y += height / 2 - 3;
+ height = 6;
+ }
+ else
+ {
+ x += width / 2 - 3;
+ width = 6;
+ }
+ }
GTK_THEMING_ENGINE_CLASS (adwaita_engine_parent_class)->render_activity (engine, cr,
x, y, width, height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]