Merge lp:~mc-return/compiz/compiz.merge-fix1070233-fix1070297-fix1070301-Resizeinfo into lp:compiz/0.9.9

Proposed by MC Return on 2012-10-23
Status: Rejected
Rejected by: Daniel van Vugt on 2012-10-31
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1070233-fix1070297-fix1070301-Resizeinfo
Merge into: lp:compiz/0.9.9
Diff against target: 152 lines (+40/-24)
2 files modified
plugins/resizeinfo/resizeinfo.xml.in (+19/-9)
plugins/resizeinfo/src/resizeinfo.cpp (+21/-15)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1070233-fix1070297-fix1070301-Resizeinfo
Reviewer Review Type Date Requested Status
Daniel van Vugt 2012-10-23 Resubmit on 2012-10-31
MC Return Resubmit on 2012-10-24
Review via email: mp+130994@code.launchpad.net

Commit Message

* Fixed options to change Gradient Color 2 and Gradient Color 3 having no effect and enabled possibility for a gradient background.
* Changed width and height of the popup, so large windows with big numbers will still be displayed elegantly.
* Changed variable types of the variables "height" and "width" from int to unsigned short.
* Show Resize Info for all windows is now enabled by default, as the other option breaks the whole functionality of this plugin.
* Added option to change the color of the background's outline with black as default.
* Proper nouns now all start with uppercase letter.
* Better tooltips and other minor text and wording fixes.

