M3 buttons: Fix icons
Also for the gallery use the ones from M3.
This commit is contained in:
parent
84156b138e
commit
f98af6d298
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -48,3 +48,6 @@ HEADERS += \
|
|||
SOURCES += \
|
||||
Page.cpp \
|
||||
main.cpp
|
||||
|
||||
RESOURCES += \
|
||||
icons.qrc \
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<RCC>
|
||||
<qresource>
|
||||
<file>icons/qvg/plus.qvg</file>
|
||||
</qresource>
|
||||
</RCC>
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6.75H6.75V12H5.25V6.75H0V5.25H5.25V0H6.75V5.25H12V6.75Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 189 B |
Binary file not shown.
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in New Issue