Merge lp:~cimi/overlay-scrollbar/new-visuals into lp:overlay-scrollbar
- new-visuals
- Merge into trunk
Proposed by
Andrea Cimitan
Status: | Merged |
---|---|
Merged at revision: | 326 |
Proposed branch: | lp:~cimi/overlay-scrollbar/new-visuals |
Merge into: | lp:overlay-scrollbar |
Diff against target: |
343 lines (+113/-69) 3 files modified
os/os-private.h (+1/-1) os/os-scrollbar.c (+1/-1) os/os-thumb.c (+111/-67) |
To merge this branch: | bzr merge lp:~cimi/overlay-scrollbar/new-visuals |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Ruiz (community) | Approve | ||
Ayatana Scrollbar Team | Pending | ||
Review via email:
|
Commit message
Description of the change
Some changes to visuals, bigger thumbs too
To post a comment you must log in.
- 329. By Andrea Cimitan
-
More tweaks
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'os/os-private.h' | |||
2 | --- os/os-private.h 2011-10-20 20:05:45 +0000 | |||
3 | +++ os/os-private.h 2011-12-20 14:36:31 +0000 | |||
4 | @@ -35,7 +35,7 @@ | |||
5 | 35 | 35 | ||
6 | 36 | /* Size of the thumb in pixels. */ | 36 | /* Size of the thumb in pixels. */ |
7 | 37 | #define MIN_THUMB_HEIGHT 35 | 37 | #define MIN_THUMB_HEIGHT 35 |
9 | 38 | #define THUMB_WIDTH 17 | 38 | #define THUMB_WIDTH 21 |
10 | 39 | #define THUMB_HEIGHT 68 | 39 | #define THUMB_HEIGHT 68 |
11 | 40 | 40 | ||
12 | 41 | /* Number of tolerance pixels on pageup/down, while intercepting a motion-notify-event. */ | 41 | /* Number of tolerance pixels on pageup/down, while intercepting a motion-notify-event. */ |
13 | 42 | 42 | ||
14 | === modified file 'os/os-scrollbar.c' | |||
15 | --- os/os-scrollbar.c 2011-12-05 16:45:35 +0000 | |||
16 | +++ os/os-scrollbar.c 2011-12-20 14:36:31 +0000 | |||
17 | @@ -38,7 +38,7 @@ | |||
18 | 38 | #define BAR_SIZE 3 | 38 | #define BAR_SIZE 3 |
19 | 39 | 39 | ||
20 | 40 | /* Size of the proximity effect in pixels. */ | 40 | /* Size of the proximity effect in pixels. */ |
22 | 41 | #define PROXIMITY_SIZE 30 | 41 | #define PROXIMITY_SIZE 34 |
23 | 42 | 42 | ||
24 | 43 | /* Max duration of the scrolling. */ | 43 | /* Max duration of the scrolling. */ |
25 | 44 | #define MAX_DURATION_SCROLLING 1000 | 44 | #define MAX_DURATION_SCROLLING 1000 |
26 | 45 | 45 | ||
27 | === modified file 'os/os-thumb.c' | |||
28 | --- os/os-thumb.c 2011-10-20 20:05:45 +0000 | |||
29 | +++ os/os-thumb.c 2011-12-20 14:36:31 +0000 | |||
30 | @@ -369,8 +369,6 @@ | |||
31 | 369 | /* Draw a grip using cairo. */ | 369 | /* Draw a grip using cairo. */ |
32 | 370 | static void | 370 | static void |
33 | 371 | draw_grip (cairo_t *cr, | 371 | draw_grip (cairo_t *cr, |
34 | 372 | const GdkRGBA *color1, | ||
35 | 373 | const GdkRGBA *color2, | ||
36 | 374 | gdouble x, | 372 | gdouble x, |
37 | 375 | gdouble y, | 373 | gdouble y, |
38 | 376 | gint nx, | 374 | gint nx, |
39 | @@ -385,13 +383,7 @@ | |||
40 | 385 | gint sx = lx * 3; | 383 | gint sx = lx * 3; |
41 | 386 | gint sy = ly * 3; | 384 | gint sy = ly * 3; |
42 | 387 | 385 | ||
43 | 388 | cairo_set_source_rgba (cr, color2->red, color2->green, color2->blue, color2->alpha); | ||
44 | 389 | cairo_rectangle (cr, x + sx, y + sy, 2, 2); | ||
45 | 390 | cairo_fill (cr); | ||
46 | 391 | |||
47 | 392 | cairo_set_source_rgba (cr, color1->red, color1->green, color1->blue, color1->alpha); | ||
48 | 393 | cairo_rectangle (cr, x + sx, y + sy, 1, 1); | 386 | cairo_rectangle (cr, x + sx, y + sy, 1, 1); |
49 | 394 | cairo_fill (cr); | ||
50 | 395 | } | 387 | } |
51 | 396 | } | 388 | } |
52 | 397 | } | 389 | } |
53 | @@ -636,6 +628,13 @@ | |||
54 | 636 | } | 628 | } |
55 | 637 | #endif | 629 | #endif |
56 | 638 | 630 | ||
57 | 631 | enum { | ||
58 | 632 | ACTION_NORMAL, | ||
59 | 633 | ACTION_DRAG, | ||
60 | 634 | ACTION_PAGE_UP, | ||
61 | 635 | ACTION_PAGE_DOWN | ||
62 | 636 | }; | ||
63 | 637 | |||
64 | 639 | static gboolean | 638 | static gboolean |
65 | 640 | #ifdef USE_GTK3 | 639 | #ifdef USE_GTK3 |
66 | 641 | os_thumb_draw (GtkWidget *widget, | 640 | os_thumb_draw (GtkWidget *widget, |
67 | @@ -659,6 +658,7 @@ | |||
68 | 659 | cairo_pattern_t *pat; | 658 | cairo_pattern_t *pat; |
69 | 660 | gint width, height; | 659 | gint width, height; |
70 | 661 | gint radius; | 660 | gint radius; |
71 | 661 | gint action; | ||
72 | 662 | 662 | ||
73 | 663 | thumb = OS_THUMB (widget); | 663 | thumb = OS_THUMB (widget); |
74 | 664 | priv = thumb->priv; | 664 | priv = thumb->priv; |
75 | @@ -704,6 +704,19 @@ | |||
76 | 704 | cairo_set_line_width (cr, 1.0); | 704 | cairo_set_line_width (cr, 1.0); |
77 | 705 | cairo_set_operator (cr, CAIRO_OPERATOR_OVER); | 705 | cairo_set_operator (cr, CAIRO_OPERATOR_OVER); |
78 | 706 | 706 | ||
79 | 707 | /* Type of action. */ | ||
80 | 708 | action = ACTION_NORMAL; | ||
81 | 709 | if (priv->event & OS_EVENT_BUTTON_PRESS) | ||
82 | 710 | { | ||
83 | 711 | if (priv->event & OS_EVENT_MOTION_NOTIFY) | ||
84 | 712 | action = ACTION_DRAG; | ||
85 | 713 | else if ((priv->orientation == GTK_ORIENTATION_VERTICAL && (priv->pointer.y < height / 2)) || | ||
86 | 714 | (priv->orientation == GTK_ORIENTATION_HORIZONTAL && (priv->pointer.x < width / 2))) | ||
87 | 715 | action = ACTION_PAGE_UP; | ||
88 | 716 | else | ||
89 | 717 | action = ACTION_PAGE_DOWN; | ||
90 | 718 | } | ||
91 | 719 | |||
92 | 707 | /* Background. */ | 720 | /* Background. */ |
93 | 708 | draw_round_rect (cr, 0, 0, width, height, radius); | 721 | draw_round_rect (cr, 0, 0, width, height, radius); |
94 | 709 | 722 | ||
95 | @@ -711,52 +724,52 @@ | |||
96 | 711 | cairo_fill_preserve (cr); | 724 | cairo_fill_preserve (cr); |
97 | 712 | 725 | ||
98 | 713 | /* Background pattern from top to bottom. */ | 726 | /* Background pattern from top to bottom. */ |
101 | 714 | shade_gdk_rgba (&bg, 1.3, &bg_arrow_up); | 727 | shade_gdk_rgba (&bg, 0.86, &bg_arrow_up); |
102 | 715 | shade_gdk_rgba (&bg, 0.7, &bg_arrow_down); | 728 | shade_gdk_rgba (&bg, 1.1, &bg_arrow_down); |
103 | 716 | 729 | ||
104 | 717 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) | 730 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) |
105 | 718 | pat = cairo_pattern_create_linear (0, 0, 0, height); | 731 | pat = cairo_pattern_create_linear (0, 0, 0, height); |
106 | 719 | else | 732 | else |
107 | 720 | pat = cairo_pattern_create_linear (0, 0, width, 0); | 733 | pat = cairo_pattern_create_linear (0, 0, width, 0); |
108 | 721 | 734 | ||
135 | 722 | if ((priv->event & OS_EVENT_BUTTON_PRESS) && | 735 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_arrow_up, 0.8); |
136 | 723 | !(priv->event & OS_EVENT_MOTION_NOTIFY)) | 736 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_arrow_down, 0.8); |
137 | 724 | { | 737 | |
112 | 725 | if ((priv->orientation == GTK_ORIENTATION_VERTICAL && (priv->pointer.y < height / 2)) || | ||
113 | 726 | (priv->orientation == GTK_ORIENTATION_HORIZONTAL && (priv->pointer.x < width / 2))) | ||
114 | 727 | { | ||
115 | 728 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_arrow_down, 0.6); | ||
116 | 729 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_arrow_down, 0.1); | ||
117 | 730 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_arrow_down, 0.1); | ||
118 | 731 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_arrow_down, 0.8); | ||
119 | 732 | } | ||
120 | 733 | else | ||
121 | 734 | { | ||
122 | 735 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_arrow_up, 0.8); | ||
123 | 736 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_arrow_up, 0.1); | ||
124 | 737 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_arrow_down, 0.2); | ||
125 | 738 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_arrow_down, 1.0); | ||
126 | 739 | } | ||
127 | 740 | } | ||
128 | 741 | else | ||
129 | 742 | { | ||
130 | 743 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_arrow_up, 0.8); | ||
131 | 744 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_arrow_up, 0.1); | ||
132 | 745 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_arrow_down, 0.1); | ||
133 | 746 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_arrow_down, 0.8); | ||
134 | 747 | } | ||
138 | 748 | cairo_set_source (cr, pat); | 738 | cairo_set_source (cr, pat); |
139 | 749 | cairo_pattern_destroy (pat); | 739 | cairo_pattern_destroy (pat); |
140 | 750 | 740 | ||
142 | 751 | if (priv->event & OS_EVENT_MOTION_NOTIFY) | 741 | if (action == ACTION_DRAG) |
143 | 752 | { | 742 | { |
144 | 753 | cairo_fill_preserve (cr); | 743 | cairo_fill_preserve (cr); |
146 | 754 | set_source_gdk_rgba (cr, &bg_arrow_down, 0.3); | 744 | set_source_gdk_rgba (cr, &bg, 0.8); |
147 | 755 | cairo_fill (cr); | 745 | cairo_fill (cr); |
148 | 756 | } | 746 | } |
149 | 757 | else | 747 | else |
150 | 758 | cairo_fill (cr); | 748 | cairo_fill (cr); |
151 | 759 | 749 | ||
152 | 750 | /* Page up or down pressed buttons. */ | ||
153 | 751 | if (action == ACTION_PAGE_UP || | ||
154 | 752 | action == ACTION_PAGE_DOWN) | ||
155 | 753 | { | ||
156 | 754 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) | ||
157 | 755 | { | ||
158 | 756 | if (action == ACTION_PAGE_UP) | ||
159 | 757 | cairo_rectangle (cr, 0, 0, width, height / 2); | ||
160 | 758 | else | ||
161 | 759 | cairo_rectangle (cr, 0, height / 2, width, height / 2); | ||
162 | 760 | } | ||
163 | 761 | else | ||
164 | 762 | { | ||
165 | 763 | if (action == ACTION_PAGE_UP) | ||
166 | 764 | cairo_rectangle (cr, 0, 0, width / 2, height); | ||
167 | 765 | else | ||
168 | 766 | cairo_rectangle (cr, width / 2, 0, width / 2, height); | ||
169 | 767 | } | ||
170 | 768 | |||
171 | 769 | set_source_gdk_rgba (cr, &bg, 0.8); | ||
172 | 770 | cairo_fill (cr); | ||
173 | 771 | } | ||
174 | 772 | |||
175 | 760 | /* 2px fat border around the thumb. */ | 773 | /* 2px fat border around the thumb. */ |
176 | 761 | cairo_save (cr); | 774 | cairo_save (cr); |
177 | 762 | 775 | ||
178 | @@ -773,75 +786,106 @@ | |||
179 | 773 | /* 1px subtle shadow around the background. */ | 786 | /* 1px subtle shadow around the background. */ |
180 | 774 | shade_gdk_rgba (&bg, 0.2, &bg_shadow); | 787 | shade_gdk_rgba (&bg, 0.2, &bg_shadow); |
181 | 775 | 788 | ||
182 | 789 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) | ||
183 | 790 | pat = cairo_pattern_create_linear (0, 0, 0, height); | ||
184 | 791 | else | ||
185 | 792 | pat = cairo_pattern_create_linear (0, 0, width, 0); | ||
186 | 793 | |||
187 | 794 | pattern_add_gdk_rgba_stop (pat, 0.5, &bg_shadow, 0.06); | ||
188 | 795 | switch (action) | ||
189 | 796 | { | ||
190 | 797 | default: | ||
191 | 798 | case ACTION_NORMAL: | ||
192 | 799 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_shadow, 0.22); | ||
193 | 800 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_shadow, 0.22); | ||
194 | 801 | break; | ||
195 | 802 | case ACTION_DRAG: | ||
196 | 803 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_shadow, 0.2); | ||
197 | 804 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_shadow, 0.2); | ||
198 | 805 | break; | ||
199 | 806 | case ACTION_PAGE_UP: | ||
200 | 807 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_shadow, 0.1); | ||
201 | 808 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_shadow, 0.22); | ||
202 | 809 | break; | ||
203 | 810 | case ACTION_PAGE_DOWN: | ||
204 | 811 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_shadow, 0.22); | ||
205 | 812 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_shadow, 0.1); | ||
206 | 813 | break; | ||
207 | 814 | } | ||
208 | 815 | |||
209 | 816 | cairo_set_source (cr, pat); | ||
210 | 817 | cairo_pattern_destroy (pat); | ||
211 | 818 | |||
212 | 776 | draw_round_rect (cr, 1, 1, width - 2, height - 2, radius); | 819 | draw_round_rect (cr, 1, 1, width - 2, height - 2, radius); |
213 | 777 | set_source_gdk_rgba (cr, &bg_shadow, 0.26); | ||
214 | 778 | cairo_stroke (cr); | 820 | cairo_stroke (cr); |
215 | 779 | 821 | ||
216 | 780 | /* 1px frame around the background. */ | 822 | /* 1px frame around the background. */ |
217 | 781 | shade_gdk_rgba (&bg, 0.6, &bg_dark_line); | 823 | shade_gdk_rgba (&bg, 0.6, &bg_dark_line); |
218 | 824 | shade_gdk_rgba (&bg, 1.2, &bg_bright_line); | ||
219 | 782 | 825 | ||
220 | 783 | draw_round_rect (cr, 2, 2, width - 4, height - 4, radius - 1); | 826 | draw_round_rect (cr, 2, 2, width - 4, height - 4, radius - 1); |
222 | 784 | set_source_gdk_rgba (cr, &bg_dark_line, 0.26); | 827 | set_source_gdk_rgba (cr, &bg_bright_line, 0.6); |
223 | 785 | cairo_stroke (cr); | 828 | cairo_stroke (cr); |
224 | 786 | 829 | ||
225 | 787 | shade_gdk_rgba (&bg, 1.2, &bg_bright_line); | ||
226 | 788 | |||
227 | 789 | /* Only draw the grip when the thumb is at full height. */ | 830 | /* Only draw the grip when the thumb is at full height. */ |
228 | 790 | if ((priv->orientation == GTK_ORIENTATION_VERTICAL && height == THUMB_HEIGHT - 1) || | 831 | if ((priv->orientation == GTK_ORIENTATION_VERTICAL && height == THUMB_HEIGHT - 1) || |
229 | 791 | (priv->orientation == GTK_ORIENTATION_HORIZONTAL && width == THUMB_HEIGHT - 1) ) | 832 | (priv->orientation == GTK_ORIENTATION_HORIZONTAL && width == THUMB_HEIGHT - 1) ) |
230 | 792 | { | 833 | { |
232 | 793 | GdkRGBA grip_dot_up, grip_dot_down, grip_inset_up, grip_inset_down; | 834 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) |
233 | 835 | pat = cairo_pattern_create_linear (0, 0, 0, height); | ||
234 | 836 | else | ||
235 | 837 | pat = cairo_pattern_create_linear (0, 0, width, 0); | ||
236 | 794 | 838 | ||
245 | 795 | grip_dot_up = bg_dark_line; | 839 | pattern_add_gdk_rgba_stop (pat, 0.0, &bg_dark_line, 0.0); |
246 | 796 | grip_dot_up.alpha = 0.74; | 840 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_dark_line, 0.36); |
247 | 797 | grip_dot_down = bg_dark_line; | 841 | pattern_add_gdk_rgba_stop (pat, 0.49, &bg_dark_line, 0.36); |
248 | 798 | grip_dot_down.alpha = 0.86; | 842 | pattern_add_gdk_rgba_stop (pat, 1.0, &bg_dark_line, 0.0); |
249 | 799 | grip_inset_up = bg_bright_line; | 843 | cairo_set_source (cr, pat); |
250 | 800 | grip_inset_up.alpha = priv->event & OS_EVENT_BUTTON_PRESS ? 0.62 : 1.0; | 844 | cairo_pattern_destroy (pat); |
243 | 801 | grip_inset_down = bg_bright_line; | ||
244 | 802 | grip_inset_down.alpha = 0.36; | ||
251 | 803 | 845 | ||
252 | 804 | /* Grip. */ | 846 | /* Grip. */ |
253 | 805 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) | 847 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) |
254 | 806 | { | 848 | { |
255 | 807 | /* Page UP. */ | 849 | /* Page UP. */ |
257 | 808 | draw_grip (cr, &grip_dot_up, &grip_inset_up, 4.5, 15.5, 3, 5); | 850 | draw_grip (cr, width / 2 - 6.5, 13.5, 5, 6); |
258 | 809 | 851 | ||
259 | 810 | /* Page DOWN. */ | 852 | /* Page DOWN. */ |
261 | 811 | draw_grip (cr, &grip_dot_down, &grip_inset_down, 4.5, height / 2 + 4.5, 3, 5); | 853 | draw_grip (cr, width / 2 - 6.5, height / 2 + 3.5, 5, 6); |
262 | 812 | } | 854 | } |
263 | 813 | else | 855 | else |
264 | 814 | { | 856 | { |
265 | 815 | /* Page UP. */ | 857 | /* Page UP. */ |
267 | 816 | draw_grip (cr, &grip_dot_up, &grip_inset_up, 15.5, 4.5, 5, 3); | 858 | draw_grip (cr, 16.5, height / 2 - 6.5, 5, 6); |
268 | 817 | 859 | ||
269 | 818 | /* Page DOWN. */ | 860 | /* Page DOWN. */ |
271 | 819 | draw_grip (cr, &grip_dot_down, &grip_inset_down, width / 2 + 4.5, 4.5, 5, 3); | 861 | draw_grip (cr, width / 2 + 3.5, height / 2 - 6.5, 5, 6); |
272 | 820 | } | 862 | } |
273 | 863 | |||
274 | 864 | cairo_fill (cr); | ||
275 | 821 | } | 865 | } |
276 | 822 | 866 | ||
277 | 823 | /* Separators between the two steppers. */ | 867 | /* Separators between the two steppers. */ |
278 | 824 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) | 868 | if (priv->orientation == GTK_ORIENTATION_VERTICAL) |
279 | 825 | { | 869 | { |
282 | 826 | cairo_move_to (cr, 2.5, height / 2); | 870 | cairo_move_to (cr, 1.5, height / 2); |
283 | 827 | cairo_line_to (cr, width - 2.5, height / 2); | 871 | cairo_line_to (cr, width - 1.5, height / 2); |
284 | 828 | set_source_gdk_rgba (cr, &bg_dark_line, 0.36); | 872 | set_source_gdk_rgba (cr, &bg_dark_line, 0.36); |
285 | 829 | cairo_stroke (cr); | 873 | cairo_stroke (cr); |
286 | 830 | 874 | ||
289 | 831 | cairo_move_to (cr, 2.5, 1 + height / 2); | 875 | cairo_move_to (cr, 1.5, 1 + height / 2); |
290 | 832 | cairo_line_to (cr, width - 2.5, 1 + height / 2); | 876 | cairo_line_to (cr, width - 1.5, 1 + height / 2); |
291 | 833 | set_source_gdk_rgba (cr, &bg_bright_line, 0.5); | 877 | set_source_gdk_rgba (cr, &bg_bright_line, 0.5); |
292 | 834 | cairo_stroke (cr); | 878 | cairo_stroke (cr); |
293 | 835 | } | 879 | } |
294 | 836 | else | 880 | else |
295 | 837 | { | 881 | { |
298 | 838 | cairo_move_to (cr, width / 2, 2.5); | 882 | cairo_move_to (cr, width / 2, 1.5); |
299 | 839 | cairo_line_to (cr, width / 2, height - 2.5); | 883 | cairo_line_to (cr, width / 2, height - 1.5); |
300 | 840 | set_source_gdk_rgba (cr, &bg_dark_line, 0.36); | 884 | set_source_gdk_rgba (cr, &bg_dark_line, 0.36); |
301 | 841 | cairo_stroke (cr); | 885 | cairo_stroke (cr); |
302 | 842 | 886 | ||
305 | 843 | cairo_move_to (cr, 1 + width / 2, 2.5); | 887 | cairo_move_to (cr, 1 + width / 2, 1.5); |
306 | 844 | cairo_line_to (cr, 1 + width / 2, height - 2.5); | 888 | cairo_line_to (cr, 1 + width / 2, height - 1.5); |
307 | 845 | set_source_gdk_rgba (cr, &bg_bright_line, 0.5); | 889 | set_source_gdk_rgba (cr, &bg_bright_line, 0.5); |
308 | 846 | cairo_stroke (cr); | 890 | cairo_stroke (cr); |
309 | 847 | } | 891 | } |
310 | @@ -851,14 +895,14 @@ | |||
311 | 851 | { | 895 | { |
312 | 852 | /* Direction UP. */ | 896 | /* Direction UP. */ |
313 | 853 | cairo_save (cr); | 897 | cairo_save (cr); |
315 | 854 | cairo_translate (cr, 8.5, 8.5); | 898 | cairo_translate (cr, width / 2 + 0.5, 8.5); |
316 | 855 | cairo_rotate (cr, G_PI); | 899 | cairo_rotate (cr, G_PI); |
317 | 856 | draw_arrow (cr, &arrow_color, 0.5, 0, 5, 3); | 900 | draw_arrow (cr, &arrow_color, 0.5, 0, 5, 3); |
318 | 857 | cairo_restore (cr); | 901 | cairo_restore (cr); |
319 | 858 | 902 | ||
320 | 859 | /* Direction DOWN. */ | 903 | /* Direction DOWN. */ |
321 | 860 | cairo_save (cr); | 904 | cairo_save (cr); |
323 | 861 | cairo_translate (cr, 8.5, height - 8.5); | 905 | cairo_translate (cr, width / 2 + 0.5, height - 8.5); |
324 | 862 | cairo_rotate (cr, 0); | 906 | cairo_rotate (cr, 0); |
325 | 863 | draw_arrow (cr, &arrow_color, -0.5, 0, 5, 3); | 907 | draw_arrow (cr, &arrow_color, -0.5, 0, 5, 3); |
326 | 864 | cairo_restore (cr); | 908 | cairo_restore (cr); |
327 | @@ -867,14 +911,14 @@ | |||
328 | 867 | { | 911 | { |
329 | 868 | /* Direction LEFT. */ | 912 | /* Direction LEFT. */ |
330 | 869 | cairo_save (cr); | 913 | cairo_save (cr); |
332 | 870 | cairo_translate (cr, 8.5, 8.5); | 914 | cairo_translate (cr, 8.5, height / 2 + 0.5); |
333 | 871 | cairo_rotate (cr, G_PI * 0.5); | 915 | cairo_rotate (cr, G_PI * 0.5); |
334 | 872 | draw_arrow (cr, &arrow_color, -0.5, 0, 5, 3); | 916 | draw_arrow (cr, &arrow_color, -0.5, 0, 5, 3); |
335 | 873 | cairo_restore (cr); | 917 | cairo_restore (cr); |
336 | 874 | 918 | ||
337 | 875 | /* Direction RIGHT. */ | 919 | /* Direction RIGHT. */ |
338 | 876 | cairo_save (cr); | 920 | cairo_save (cr); |
340 | 877 | cairo_translate (cr, width - 8.5, 8.5); | 921 | cairo_translate (cr, width - 8.5, height / 2 + 0.5); |
341 | 878 | cairo_rotate (cr, G_PI * 1.5); | 922 | cairo_rotate (cr, G_PI * 1.5); |
342 | 879 | draw_arrow (cr, &arrow_color, 0.5, 0, 5, 3); | 923 | draw_arrow (cr, &arrow_color, 0.5, 0, 5, 3); |
343 | 880 | cairo_restore (cr); | 924 | cairo_restore (cr); |
Changes look good to me, mostly changes in rendering besides the new action enumeration/ variable. I don't see anything risky or wrong here. Approved.