summaryrefslogtreecommitdiff
diff options
-rw-r--r--plugins/unityshell/src/AbstractIconRenderer.h1
-rw-r--r--plugins/unityshell/src/IconRenderer.cpp21
-rw-r--r--plugins/unityshell/src/Launcher.cpp3
3 files changed, 14 insertions, 11 deletions
diff --git a/plugins/unityshell/src/AbstractIconRenderer.h b/plugins/unityshell/src/AbstractIconRenderer.h
index 8c5cd1b0f..cf78dd2df 100644
--- a/plugins/unityshell/src/AbstractIconRenderer.h
+++ b/plugins/unityshell/src/AbstractIconRenderer.h
@@ -105,7 +105,6 @@ public:
virtual ~AbstractIconRenderer() {}
nux::Property<PipRenderStyle> pip_style;
- nux::Property<nux::Color> background_color;
nux::Property<int> monitor;
// RenderArgs not const in case processor needs to modify positions to do a perspective correct.
diff --git a/plugins/unityshell/src/IconRenderer.cpp b/plugins/unityshell/src/IconRenderer.cpp
index 7f4f2278d..38454f724 100644
--- a/plugins/unityshell/src/IconRenderer.cpp
+++ b/plugins/unityshell/src/IconRenderer.cpp
@@ -418,22 +418,27 @@ void IconRenderer::RenderIcon(nux::GraphicsEngine& GfxContext, RenderArg const&
background = local::icon_selected_background[size];
}
- colorify.red += (0.5f + 0.5f * arg.saturation) * (nux::color::White.red - colorify.red);
- colorify.blue += (0.5f + 0.5f * arg.saturation) * (nux::color::White.blue - colorify.blue);
- colorify.green += (0.5f + 0.5f * arg.saturation) * (nux::color::White.green - colorify.green);
- background_tile_colorify.red += (0.5f + 0.5f * arg.saturation) * (nux::color::White.red - background_tile_colorify.red);
- background_tile_colorify.green += (0.5f + 0.5f * arg.saturation) * (nux::color::White.green - background_tile_colorify.green);
- background_tile_colorify.blue += (0.5f + 0.5f * arg.saturation) * (nux::color::White.blue - background_tile_colorify.blue);
+ colorify.red += (0.5f + 0.5f * arg.saturation) * (1.0f - colorify.red);
+ colorify.blue += (0.5f + 0.5f * arg.saturation) * (1.0f - colorify.blue);
+ colorify.green += (0.5f + 0.5f * arg.saturation) * (1.0f - colorify.green);
+ background_tile_colorify.red += (0.5f + 0.5f * arg.saturation) * (1.0f - background_tile_colorify.red);
+ background_tile_colorify.green += (0.5f + 0.5f * arg.saturation) * (1.0f - background_tile_colorify.green);
+ background_tile_colorify.blue += (0.5f + 0.5f * arg.saturation) * (1.0f - background_tile_colorify.blue);
if (arg.system_item)
{
- //backlight_intensity = (arg.keyboard_nav_hl) ? 0.85f : 0.3f ;
+ backlight_intensity = (arg.keyboard_nav_hl) ? 0.85f : 0.6f ;
glow_intensity = (arg.keyboard_nav_hl) ? 1.0f : 0.0f ;
background = local::squircle_base_selected;
glow = local::squircle_glow;
shine = local::squircle_shine;
- background_tile_colorify = background_color;
+
+ if (!arg.keyboard_nav_hl)
+ {
+ background_tile_colorify = arg.colorify;
+ background_tile_colorify = background_tile_colorify * 0.5f;
+ }
}
auto tile_transform = arg.icon->GetTransform(ui::IconTextureSource::TRANSFORM_TILE, monitor);
diff --git a/plugins/unityshell/src/Launcher.cpp b/plugins/unityshell/src/Launcher.cpp
index 4c5909065..1686b8144 100644
--- a/plugins/unityshell/src/Launcher.cpp
+++ b/plugins/unityshell/src/Launcher.cpp
@@ -875,7 +875,7 @@ void Launcher::SetupRenderArg(AbstractLauncherIcon* icon, struct timespec const&
{
float desat_value = IconDesatValue(icon, current);
arg.icon = icon;
- arg.alpha = 1.0f; //0.5f + 0.5f * desat_value;
+ arg.alpha = 0.5f + 0.5f * desat_value;
arg.saturation = desat_value;
arg.colorify = nux::color::White;
arg.running_arrow = icon->GetQuirk(AbstractLauncherIcon::QUIRK_RUNNING);
@@ -1054,7 +1054,6 @@ void Launcher::RenderArgs(std::list<RenderArg> &launcher_args,
clock_gettime(CLOCK_MONOTONIC, &current);
nux::Color colorify = FullySaturateColor(_background_color);
- icon_renderer->background_color = colorify;
float hover_progress = GetHoverProgress(current);
float folded_z_distance = _folded_z_distance * (1.0f - hover_progress);