[gtk+/gtk-style-context: 132/251] GtkThemingEngine: Improve slider rendering.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 132/251] GtkThemingEngine: Improve slider rendering.
- Date: Tue, 12 Oct 2010 02:06:13 +0000 (UTC)
commit ee2f4cfc09f19c8031afdd70d77933717c4c8ae3
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jul 19 12:00:07 2010 +0200
GtkThemingEngine: Improve slider rendering.
gtk/gtkthemingengine.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index 7457bc3..5f34ce3 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -1369,22 +1369,30 @@ gtk_theming_engine_render_slider (GtkThemingEngine *engine,
GtkOrientation orientation)
{
const GtkWidgetPath *path;
+ gint thickness;
path = gtk_theming_engine_get_path (engine);
gtk_theming_engine_render_background (engine, cr, x, y, width, height);
gtk_theming_engine_render_frame (engine, cr, x, y, width, height);
- if (gtk_widget_path_has_parent (path, GTK_TYPE_SCALE))
+ /* FIXME: thickness */
+ thickness = 2;
+
+ if (gtk_widget_path_is_type (path, GTK_TYPE_SCALE))
{
if (orientation == GTK_ORIENTATION_VERTICAL)
gtk_theming_engine_render_line (engine, cr,
- x + 2, y + height / 2 - 1,
- x + width - 4, y + height / 2 - 1);
+ x + thickness,
+ y + (gint) height / 2,
+ x + width - thickness - 1,
+ y + (gint) height / 2);
else
gtk_theming_engine_render_line (engine, cr,
- x + width / 2 - 1, y + 4,
- x + width / 2 - 1, y + height - 4);
+ x + (gint) width / 2,
+ y + thickness,
+ x + (gint) width / 2,
+ y + height - thickness - 1);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]