diff --git a/ico/icon-themes.qrc b/ico/icon-themes.qrc index 41889c2db..7ea5f7b3a 100644 --- a/ico/icon-themes.qrc +++ b/ico/icon-themes.qrc @@ -4,6 +4,12 @@ themes/qet/index.theme themes/qet-dark/index.theme + breeze-icons/16x16/apps/qelectrotech.png + breeze-icons/22x22/apps/qelectrotech.png + breeze-icons/32x32/apps/qelectrotech.png + breeze-icons/48x48/apps/qelectrotech.png + breeze-icons/64x64/apps/qelectrotech.png + breeze-icons/128x128/apps/qelectrotech.png qet/scalable/align-horizontal-center.svg qet/scalable/align-horizontal-left.svg qet/scalable/align-horizontal-right.svg diff --git a/misc/make_icon_themes.py b/misc/make_icon_themes.py index b44474333..7a784c7d2 100644 --- a/misc/make_icon_themes.py +++ b/misc/make_icon_themes.py @@ -314,6 +314,10 @@ BREEZE_PAGES = { PAGES = {name: f"breeze/{size}/{breeze}.svg" for name, (breeze, size) in BREEZE_PAGES.items()} PAGES["configure-shortcuts"] = "qet/pages/configure-shortcuts.svg" +# The app icon's theme name. Its PNGs, one per size, stay in +# ico/breeze-icons//apps/, where the packaging scripts install them from. +APP_ICON = "qelectrotech" + # Where the generator puts the 22 pixel Breeze art moved onto a 24 pixel # canvas (see on_24_canvas). BREEZE_24 = GENERATED / "breeze-24" @@ -645,6 +649,13 @@ def main(): changed += write_if_changed(target, dark_image) dark.append(f"themes/qet-dark/{size}/{name}.png") + # The app icon: Nuri's PNGs, used as they are. Colored art, so the + # dark theme inherits it. + for size in SIZES: + rel = f"breeze-icons/{size}/apps/{APP_ICON}.png" + if (ICO / rel).exists(): + light.append((f"themes/qet/{size}/{APP_ICON}.png", rel)) + svgs = [((ICO / rel).name.replace("-symbolic", ""), rel) for rel in SVGS] svgs += [(f"{name}.svg", rel) for name, rel in PAGES.items()] for name, rel in svgs: diff --git a/qelectrotech.qrc b/qelectrotech.qrc index 53c3663c5..cee4ba607 100644 --- a/qelectrotech.qrc +++ b/qelectrotech.qrc @@ -1,6 +1,5 @@ - ico/256x256/qelectrotech.png ico/256x256/qet.png ico/splash.png titleblocks/default.titleblock diff --git a/sources/newelementwizard.cpp b/sources/newelementwizard.cpp index 3cd3870e8..017f91a22 100644 --- a/sources/newelementwizard.cpp +++ b/sources/newelementwizard.cpp @@ -25,6 +25,7 @@ #include "qetmessagebox.h" #include "qfilenameedit.h" +#include #include #include #include @@ -45,7 +46,7 @@ NewElementWizard::NewElementWizard(QWidget *parent, Qt::WindowFlags f) : setWizardStyle(QWizard::MacStyle); #endif - setPixmap(LogoPixmap, QPixmap(":/ico/256x256/qelectrotech.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation)); + setPixmap(LogoPixmap, QIcon::fromTheme("qelectrotech").pixmap(64, 64)); setWindowTitle(tr("Créer un nouvel élément : Assistant", "window title")); setButtonText(QWizard::NextButton, tr("&Suivant >")); addPage(buildStep1());