Bug 273938 - Get rid of hardcoded icon sizes
Summary: Get rid of hardcoded icon sizes
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-23 09:26 UTC by Lukas Sommer
Modified: 2021-03-07 21:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Sommer 2011-05-23 09:26:49 UTC
Version:           unspecified (using Devel) 
OS:                Linux

Get rid of hardcoded icon sizes

Reproducible: Always


Actual Results:  
In the systemsettings->application appearance->icons->advanced dialog you can determine the size (in pixel) of some icons.

Expected Results:  
The icon sizes should not be hardcoded. This is important for use cases (see Bug 272266) where you use different screen (font) resolutions.

Example: The widget style "Skulpture" calculates the icon sizes for the icons in QMenu/KMenu depending of the font (dpi) sizes. If you use bigger fonts for your menu, the icons are displayed bigger. However, elements that are part of kdeui (for example the toolbar buttons) use the fixed pixel sizes of systemsettings. But it should adopt to the current font (dpi) size. Maybe in systemsettings there could be values like "very small", "small", "normal", "big" ... instead of pixel sizes, and these could be adopted to the dpi? Or the icon size options could even be removed and the decision is left to QStyle?

Could this be a feature for KDE 5?

This is a spin-off bug of Bug 272266
Comment 1 Christoph Feck 2011-05-23 12:21:35 UTC
With the current Qt SVG render capabilities, it is unfortunately not possible to generate the pixmaps directly from the SVG files, so only pixmaps can be scaled. The big problem here is that icon scaling results in very low quality icons because the icons get blurry.

This is the reason why icon themes come in discrete pre-generated sizes and the user is able to pick a size which she prefers. Skulpture simply ignores the Small and Large (=Dialog) icon size set in System Settings, which is wrong IMHO, but there were no such settings when I wrote it.

To resolve this issue, we either need better SVG support (including filters for the shadows etc.), or a completely new icon format that supports hinted scaling similar to fonts. Indeed KDE 5 material.

What this bug probably should be about is a much worse situation in some KDE components, mostly very old code and Kickoff: Hardcoded icon sizes, where the user has NO way to change them at all. Some bugs are already reported, but there might be more cases where applications or KDE components request hardcoded sizes.
Comment 2 Matt 2014-02-06 05:50:43 UTC
I'd like to see this fixed too.
Comment 3 eemantsal 2016-04-21 20:46:19 UTC
(In reply to Christoph Feck from comment #1)
> To resolve this issue, we either need better SVG support (including filters
> for the shadows etc.), or a completely new icon format that supports hinted
> scaling similar to fonts. Indeed KDE 5 material.

It's rather surprising that Scalable Vector Graphics can't be scaled using their vectorial nature. Is there any progress about this, now that we are already in KDE 5?
Comment 4 Christoph Feck 2016-06-18 04:54:50 UTC
Actually, the Breeze icons are SVG files. They simply omit the features QtSVG does not support.
Comment 5 Lukas Sommer 2021-03-07 21:39:56 UTC
Current KDE versions use SVG icons that scale nicely.

Closing.