Merge lp:~grindhold/sakura/fading_addendum into lp:~dabisu/sakura/sakura

Proposed by grindhold
Status: Merged
Merge reported by: David Gómez
Merged at revision: not available
Proposed branch: lp:~grindhold/sakura/fading_addendum
Merge into: lp:~dabisu/sakura/sakura
Diff against target: 74 lines (+37/-15)
1 file modified
src/sakura.c (+37/-15)
To merge this branch: bzr merge lp:~grindhold/sakura/fading_addendum
Reviewer Review Type Date Requested Status
David Gómez Approve
Review via email: mp+299621@code.launchpad.net

Description of the change

i modified my fading feature, so it works with light themes, too
before it only worked with dark themes :/

To post a comment you must log in.
Revision history for this message
David Gómez (dabisu) :
review: Approve
Revision history for this message
David Gómez (dabisu) wrote :

Thanks! Merged.

Revision history for this message
David Gómez (dabisu) wrote :

Could you check it the last version in the repository? Fading was working ok before but now it seems some recent change has broke it.

Revision history for this message
grindhold (grindhold) wrote :

On 10/07/2016 07:42 PM, David Gómez wrote:
> Could you check it the last version in the repository? Fading was working ok before but now it seems some recent change has broke it.

ahrgs. okay, i'll investigate when i have time. right now i have tasks
for two libraries on my agenda. thanks for the hint.

have a nice weekend

Revision history for this message
David Gómez (dabisu) wrote :

Thanks, no hurry. I was looking at it myself but couldn't find the problem.
I'll give it another shot when i have more time and i'm not so sleepy.

On Fri, Oct 7, 2016 at 8:21 PM, grindhold <email address hidden> wrote:

> On 10/07/2016 07:42 PM, David Gómez wrote:
> > Could you check it the last version in the repository? Fading was
> working ok before but now it seems some recent change has broke it.
>
> ahrgs. okay, i'll investigate when i have time. right now i have tasks
> for two libraries on my agenda. thanks for the hint.
>
> have a nice weekend
>
>
> --
> https://code.launchpad.net/~grindhold/sakura/fading_addendum/+merge/299621
> You are reviewing the proposed merge of lp:~grindhold/sakura/fading_addendum
> into lp:sakura.
>

--

David Gómez

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/sakura.c'
--- src/sakura.c 2016-07-07 10:20:41 +0000
+++ src/sakura.c 2016-07-09 21:39:36 +0000
@@ -43,7 +43,7 @@
43#define _(String) gettext(String)43#define _(String) gettext(String)
44#define N_(String) (String)44#define N_(String) (String)
45#define GETTEXT_PACKAGE "sakura"45#define GETTEXT_PACKAGE "sakura"
46#define FADE_PERCENT 50 46#define FADE_PERCENT 60
4747
48#define SAY(format,...) do {\48#define SAY(format,...) do {\
49 if (strcmp("Debug", BUILDTYPE)==0) {\49 if (strcmp("Debug", BUILDTYPE)==0) {\
@@ -1325,25 +1325,47 @@
1325static void1325static void
1326sakura_fade_out()1326sakura_fade_out()
1327{1327{
1328 for( int i=0; i<NUM_COLORSETS; i++) {1328 GdkRGBA x = sakura.forecolors[sakura.last_colorset-1];
1329 GdkRGBA x = sakura.forecolors[i];1329 if( (x.red + x.green + x.blue) / 3.0 > 0.5) {
1330 x.red = x.red/100.0 * FADE_PERCENT;1330 for( int i=0; i<NUM_COLORSETS; i++) {
1331 x.green = x.green/100.0 * FADE_PERCENT;1331 GdkRGBA x = sakura.forecolors[i];
1332 x.blue = x.blue/100.0 * FADE_PERCENT;1332 x.red = x.red/100.0 * FADE_PERCENT;
1333 sakura.forecolors[i]=x;1333 x.green = x.green/100.0 * FADE_PERCENT;
1334 }1334 x.blue = x.blue/100.0 * FADE_PERCENT;
1335 sakura.forecolors[i]=x;
1336 }
1337 } else {
1338 for( int i=0; i<NUM_COLORSETS; i++) {
1339 GdkRGBA x = sakura.forecolors[i];
1340 x.red = 1.0-x.red/100.0 * FADE_PERCENT;
1341 x.green = 1.0-x.green/100.0 * FADE_PERCENT;
1342 x.blue = 1.0-x.blue/100.0 * FADE_PERCENT;
1343 sakura.forecolors[i]=x;
1344 }
1345 }
1335}1346}
13361347
1337static void1348static void
1338sakura_fade_in()1349sakura_fade_in()
1339{1350{
1340 for( int i=0; i<NUM_COLORSETS; i++) {1351 GdkRGBA x = sakura.forecolors[sakura.last_colorset-1];
1341 GdkRGBA x = sakura.forecolors[i];1352 if( (x.red + x.green + x.blue) / 3.0 > 0.5) {
1342 x.red = x.red/FADE_PERCENT * 100.0;1353 for( int i=0; i<NUM_COLORSETS; i++) {
1343 x.green = x.green/FADE_PERCENT * 100.0;1354 GdkRGBA x = sakura.forecolors[i];
1344 x.blue = x.blue/FADE_PERCENT * 100.0;1355 x.red = x.red/FADE_PERCENT * 100.0;
1345 sakura.forecolors[i]=x;1356 x.green = x.green/FADE_PERCENT * 100.0;
1346 }1357 x.blue = x.blue/FADE_PERCENT * 100.0;
1358 sakura.forecolors[i]=x;
1359 }
1360 } else {
1361 for( int i=0; i<NUM_COLORSETS; i++) {
1362 GdkRGBA x = sakura.forecolors[i];
1363 x.red = 1.0-x.red/FADE_PERCENT * 100.0;
1364 x.green = 1.0-x.green/FADE_PERCENT * 100.0;
1365 x.blue = 1.0-x.blue/FADE_PERCENT * 100.0;
1366 sakura.forecolors[i]=x;
1367 }
1368 }
1347}1369}
13481370
1349static void1371static void

Subscribers

People subscribed via source and target branches