[gtk+] gtkscale: Draw smaller marks
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkscale: Draw smaller marks
- Date: Fri, 5 Dec 2014 12:23:46 +0000 (UTC)
commit 0504328bd85cc674c011516e1442b3f50118e932
Author: Carlos Soriano <carlos sorian89 gmail com>
Date: Thu Dec 4 16:21:46 2014 +0100
gtkscale: Draw smaller marks
As a design request, use smaller marks.
https://bugzilla.gnome.org/show_bug.cgi?id=741117
gtk/gtkscale.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkscale.c b/gtk/gtkscale.c
index 8bef41c..aab6ac1 100644
--- a/gtk/gtkscale.c
+++ b/gtk/gtkscale.c
@@ -890,16 +890,16 @@ gtk_scale_get_range_border (GtkRange *range,
if (gtk_orientable_get_orientation (GTK_ORIENTABLE (scale)) == GTK_ORIENTATION_HORIZONTAL)
{
if (n1 > 0)
- border->top += h1 + value_spacing + slider_width / 2;
+ border->top += h1 + value_spacing + slider_width / 4;
if (n2 > 0)
- border->bottom += h2 + value_spacing + slider_width / 2;
+ border->bottom += h2 + value_spacing + slider_width / 4;
}
else
{
if (n1 > 0)
- border->left += w1 + value_spacing + slider_width / 2;
+ border->left += w1 + value_spacing + slider_width / 4;
if (n2 > 0)
- border->right += w2 + value_spacing + slider_width / 2;
+ border->right += w2 + value_spacing + slider_width / 4;
}
}
}
@@ -1162,14 +1162,14 @@ gtk_scale_draw (GtkWidget *widget,
if (mark->position == GTK_POS_TOP)
{
y1 = range_rect.y;
- y2 = y1 - slider_width / 2;
+ y2 = y1 - slider_width / 4;
min_pos = min_pos_before;
max_pos = find_next_pos (widget, m, marks + i, GTK_POS_TOP) - min_sep;
}
else
{
y1 = range_rect.y + range_rect.height;
- y2 = y1 + slider_width / 2;
+ y2 = y1 + slider_width / 4;
min_pos = min_pos_after;
max_pos = find_next_pos (widget, m, marks + i, GTK_POS_BOTTOM) - min_sep;
}
@@ -1214,14 +1214,14 @@ gtk_scale_draw (GtkWidget *widget,
if (mark->position == GTK_POS_TOP)
{
x1 = range_rect.x;
- x2 = range_rect.x - slider_width / 2;
+ x2 = range_rect.x - slider_width / 4;
min_pos = min_pos_before;
max_pos = find_next_pos (widget, m, marks + i, GTK_POS_TOP) - min_sep;
}
else
{
x1 = range_rect.x + range_rect.width;
- x2 = range_rect.x + range_rect.width + slider_width / 2;
+ x2 = range_rect.x + range_rect.width + slider_width / 4;
min_pos = min_pos_after;
max_pos = find_next_pos (widget, m, marks + i, GTK_POS_BOTTOM) - min_sep;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]