Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-11-05 09:35:02

jt1122
Member
Registered: 2021-03-26
Posts: 172

Animated icons

Hi,

Is it possible to have animated icons on the desktop or in panels?.

Thanks

Offline

#2 2022-11-05 11:06:50

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,528

Re: Animated icons

What exactly do you mean by "animated icons"? Do you mean like an animated gif as an icon? Or image animations?

Gtk3 supports keyframe image animations. For example, assuming a deskbar tasklist (window buttons) with only icons showing, something like this:

.tasklist button image { -gtk-icon-transform: scale(1.4); }
/* tasklist grow animation */
@keyframes grow {
   0% { -gtk-icon-transform: scale(1.4); } 
   10% { -gtk-icon-transform: scale(1.43); } 
   20% { -gtk-icon-transform: scale(1.46); }
   30% { -gtk-icon-transform: scale(1.49); } 
   40% { -gtk-icon-transform: scale(1.52); } 
   50% { -gtk-icon-transform: scale(1.55); } 
   60% { -gtk-icon-transform: scale(1.58); } 
   70% { -gtk-icon-transform: scale(1.61); }
   80% { -gtk-icon-transform: scale(1.64); } 
   90% { -gtk-icon-transform: scale(1.67); } 
   100% { -gtk-icon-transform: scale(1.7); } 
}
.tasklist button:hover image { 
  animation-name: grow;
  animation-duration: 10s;
  animation-timing-function: step-end;
  animation-delay: .2s
}

Will generate this:

kf.gif

Offline

#3 2022-11-05 11:10:20

jt1122
Member
Registered: 2021-03-26
Posts: 172

Re: Animated icons

Thanks.

I'm referring to an icon with a repeatedly changing image, something like an animated GIF.

https://www.flaticon.com/animated-icons

Cheers

Offline

#4 2022-11-05 20:50:19

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,528

Re: Animated icons

I don't believe so. I don't think xfdesktop or xfce4-panel are coded to handle animated images. At this point your limited to CSS animations.

Offline

#5 2022-11-05 22:21:15

agashamu
Member
From: California
Registered: 2021-03-01
Posts: 77

Re: Animated icons

How come animated cursors work?


Linux Mint Xfce 20.3

Offline

#6 2022-11-06 09:03:52

jt1122
Member
Registered: 2021-03-26
Posts: 172

Re: Animated icons

ToZ wrote:

I don't believe so. I don't think xfdesktop or xfce4-panel are coded to handle animated images. At this point your limited to CSS animations.

Thanks.

I was going to ask the same question as agashamu - there are animated cursors so why not icons?.

Cheers

Offline

#7 2022-11-11 11:35:57

jt1122
Member
Registered: 2021-03-26
Posts: 172

Re: Animated icons

Bump.

Offline

#8 2022-11-11 17:37:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 9,528

Re: Animated icons

If I had to guess, Xfce implements the Xcursor protocol, which allows for animated cursors.

Offline

#9 2022-11-11 21:56:39

jt1122
Member
Registered: 2021-03-26
Posts: 172

Re: Animated icons

Thanks.

Offline

Board footer

Powered by FluxBB