The Unico Gtk+ Theming Engine

Merge lp:~robert-ancell/unico/disable-border-radius into lp:unico

Proposed by Robert Ancell on 2012-06-14
Status: Merged
Merge reported by: Robert Ancell
Merged at revision: not available
Proposed branch: lp:~robert-ancell/unico/disable-border-radius
Merge into: lp:unico
Diff against target: 124 lines (+19/-17) 2 files modified
To merge this branch: bzr merge lp:~robert-ancell/unico/disable-border-radius
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve on 2012-12-06
Unico Team 2012-06-14 Pending
Review via email: mp+110231@code.launchpad.net
To post a comment you must log in.

Guess this was landed already. Robert, can you delete the merge proposal, or mark it merged or something?

Approve since it's already shipping in quantal.

review: Approve

Preview Diff

1=== modified file 'unico/gtkroundedbox.c'
2--- unico/gtkroundedbox.c 2012-02-08 12:54:39 +0000
3+++ unico/gtkroundedbox.c 2012-06-14 05:34:31 +0000
4@@ -90,16 +90,17 @@
5 GtkStateFlags state,
6 GtkJunctionSides junction)
7 {
8- GtkCssBorderCornerRadius *corner[4];
9+ GtkCssBorderCornerRadius *corner[4] = { NULL, NULL, NULL, NULL };
10 guint i;
11
12+ /* NOTE: Border radius is disabled due to it not working in GTK+ 3.5 */
13 gtk_theming_engine_get (engine, state,
14 /* Can't use border-radius as it's an int for
15 * backwards compat */
16- "border-top-left-radius", &corner[GTK_CSS_TOP_LEFT],
17+ /*"border-top-left-radius", &corner[GTK_CSS_TOP_LEFT],
18 "border-top-right-radius", &corner[GTK_CSS_TOP_RIGHT],
19 "border-bottom-right-radius", &corner[GTK_CSS_BOTTOM_RIGHT],
20- "border-bottom-left-radius", &corner[GTK_CSS_BOTTOM_LEFT],
21+ "border-bottom-left-radius", &corner[GTK_CSS_BOTTOM_LEFT],*/
22 NULL);
23
24 if (corner[GTK_CSS_TOP_LEFT] && (junction & GTK_JUNCTION_CORNER_TOPLEFT) == 0)
25
26=== modified file 'unico/unico-draw.c'
27--- unico/unico-draw.c 2012-03-29 14:25:06 +0000
28+++ unico/unico-draw.c 2012-06-14 05:34:31 +0000
29@@ -531,8 +531,8 @@
30 {
31 GtkBorder border;
32 GtkBorder *outer_border;
33- GtkCssBorderCornerRadius *top_left_radius, *top_right_radius;
34- GtkCssBorderCornerRadius *bottom_left_radius, *bottom_right_radius;
35+ /*GtkCssBorderCornerRadius *top_left_radius, *top_right_radius;
36+ GtkCssBorderCornerRadius *bottom_left_radius, *bottom_right_radius;*/
37 GtkJunctionSides junction;
38 GtkStateFlags state;
39 gboolean has_outer_stroke = FALSE;
40@@ -544,13 +544,14 @@
41
42 state = gtk_theming_engine_get_state (engine);
43
44+ /* NOTE: Border radius is disabled due to it not working in GTK+ 3.5 */
45 gtk_theming_engine_get (engine, state,
46 /* Can't use border-radius as it's an int for
47 * backwards compat */
48- "border-top-left-radius", &top_left_radius,
49+ /*"border-top-left-radius", &top_left_radius,
50 "border-top-right-radius", &top_right_radius,
51 "border-bottom-right-radius", &bottom_right_radius,
52- "border-bottom-left-radius", &bottom_left_radius,
53+ "border-bottom-left-radius", &bottom_left_radius,*/
54 "-unico-outer-stroke-width", &outer_border,
55 NULL);
56 gtk_theming_engine_get_border (engine, state, &border);
57@@ -575,11 +576,11 @@
58 hc += outer_border->top;
59 }
60
61- if (xy0_gap < _gtk_css_number_get (&top_left_radius->horizontal, width))
62+ /*if (xy0_gap < _gtk_css_number_get (&top_left_radius->horizontal, width))
63 junction |= GTK_JUNCTION_CORNER_TOPLEFT;
64
65 if (xy1_gap > width - _gtk_css_number_get (&top_right_radius->horizontal, width))
66- junction |= GTK_JUNCTION_CORNER_TOPRIGHT;
67+ junction |= GTK_JUNCTION_CORNER_TOPRIGHT;*/
68
69 break;
70 default:
71@@ -597,11 +598,11 @@
72 hc += outer_border->bottom;
73 }
74
75- if (xy0_gap < _gtk_css_number_get (&bottom_left_radius->horizontal, width))
76+ /*if (xy0_gap < _gtk_css_number_get (&bottom_left_radius->horizontal, width))
77 junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;
78
79 if (xy1_gap > width - _gtk_css_number_get (&bottom_right_radius->horizontal, width))
80- junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;
81+ junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;*/
82
83 break;
84 case GTK_POS_LEFT:
85@@ -617,11 +618,11 @@
86 hc = MAX (xy1_gap - xy0_gap - (outer_border->top + outer_border->bottom) - (border.top + border.bottom), 0);
87 }
88
89- if (xy0_gap < _gtk_css_number_get (&top_left_radius->vertical, height))
90+ /*if (xy0_gap < _gtk_css_number_get (&top_left_radius->vertical, height))
91 junction |= GTK_JUNCTION_CORNER_TOPLEFT;
92
93 if (xy1_gap > height - _gtk_css_number_get (&bottom_left_radius->vertical, height))
94- junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;
95+ junction |= GTK_JUNCTION_CORNER_BOTTOMLEFT;*/
96
97 break;
98 case GTK_POS_RIGHT:
99@@ -638,11 +639,11 @@
100 hc = MAX (xy1_gap - xy0_gap - (outer_border->top + outer_border->bottom) - (border.top + border.bottom), 0);
101 }
102
103- if (xy0_gap < _gtk_css_number_get (&top_right_radius->vertical, height))
104+ /*if (xy0_gap < _gtk_css_number_get (&top_right_radius->vertical, height))
105 junction |= GTK_JUNCTION_CORNER_TOPRIGHT;
106
107 if (xy1_gap > height - _gtk_css_number_get (&bottom_right_radius->vertical, height))
108- junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;
109+ junction |= GTK_JUNCTION_CORNER_BOTTOMRIGHT;*/
110
111 break;
112 }
113@@ -660,10 +661,10 @@
114
115 cairo_restore (cr);
116
117- g_free (top_left_radius);
118+ /*g_free (top_left_radius);
119 g_free (top_right_radius);
120 g_free (bottom_right_radius);
121- g_free (bottom_left_radius);
122+ g_free (bottom_left_radius);*/
123 gtk_border_free (outer_border);
124 }
125

Subscribers

People subscribed via source and target branches