summaryrefslogtreecommitdiff
path: root/mate-panel
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2024-01-28 02:53:16 +0100
committerraveit65 <[email protected]>2024-02-04 18:37:58 +0100
commit03f528e7c28cddf1fd68cb63ee4372d715aeacc2 (patch)
treeb8beb2eb21e1bc376a21c25f043419206058d8c3 /mate-panel
parenta28797be4ad70d1546a7071af60ddf1a726a5c46 (diff)
downloadmate-panel-03f528e7c28cddf1fd68cb63ee4372d715aeacc2.tar.bz2
mate-panel-03f528e7c28cddf1fd68cb63ee4372d715aeacc2.tar.xz
Revert "Reduce scope of more code"
This reverts commit 655a8f484598a07a210dc56f1662021f8be69737.
Diffstat (limited to 'mate-panel')
-rw-r--r--mate-panel/libpanel-util/panel-color.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mate-panel/libpanel-util/panel-color.c b/mate-panel/libpanel-util/panel-color.c
index 15ebf686..661e6fb5 100644
--- a/mate-panel/libpanel-util/panel-color.c
+++ b/mate-panel/libpanel-util/panel-color.c
@@ -87,25 +87,25 @@ hls_to_rgb (gdouble *h, gdouble *l, gdouble *s)
{
gdouble lightness;
gdouble saturation;
+ gdouble m1, m2;
lightness = *l;
saturation = *s;
+ if (lightness <= 0.5)
+ m2 = lightness * (1 + saturation);
+ else
+ m2 = lightness + saturation - lightness * saturation;
+ m1 = 2 * lightness - m2;
+
if (saturation == 0) {
*h = lightness;
*l = lightness;
*s = lightness;
} else {
gdouble hue;
- gdouble m1, m2;
gdouble r, g, b;
- if (lightness <= 0.5)
- m2 = lightness * (1 + saturation);
- else
- m2 = lightness + saturation - lightness * saturation;
- m1 = 2 * lightness - m2;
-
hue = *h + 120;
while (hue > 360)
hue -= 360;