From 0c7b14401b31382eb14e6d19954928d8ef892e75 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Fri, 1 Apr 2022 15:58:47 +0200 Subject: [PATCH] change skin button added --- examples/gallery/main.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/examples/gallery/main.cpp b/examples/gallery/main.cpp index 6d4b79c3..7123fe62 100644 --- a/examples/gallery/main.cpp +++ b/examples/gallery/main.cpp @@ -10,12 +10,14 @@ #include #include +#include #include #include #include #include #include +#include #include #include @@ -53,17 +55,32 @@ namespace : QskLinearBox( Qt::Horizontal, parent ) { initSizePolicy( QskSizePolicy::Ignored, QskSizePolicy::Fixed ); + setMargins( 10 ); + setBackgroundColor( Qt::lightGray ); + + { + auto button = new QskPushButton( "Skin", this ); +#if 1 + button->setFlat( true ); // until we have the section bit in QskAspect +#endif + + // transition leads to errors, when changing the tab before being completed. TODO ... + connect( button, &QskSwitchButton::clicked, + [] { Skinny::changeSkin( 500 ); } ); + } addStretch( 10 ); - new QskTextLabel( "Enabled", this ); + { + new QskTextLabel( "Enabled", this ); - auto button = new QskSwitchButton( this ); - button->setChecked( true ); + auto button = new QskSwitchButton( this ); + button->setChecked( true ); - connect( button, &QskSwitchButton::toggled, - this, &Header::enabledToggled ); + connect( button, &QskSwitchButton::toggled, + this, &Header::enabledToggled ); + } } Q_SIGNALS: