stackline icon indicating copy to clipboard operation
stackline copied to clipboard

Inactive pills disappear when in minimal mode

Open jesseleite opened this issue 3 years ago • 3 comments

I notice that when icons are enabled, if you focus away from the stack, the inactive stack icons lose their background colour and become completely transparent.

This looks fine when icons are enabled, but causes the whole pill to disappear when in minimal mode with icons disabled. Here's a gif showing how the pills disappear when the focus is moved away from the stack...

CleanShot 2021-06-24 at 13 49 10

jesseleite avatar Jun 24 '21 17:06 jesseleite

I'm also looking for a fix for this. Any luck?

b4rlw avatar Feb 24 '22 20:02 b4rlw

It has to do with the getColorAttrs, by modifying that function you can do as suits you

mizlan avatar Dec 08 '23 02:12 mizlan

diff --git a/stackline/window.lua b/stackline/window.lua
index 82a6eb5..be962f2 100644
--- a/stackline/window.lua
+++ b/stackline/window.lua
@@ -265,20 +265,13 @@ function Window:getColorAttrs(isStackFocused, isWinFocused) -- {{{
             ['false'] = {
                 window = {
                     ['true'] = {
-                        bg = u.extend(u.copy(opts.color), {
-                            alpha = opts.alpha / (opts.dimmer / 1.2),
-                        }),
-                        -- last-focused icon stays full alpha when stack unfocused
+                        bg = u.extend(opts.color, {alpha = opts.alpha}),
                         img = opts.alpha,
                     },
                     ['false'] = {
-                        bg = u.extend(u.copy(opts.color), {
-                            alpha = stackline.manager:getShowIconsState() and 0 or
-                                0.2,
-                        }),
-                        -- unfocused icon has slightly lower alpha when stack also unfocused
-                        img = opts.alpha /
-                            (opts.iconDimmer + (opts.iconDimmer * 0.70)),
+                        bg = u.extend(u.copy(opts.color),
+                            {alpha = opts.alpha / opts.dimmer}),
+                        img = opts.alpha / opts.iconDimmer,
                     },
                 },
             },

mizlan avatar Dec 09 '23 00:12 mizlan