gui: ship the real icon set, wire toolbar/tray/window icon, rebase onto main

Adwaita-derived (GNOME Project, LGPL-3-or-CC-BY-SA), recoloured per light/dark
skin and laid out in IDM's toolbar positions per docs/03-gui-spec.md §1.
Licence and per-file provenance recorded in gui/resources/icons/LICENSE.

New IconTheme mirrors ThemeManager's colorSchemeChanged hook so a live
light/dark switch swaps every action's glyph, not just the QSS. Toolbar/menu
actions, the tray icon and the window icon all now use it instead of the
SP_ArrowDown placeholder. Install-path notes for PKG filed as R5 in
gui/docs/pkg-qa-requests-m1.md.

Also rebases lane/gui onto main (13 commits, no gui/ conflicts).

Verified: full build clean, all 13 gui ctest targets pass (including
gui_no_download_logic), unhappy-path DoD gate PASS against mockd
(--drop-connection).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
2026-09-15 17:50:51 +04:00
co-authored by Claude Sonnet 5
parent facd851824
commit 9487202ea8
32 changed files with 322 additions and 9 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "util/IconTheme.hpp"
#include <QGuiApplication>
#include <QStyleHints>
namespace velox::gui {
IconTheme::IconTheme(QObject *parent) : QObject(parent) {
connect(QGuiApplication::styleHints(), &QStyleHints::colorSchemeChanged, this,
&IconTheme::onColorSchemeChanged);
}
QIcon IconTheme::icon(const QString &name) {
const bool dark = QGuiApplication::styleHints()->colorScheme() == Qt::ColorScheme::Dark;
return QIcon(QStringLiteral(":/icons/%1/%2.svg")
.arg(dark ? QStringLiteral("dark") : QStringLiteral("light"), name));
}
QIcon IconTheme::appIcon() {
return QIcon(QStringLiteral(":/icons/app/velox.svg"));
}
void IconTheme::onColorSchemeChanged() {
emit iconsChanged();
}
} // namespace velox::gui
+34
View File
@@ -0,0 +1,34 @@
// Resolves action icons to the light/dark SVG variant matching the current
// QStyleHints::colorScheme(), same trigger ThemeManager uses for the QSS skin. Lane GUI.
// docs/03-gui-spec.md §1/§7, gui/resources/icons/LICENSE.
#pragma once
#include <QIcon>
#include <QObject>
#include <QString>
namespace velox::gui {
class IconTheme : public QObject {
Q_OBJECT
public:
explicit IconTheme(QObject *parent = nullptr);
/// `name` is a stem under gui/resources/icons/{light,dark}/, e.g. "add-url".
static QIcon icon(const QString &name);
/// The fixed full-colour glyph (window icon, tray icon) — same in both themes.
static QIcon appIcon();
signals:
/// Fired on a live light/dark switch; callers holding an icon(name) result should
/// re-fetch and re-apply it.
void iconsChanged();
private slots:
void onColorSchemeChanged();
};
} // namespace velox::gui