diff options
author | rbuj <[email protected]> | 2020-12-04 23:18:42 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-12-05 13:34:56 +0100 |
commit | 78ea6fd61a3e6d0d4601b2595126eb9b0ed76a42 (patch) | |
tree | 5f8d146a4a3deb583bbdefd5e0ca5add61716aff /mate-panel/panel-profile.c | |
parent | f577f3b17ff60cc54ef28e7c449e9f0739147bb3 (diff) | |
download | mate-panel-78ea6fd61a3e6d0d4601b2595126eb9b0ed76a42.tar.bz2 mate-panel-78ea6fd61a3e6d0d4601b2595126eb9b0ed76a42.tar.xz |
Fix solid color controls after disabling compositor
Diffstat (limited to 'mate-panel/panel-profile.c')
-rw-r--r-- | mate-panel/panel-profile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mate-panel/panel-profile.c b/mate-panel/panel-profile.c index 7625f6a8..a89a027d 100644 --- a/mate-panel/panel-profile.c +++ b/mate-panel/panel-profile.c @@ -23,7 +23,6 @@ */ #include <config.h> -#include <math.h> #include "panel-profile.h" #include "panel-layout.h" @@ -267,20 +266,20 @@ panel_profile_get_background_color (PanelToplevel *toplevel, void panel_profile_set_background_opacity (PanelToplevel *toplevel, - guint16 opacity) + gdouble percentage) { GdkRGBA color; panel_profile_get_background_color (toplevel, &color); - color.alpha = opacity / 65535.0; + color.alpha = percentage / 100.0; panel_profile_set_background_color (toplevel, &color); } -guint16 +gdouble panel_profile_get_background_opacity (PanelToplevel *toplevel) { GdkRGBA color; panel_profile_get_background_color (toplevel, &color); - return (guint16) round (color.alpha * 65535); + return color.alpha * 100.0; } void |