Zren / plasma-applet-tiledmenu

https://store.kde.org/p/2142716/
145 stars 34 forks source link

Face icon looks pixelated #67

Open derchr opened 4 years ago

derchr commented 4 years ago

Hello, the face icon in the sidebar looks a bit pixelated.

Maybe filtering thie .face png file would be a good practice, but I don't know a lot about QML and if this would be an easy task.

Another option would be to generate a smaller thumbnail every time the face icon gets changed.

Zren commented 4 years ago

Adding smooth: true to the IconItem in FlatButton.qml does nothing. IconItem appears to not use anti-aliased scaling. I could use a QML Image for just the FaceIcon, but I'd prefer not too.

I tried changing the face icon's iconSize in SidebarView.qml to use up half the space leftover to grow the icon from 22x22 => 32x32.

SidebarItem {
    iconName: kuser.faceIconUrl ? kuser.faceIconUrl : 'user-identity'
    iconSize: config.flatButtonIconSize + Math.round((config.flatButtonSize - config.flatButtonIconSize) / 2)

2020-07-07___10-43-52

It looks a bit better. Manjaro's default /etc/skel/.face looks okay too.

2020-07-07___10-53-04

derchr commented 4 years ago

I've considered a QML image too, but I wasn't very successful with it.

The fix iconSize: config.flatButtonIconSize + Math.round((config.flatButtonSize - config.flatButtonIconSize) / 2) seems to not affect the icon size much (at least in my case): comparison

Zren commented 4 years ago

Did you restart plasmashell (or relog) after editing the file? It's easier to test by running:

plasmawindowed com.github.zren.tiledmenu

https://zren.github.io/kde/docs/widget/#testing

derchr commented 4 years ago

Yes, i did restart plasmashell. With your command it's even simpler, thanks!

It seems like that it depends on the dpi settings if or how much the icon size will change.