(Fixes: LP #1070233, LP #1070297, Workaround for: LP #1070301)

Description of the Change

This video shows Resize Info after the linked branch was merged:
https://bugs.launchpad.net/compiz/+bug/1070233/+attachment/3412780/+files/ResizeInfoAfterFix.webm

Please note:
* The color settings for the gradient background are no longer ignored and correctly applied now.
* CCSM now shows the possibility to change the outline color of the background and it has been changed.

To post a comment you must log in.
Daniel van Vugt (vanvugt) wrote :

What part of this fixes bug 1070301? (which I can't reproduce)

review: Needs Information
MC Return (mc-return) wrote :

> What part of this fixes bug 1070301? (which I can't reproduce)

Line 20 of the preview diff only 'workarounds' it ;)
...by setting the default to true, as the default setting==false does not show the popup at all here.

Hmm, strange you cannot reproduce it as I am running Quantal and Compiz/Unity trunk here.

MC Return (mc-return) :
review: Resubmit
MC Return (mc-return) wrote :

Daniel, you are of course right that nothing does really fix bug 1070301 here, it just workarounds it by default, so I have removed the linking to bug 1070301 from this merge request.
I hope it is no problem that I did not rename the branch.

Daniel van Vugt (vanvugt) wrote :

Please separate the fixes for the two bugs and propose them separately. Please also avoid changing dimensions of existing features like RESIZE_POPUP_WIDTH/HEIGHT.

review: Resubmit

Unmerged revisions

3444. By MC Return on 2012-10-23

Changed width and height of the popup, so large windows will still be displayed elegantly
Changed variable types of the variables height and width from int to unsigned short

3443. By MC Return on 2012-10-23

Black Outline Color is now default

3442. By MC Return on 2012-10-23

Added the possibility to change the color of the outline as well

3441. By MC Return on 2012-10-23

Fixes for resizeinfo.xml.in:
Show Resize Info for all windows is now enabled by default as the other option breaks the whole functionality of this plugin
Proper nouns now start all with uppercase letter
Better tooltips

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/resizeinfo/resizeinfo.xml.in'
2--- plugins/resizeinfo/resizeinfo.xml.in 2012-10-15 10:31:51 +0000
3+++ plugins/resizeinfo/resizeinfo.xml.in 2012-10-23 13:15:24 +0000
4@@ -18,19 +18,19 @@
5 <options>
6 <option name="fade_time" type="int">
7 <_short>Fade Time</_short>
8- <_long>Fade time (in ms) for popup window</_long>
9+ <_long>Fade time (in ms) for the popup window.</_long>
10 <default>500</default>
11 <min>10</min>
12 <max>5000</max>
13 </option>
14 <option name="always_show" type="bool">
15- <_short>Show resize info for all windows</_short>
16- <_long>Show resize info for all windows as opposed to just windows with a resize increment of greater than 1.</_long>
17- <default>false</default>
18+ <_short>Show Resize Info for all windows</_short>
19+ <_long>Show resize info for all windows as opposed to just for windows with a resize increment of greater than 1.</_long>
20+ <default>true</default>
21 </option>
22 <option name="text_color" type="color">
23- <_short>Text color</_short>
24- <_long>Color of text on resize popup.</_long>
25+ <_short>Text Color</_short>
26+ <_long>Color of the resize popup's text.</_long>
27 <default>
28 <red>0x0000</red>
29 <blue>0x0000</blue>
30@@ -40,7 +40,7 @@
31 </option>
32 <option name="gradient_1" type="color">
33 <_short>Gradient Color 1</_short>
34- <_long>Color 1 of the gradient background.</_long>
35+ <_long>Color on the left side of the gradient background.</_long>
36 <default>
37 <red>0xcccc</red>
38 <green>0xcccc</green>
39@@ -50,7 +50,7 @@
40 </option>
41 <option name="gradient_2" type="color">
42 <_short>Gradient Color 2</_short>
43- <_long>Color 2 of the gradient background.</_long>
44+ <_long>Color in the middle of the gradient background.</_long>
45 <default>
46 <red>0xf332</red>
47 <green>0xf332</green>
48@@ -60,7 +60,7 @@
49 </option>
50 <option name="gradient_3" type="color">
51 <_short>Gradient Color 3</_short>
52- <_long>Color 3 of the gradient background.</_long>
53+ <_long>Color on the right side of the gradient background.</_long>
54 <default>
55 <red>0xd998</red>
56 <green>0xd998</green>
57@@ -68,6 +68,16 @@
58 <alpha>0xcccc</alpha>
59 </default>
60 </option>
61+ <option name="gradient_4" type="color">
62+ <_short>Outline Color</_short>
63+ <_long>Color of the background's outline.</_long>
64+ <default>
65+ <red>0x0000</red>
66+ <green>0x0000</green>
67+ <blue>0x0000</blue>
68+ <alpha>0xcccc</alpha>
69+ </default>
70+ </option>
71 </options>
72 </plugin>
73 </compiz>
74
75=== modified file 'plugins/resizeinfo/src/resizeinfo.cpp'
76--- plugins/resizeinfo/src/resizeinfo.cpp 2012-09-07 23:29:42 +0000
77+++ plugins/resizeinfo/src/resizeinfo.cpp 2012-10-23 13:15:24 +0000
78@@ -25,8 +25,8 @@
79
80 COMPIZ_PLUGIN_20090315 (resizeinfo, InfoPluginVTable);
81
82-const unsigned short RESIZE_POPUP_WIDTH = 85;
83-const unsigned short RESIZE_POPUP_HEIGHT = 50;
84+const unsigned short RESIZE_POPUP_WIDTH = 96;
85+const unsigned short RESIZE_POPUP_HEIGHT = 32;
86
87 const double PI = 3.14159265359f;
88
89@@ -178,8 +178,8 @@
90 {
91 cairo_pattern_t *pattern;
92 float border = 7.5;
93- int height = RESIZE_POPUP_HEIGHT;
94- int width = RESIZE_POPUP_WIDTH;
95+ unsigned short height = RESIZE_POPUP_HEIGHT;
96+ unsigned short width = RESIZE_POPUP_WIDTH;
97 float r, g, b, a;
98
99 INFO_SCREEN (screen);
100@@ -205,16 +205,16 @@
101 a = is->optionGetGradient1Alpha () / (float)0xffff;
102 cairo_pattern_add_color_stop_rgba (pattern, 0.00f, r, g, b, a);
103
104- r = is->optionGetGradient1Red () / (float)0xffff;
105- g = is->optionGetGradient1Green () / (float)0xffff;
106- b = is->optionGetGradient1Blue () / (float)0xffff;
107- a = is->optionGetGradient1Alpha () / (float)0xffff;
108+ r = is->optionGetGradient2Red () / (float)0xffff;
109+ g = is->optionGetGradient2Green () / (float)0xffff;
110+ b = is->optionGetGradient2Blue () / (float)0xffff;
111+ a = is->optionGetGradient2Alpha () / (float)0xffff;
112 cairo_pattern_add_color_stop_rgba (pattern, 0.65f, r, g, b, a);
113
114- r = is->optionGetGradient1Red () / (float)0xffff;
115- g = is->optionGetGradient1Green () / (float)0xffff;
116- b = is->optionGetGradient1Blue () / (float)0xffff;
117- a = is->optionGetGradient1Alpha () / (float)0xffff;
118+ r = is->optionGetGradient3Red () / (float)0xffff;
119+ g = is->optionGetGradient3Green () / (float)0xffff;
120+ b = is->optionGetGradient3Blue () / (float)0xffff;
121+ a = is->optionGetGradient3Alpha () / (float)0xffff;
122 cairo_pattern_add_color_stop_rgba (pattern, 0.85f, r, g, b, a);
123 cairo_set_source (cr, pattern);
124
125@@ -226,11 +226,16 @@
126 cairo_arc (cr, border, height - border, border, PI / 2.0f, PI);
127 cairo_close_path (cr);
128 cairo_fill_preserve (cr);
129-
130+
131 /* Outline */
132- cairo_set_source_rgba (cr, 0.9f, 0.9f, 0.9f, 1.0f);
133+ r = is->optionGetGradient4Red () / (float)0xffff;
134+ g = is->optionGetGradient4Green () / (float)0xffff;
135+ b = is->optionGetGradient4Blue () / (float)0xffff;
136+ a = is->optionGetGradient4Alpha () / (float)0xffff;
137+
138+ cairo_set_source_rgba (cr, r, g, b, a);
139 cairo_stroke (cr);
140-
141+
142 cairo_pattern_destroy (pattern);
143 }
144
145@@ -530,6 +535,7 @@
146 optionSetGradient1Notify (gradientChanged);
147 optionSetGradient2Notify (gradientChanged);
148 optionSetGradient3Notify (gradientChanged);
149+ optionSetGradient4Notify (gradientChanged);
150 }
151
152 InfoWindow::InfoWindow (CompWindow *window) :

Subscribers

People subscribed via source and target branches