Xfce Forum

Sub domains

You are not logged in.

#1 2020-07-28 03:06:11

Registered: 2020-07-24
Posts: 16

Linear gradients and mouse over lag

Could someone take a look at this piece of css please?
I got this whisker menu category section situation that is caused when using angled gradient:

@define-color whiskergradientstart #FFA500;
@define-color whiskergradientmid1 #EFAC30;
@define-color whiskergradientmid2 #F4BF5D;
@define-color whiskergradientmid3 #F4BF5D;
@define-color whiskergradientend #E5E5E5;
#whiskermenu-window scrolledwindow viewport
		color: @theme_text_color;
                border: 0.2px outset #ffff00;
		border-radius: 29px 0px 0px 29px;
		padding: 10px 20px 10px 20px;
		background: linear-gradient(70deg,
		@whiskergradientstart 0%, 
                @whiskergradientmid1 25%,
		@whiskergradientmid2 10%, 
                @whiskergradientend 50%);

If I use any type of a gradient that is not gradient to left or gradient to right, then mouse-over color will 'get stuck', stay highlighted over the hovered category - when focus is moved away from that category.

Would anyone know how could this be prevented?
E.g. desired outcome is when mouse is not focused on a category button for color to return to original state.

Last edited by Compositoron (2020-07-28 03:08:22)


#2 2020-07-29 02:33:23

From: Canada
Registered: 2011-06-02
Posts: 9,969

Re: Linear gradients and mouse over lag

It works fine for me - category button colour returns after un-hover. Here are some versions I'm testing this on:
- xfce4-panel 4.14.4
- xfce4-whiskermenu-plugin 2.4.6
- gtk3 3.24.21

Can you confirm your versions plus:

xfconf-query -c xsettings -p /Net/ThemeName
lspci -v | grep -A12 VGA

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---


#3 2020-08-02 01:23:16

Registered: 2020-07-24
Posts: 16

Re: Linear gradients and mouse over lag

It is my "learning gtk" mod of Dark Mint/Cold - pretty nice theme with a single .css in 3.2 folder. Complete rewrite as I am breaking down what is what and creating Xfce theme template(for quick theme creation).

$ xfconf-query -c xsettings -p /Net/ThemeName

$ lspci -v | grep -A12 VGA
04:00.0 VGA compatible controller: NVIDIA Corporation Device 21c4 (rev a1) (prog-if 00 [VGA controller])
Subsystem: Gigabyte Technology Co., Ltd Device 4014
Flags: bus master, fast devsel, latency 0, IRQ 30
Memory at ee000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at e0000000 (64-bit, prefetchable) [size=32M]
I/O ports at e000 [size=128]
[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nvidia

the above is gtx 1660 super

I do get that lag with standard css.
But I found the answer last night smile!
I think gtk prefers its own css declarations over standard css.

Example of angled gradient on pop and drop menus;

following script will prevent all and any mouse over color lag:

@define-color GRAD_popdropmenuI 	#A0BED7;
@define-color GRAD_popdropmenuII 	#CBC2C2;
@define-color GRAD_popdropmenuIII  #FFF;


		background-image: -gtk-gradient (
		0.7 0.9, 0.3 0.1,
        	from (@GRAD_popdropmenuIII),
        	color-stop (0.2, @GRAD_popdropmenuI),
		color-stop (0.2, @GRAD_popdropmenuIII),
        	to (@GRAD_popdropmenuII)

following will cause mouse over color lag (at least on my machine):

@define-color GRAD_popdropmenuI 	#A0BED7;
@define-color GRAD_popdropmenuII 	#CBC2C2;
@define-color GRAD_popdropmenuIII  #FFF;

		background: linear-gradient(170deg,
		@GRAD_popdropmenuIII 50%,
		@GRAD_popdropmenuI 80.3%,
		@GRAD_popdropmenuIII  50%,
		@GRAD_popdropmenuII );

I am currently experimenting with different ui shapes (border-radius)on toolbars,buttons,crollbars and other elements, color gradients, text-shadows, box-shadows ....and anything interesting that css/gtk provides.

Themeing possibilities in Xfce/Gtk are amazing, in comparison to WIndfalls.
It is like escaping hell and walking into paradise!

Last edited by Compositoron (2020-08-02 01:24:58)


Board footer

Powered by FluxBB