Merge lp:~cimi/notify-osd/color-tweaks into lp:~canonical-dx-team/notify-osd/precise

Proposed by Andrea Cimitan
Status: Merged
Approved by: Allan LeSage
Approved revision: 458
Merged at revision: 458
Proposed branch: lp:~cimi/notify-osd/color-tweaks
Merge into: lp:~canonical-dx-team/notify-osd/precise
Diff against target: 59 lines (+24/-7)
1 file modified
src/bubble.c (+24/-7)
To merge this branch: bzr merge lp:~cimi/notify-osd/color-tweaks
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
jenkins (community) continuous-integration Approve
John Lea (community) design Approve
Mirco Müller (community) Needs Information
Review via email: mp+100406@code.launchpad.net

Description of the change

Add some color tweak capabilities, and slightly start tweaking colors

To post a comment you must log in.
Revision history for this message
Mirco Müller (macslow) wrote :

What design-guideline (bug) requires this change?

review: Needs Information
Revision history for this message
Andrea Cimitan (cimi) wrote :

There's no bug, but you got the mail from John Lea. The goal is to make the color more vibrant and darker trying to mimic the overlay blending used in the dash but using over as operator.

Revision history for this message
Mirco Müller (macslow) wrote :

I would rather review this again, when the BGHash change (from Gord) is available... which is sometime later today then.

Revision history for this message
Andrea Cimitan (cimi) wrote :

up! :-)

Revision history for this message
John Lea (johnlea) wrote :

Signed off by design

review: Approve (design)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :

PASSED: Continuous integration, rev:458
http://s-jenkins:8080/job/notify-osd-ci/2/

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

was never approved, approving.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Allan LeSage (allanlesage) wrote :

Apologies on Jenkins' behalf for the mess--the code should land with this new approval. (Was caught expecting inline packaging to land and had to adjust.)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/bubble.c'
--- src/bubble.c 2012-03-09 21:20:47 +0000
+++ src/bubble.c 2012-04-10 10:47:21 +0000
@@ -119,6 +119,14 @@
119 A119 A
120};120};
121121
122typedef struct _NotifyHSVColor NotifyHSVColor;
123
124struct _NotifyHSVColor {
125 gdouble hue;
126 gdouble saturation;
127 gdouble value;
128};
129
122#define TEMPORARY_ICON_PREFIX_WORKAROUND 1130#define TEMPORARY_ICON_PREFIX_WORKAROUND 1
123#ifdef TEMPORARY_ICON_PREFIX_WORKAROUND131#ifdef TEMPORARY_ICON_PREFIX_WORKAROUND
124#warning "--== Using the icon-name-substitution! This is a temp. workaround not going to be maintained for long! ==--"132#warning "--== Using the icon-name-substitution! This is a temp. workaround not going to be maintained for long! ==--"
@@ -673,7 +681,16 @@
673 color_string = defaults_get_bubble_bg_color (d);681 color_string = defaults_get_bubble_bg_color (d);
674 gdk_rgba_parse (&color, color_string);682 gdk_rgba_parse (&color, color_string);
675 g_free (color_string);683 g_free (color_string);
676 684
685 // Apply color tweaks
686 NotifyHSVColor hsv_color;
687 gtk_rgb_to_hsv (color.red, color.green, color.blue,
688 &hsv_color.hue, &hsv_color.saturation, &hsv_color.value);
689 hsv_color.saturation *= (2.0f - hsv_color.saturation);
690 hsv_color.value = MIN (hsv_color.value, 0.4f);
691 gtk_hsv_to_rgb (hsv_color.hue, hsv_color.saturation, hsv_color.value,
692 &color.red, &color.green, &color.blue);
693
677 if (priv->composited)694 if (priv->composited)
678 {695 {
679 _draw_shadow (696 _draw_shadow (
@@ -695,16 +712,16 @@
695 cairo_fill (cr);712 cairo_fill (cr);
696 cairo_set_operator (cr, CAIRO_OPERATOR_OVER);713 cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
697 cairo_set_source_rgba (cr,714 cairo_set_source_rgba (cr,
698 0.75 * color.red,715 color.red,
699 0.75 * color.green,716 color.green,
700 0.75 * color.blue,717 color.blue,
701 BUBBLE_BG_COLOR_A);718 BUBBLE_BG_COLOR_A);
702 }719 }
703 else720 else
704 cairo_set_source_rgb (cr,721 cairo_set_source_rgb (cr,
705 0.75 * color.red,722 color.red,
706 0.75 * color.green,723 color.green,
707 0.75 * color.blue);724 color.blue);
708725
709 draw_round_rect (726 draw_round_rect (
710 cr,727 cr,

Subscribers

People subscribed via source and target branches