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 00000000..6d3d6d42 Binary files /dev/null and b/examples/gallery/icons/qvg/plus.qvg differ diff --git a/skins/material3/QskMaterial3Skin.cpp b/skins/material3/QskMaterial3Skin.cpp index b260ce30..23e3bef9 100644 --- a/skins/material3/QskMaterial3Skin.cpp +++ b/skins/material3/QskMaterial3Skin.cpp @@ -559,20 +559,20 @@ void Editor::setupPushButton() setFlagHint( Q::Panel | QskAspect::Direction, Qsk::LeftToRight ); setStrutSize( Q::Panel, -1, 40_dp ); - setSpacing( Q::Panel, 4_dp ); + setSpacing( Q::Panel, 8_dp ); setPadding( Q::Panel, { 24_dp, 0, 24_dp, 0 } ); setBoxShape( Q::Panel, 100, Qt::RelativeSize ); setAlignment( Q::Graphic, Qt::AlignCenter ); setStrutSize( Q::Graphic, 18_dp, 18_dp ); - setPadding( Q::Graphic, 0 ); + setPadding( Q::Graphic, { 0, 0, 8_dp, 0 } ); + setGraphicRole( Q::Graphic, QskMaterial3Skin::GraphicRoleOnPrimary ); setFontRole( Q::Text, QskMaterial3Skin::M3LabelLarge ); setPadding( Q::Text, 0 ); - setAlignment( Q::Text | A::Vertical, Qt::AlignCenter ); - setAlignment( Q::Text | A::Horizontal, Qt::AlignLeft | Qt::AlignVCenter ); + setAlignment( Q::Text, Qt::AlignCenter ); // normal buttons (i.e. Filled):