Evolving QIcon and theming: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Created page with "Category:QtCS2023 ==Session Summary== ==Session Owners== ==Notes==")
 
 
Line 2: Line 2:


==Session Summary==
==Session Summary==


==Session Owners==
==Session Owners==
Line 8: Line 7:


==Notes==
==Notes==
* QIcon::fromTheme() Suffers from XDG legacy. Missing many icons (last updated 2006).
* Fonts are used on both Android (Google Fonts) and Apple (SF Symbols - SF ~= "San Fransisco" font)
* Today you can have variations such as "fill", "rounded", "outline", "sharp".
* Should they be treated as themes? Maybe not? You might want non-filled and filled in the same application.
* How does that fit into the API to get QPixmaps? (e.g. I want "filled" icons): <syntaxhighlight lang="c++">
QPixmap QIcon::pixmap(const QSize &sz, QIcon::Mode mode = Normal, QIcon::State state = Off) const
</syntaxhighlight>
* Some platforms can have palette on icons for richer color set (Google Fonts/Material)
* Current tech preview implementation have some Opt-in:<syntaxhighlight lang="c++">
qgetenv("QT_ENABLE_EXPERIMENTAL_ICON_ENGINES")
</syntaxhighlight>
* Can we provide a default set of icons (also for those platforms who don't provide that, e.g. embedded)
* Can the naming schemes be unified across platforms (e.g. apple might use a different logical name than on Android)? => Qt can add enum (typesafe) to describe what icon you want (like QStyle::standardPixmap() ) => Don't forget that applications wants to also use their custom icons (possible today with ini files and string based lookup)
* Qt 6.7 will have a tech preview of the new icon engine implementation

Latest revision as of 15:11, 30 November 2023


Session Summary

Session Owners

Notes

  • QIcon::fromTheme() Suffers from XDG legacy. Missing many icons (last updated 2006).
  • Fonts are used on both Android (Google Fonts) and Apple (SF Symbols - SF ~= "San Fransisco" font)
  • Today you can have variations such as "fill", "rounded", "outline", "sharp".
  • Should they be treated as themes? Maybe not? You might want non-filled and filled in the same application.
  • How does that fit into the API to get QPixmaps? (e.g. I want "filled" icons):
    QPixmap QIcon::pixmap(const QSize &sz, QIcon::Mode mode = Normal, QIcon::State state = Off) const
    
  • Some platforms can have palette on icons for richer color set (Google Fonts/Material)
  • Current tech preview implementation have some Opt-in:
    qgetenv("QT_ENABLE_EXPERIMENTAL_ICON_ENGINES")
    
  • Can we provide a default set of icons (also for those platforms who don't provide that, e.g. embedded)
  • Can the naming schemes be unified across platforms (e.g. apple might use a different logical name than on Android)? => Qt can add enum (typesafe) to describe what icon you want (like QStyle::standardPixmap() ) => Don't forget that applications wants to also use their custom icons (possible today with ini files and string based lookup)
  • Qt 6.7 will have a tech preview of the new icon engine implementation