Merge lp:~mc-return/compiz/compiz.merge-fix1070297-no-possibility-to-change-background-outline-color into lp:compiz/0.9.9
| Status: | Merged |
|---|---|
| Approved by: | Martin Mrazik on 2012-11-06 |
| Approved revision: | 3453 |
| Merged at revision: | 3452 |
| Proposed branch: | lp:~mc-return/compiz/compiz.merge-fix1070297-no-possibility-to-change-background-outline-color |
| Merge into: | lp:compiz/0.9.9 |
| Diff against target: |
59 lines (+20/-5) 2 files modified
plugins/resizeinfo/resizeinfo.xml.in (+10/-0) plugins/resizeinfo/src/resizeinfo.cpp (+10/-5) |
| To merge this branch: | bzr merge lp:~mc-return/compiz/compiz.merge-fix1070297-no-possibility-to-change-background-outline-color |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Needs Fixing on 2012-11-06 | |
| Daniel van Vugt | Approve on 2012-11-06 | ||
| MC Return | Resubmit on 2012-11-06 | ||
| Sam Spilsbury | 2012-11-01 | Approve on 2012-11-02 | |
|
Review via email:
|
|||
Commit Message
Resizeinfo Plug-In:
Added option to change the color of the background's outline.
(LP: #1070297)
Also renamed 'gradientChanged' to 'backgroundColo
Description of the Change
As requested by Daniel, I am separating the fixes for the resizeinfo problems.
This branch just adds the option to change resizeinfo plug-in's background outline color via CCSM as well, so all the colors can be adjusted.
| Sam Spilsbury (smspillaz) wrote : | # |
| MC Return (mc-return) wrote : | # |
> 33 + a = is->optionGetGr
>
> Instead of using 0xffff here it might be better to use std::numeric_limits and
> static_cast
>
> eg
>
> a = is->optionGetGr
> <int>::max ())
Done in r3449.
> Also I think an option name like gradient_4 sounds a bit weird especially as
> there's no correlation between "Outline Color" in the settings manager and
> Gradient4 in the code. Just use outline_color.
Done in r3448. Also renamed 'static void gradientChanged' to 'static void backgroundColor
| Sam Spilsbury (smspillaz) wrote : | # |
Cool, looking good.
One more thing I realized was that you can probably have a constant for the int maximum as a float to avoid the compound statement (I forget about this all the time, so)
const float intMaxAsFloat = std::numeric_limits <int>::max ();
Feel free to do that. Its not important. I'll leave this approved till Daniel looks at it.
| MC Return (mc-return) wrote : | # |
> Cool, looking good.
>
> One more thing I realized was that you can probably have a constant for the
> int maximum as a float to avoid the compound statement (I forget about this
> all the time, so)
>
> const float intMaxAsFloat = std::numeric_limits <int>::max ();
>
> Feel free to do that. Its not important. I'll leave this approved till Daniel
> looks at it.
Thanks a lot for the review and your approval :).
I would like to do this change also, but would prefer to do it once the resize info branches are merged, because the same change would need to be done to the other branch as well.
But it is noted and I will do it in a separate branch together with the gradient_1-3 name changes.
| Daniel van Vugt (vanvugt) wrote : | # |
Again, this is mathematically incorrect:
static_cast <float> (std::numeric_
so I'm not sure how/if it's working for you.
It should be 65535.0f instead. Or even (float)COLOR or (float)OPAQUE [from composite.h]
| MC Return (mc-return) wrote : | # |
> Again, this is mathematically incorrect:
> static_cast <float> (std::numeric_
> so I'm not sure how/if it's working for you.
>
It was working, when I tested it...
> It should be 65535.0f instead. Or even (float)COLOR or (float)OPAQUE [from
> composite.h]
Going back to (float)0xffff as it is done almost everywhere in lp:compiz.
If we want a change here, we probably could and should do it in a special commit and throughout the whole lp:compiz codebase.
| Daniel van Vugt (vanvugt) wrote : | # |
Please change the default outline colour in the XML back to the old default. Should be something like:
0xe665 0xe665 0xe665 0xffff
There shouldn't be any visual changes to default colours.
| MC Return (mc-return) wrote : | # |
> Please change the default outline colour in the XML back to the old default.
> Should be something like:
> 0xe665 0xe665 0xe665 0xffff
>
Done in r 3452. :)
| PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
| Martin Mrazik (mrazik) wrote : | # |
Same jenkins issue as in the previous job. Should be fixed now.


33 + a = is->optionGetGr adient4Alpha () / (float)0xffff;
Instead of using 0xffff here it might be better to use std::numeric_limits and static_cast
eg
a = is->optionGetGr adient4Alpha () / static_cast <float> (std::numeric_ limits <int>::max ())
Also I think an option name like gradient_4 sounds a bit weird especially as there's no correlation between "Outline Color" in the settings manager and Gradient4 in the code. Just use outline_color.