SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
iconfactory.h File Reference
#include <QIcon>
#include <QString>
Include dependency graph for iconfactory.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::IconFactory
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

UI redesign P3 — theme-aware icon rendering. The repo's ~120 chrome SVGs hardcode a mid-gray glyph family (#777777 and friends), which is unreadable on a dark theme. IconFactory::icon(alias) returns a QIcon backed by ThemedIconEngine, which substitutes that gray family with the current theme's glyph color AT RENDER TIME (per QIcon mode: normal / active / selected / disabled) — the SVG files on disk stay byte-identical, so the 130 pre-existing plain QIcon(":/swmmvis/…") call sites keep rendering exactly as before and can migrate opportunistically.

Pixmaps are cached per (alias, scheme, mode, size, scale); a theme flip changes the cache key, so repaints pick up recolored glyphs with no explicit invalidation.