From f98af6d298671e36653d97a4cbddf2cf3805d53f Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Sun, 15 Jan 2023 08:44:57 +0100 Subject: [PATCH] M3 buttons: Fix icons Also for the gallery use the ones from M3. --- examples/gallery/button/ButtonPage.cpp | 3 +-- examples/gallery/gallery.pro | 3 +++ examples/gallery/icons.qrc | 5 +++++ examples/gallery/icons/plus.svg | 4 ++++ examples/gallery/icons/qvg/plus.qvg | Bin 0 -> 695 bytes skins/material3/QskMaterial3Skin.cpp | 8 ++++---- 6 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 examples/gallery/icons.qrc create mode 100644 examples/gallery/icons/plus.svg create mode 100644 examples/gallery/icons/qvg/plus.qvg diff --git a/examples/gallery/button/ButtonPage.cpp b/examples/gallery/button/ButtonPage.cpp index e0a177fd..540d4f8d 100644 --- a/examples/gallery/button/ButtonPage.cpp +++ b/examples/gallery/button/ButtonPage.cpp @@ -30,7 +30,6 @@ namespace void populate() { const char* texts[] = { "Press Me", "Check Me" }; - const char* graphics[] = { "diamond/khaki", "ellipse/sandybrown" }; for ( int i = 0; i < 6; i++ ) { @@ -42,7 +41,7 @@ namespace if ( i > 1 ) { - auto src = QStringLiteral( "image://shapes/" ) + graphics[ index ]; + auto src = QStringLiteral( "plus" ); button->setGraphicSource( src ); } diff --git a/examples/gallery/gallery.pro b/examples/gallery/gallery.pro index d282c339..cae45a37 100644 --- a/examples/gallery/gallery.pro +++ b/examples/gallery/gallery.pro @@ -48,3 +48,6 @@ HEADERS += \ SOURCES += \ Page.cpp \ main.cpp + +RESOURCES += \ + icons.qrc \ diff --git a/examples/gallery/icons.qrc b/examples/gallery/icons.qrc new file mode 100644 index 00000000..f6580c6a --- /dev/null +++ b/examples/gallery/icons.qrc @@ -0,0 +1,5 @@ + + + icons/qvg/plus.qvg + + diff --git a/examples/gallery/icons/plus.svg b/examples/gallery/icons/plus.svg new file mode 100644 index 00000000..ac5859d3 --- /dev/null +++ b/examples/gallery/icons/plus.svg @@ -0,0 +1,4 @@ + + + + diff --git a/examples/gallery/icons/qvg/plus.qvg b/examples/gallery/icons/qvg/plus.qvg new file mode 100644 index 0000000000000000000000000000000000000000..6d3d6d426add2d7d0d923486a45e3aadd1fc2570 GIT binary patch literal 695 zcmchVF&02D42BaOOh%InxP@*83(x)U;07epzZ%bo4oUh+{