QskDrawer setting for Fluent2

This commit is contained in:
Uwe Rathmann 2023-08-10 13:36:01 +02:00
parent 3912fc3a91
commit c8316906d2
3 changed files with 31 additions and 4 deletions

View File

@ -73,6 +73,7 @@
#include <QskCheckBox.h> #include <QskCheckBox.h>
#include <QskComboBox.h> #include <QskComboBox.h>
#include <QskDialogButtonBox.h> #include <QskDialogButtonBox.h>
#include <QskDrawer.h>
#include <QskFocusIndicator.h> #include <QskFocusIndicator.h>
#include <QskGraphicLabel.h> #include <QskGraphicLabel.h>
#include <QskListView.h> #include <QskListView.h>
@ -195,6 +196,9 @@ namespace
void setupDialogButtonBoxMetrics(); void setupDialogButtonBoxMetrics();
void setupDialogButtonBoxColors( QskAspect::Section, const QskFluent2Theme& ); void setupDialogButtonBoxColors( QskAspect::Section, const QskFluent2Theme& );
void setupDrawerMetrics();
void setupDrawerColors( QskAspect::Section, const QskFluent2Theme& );
void setupFocusIndicatorMetrics(); void setupFocusIndicatorMetrics();
void setupFocusIndicatorColors( QskAspect::Section, const QskFluent2Theme& ); void setupFocusIndicatorColors( QskAspect::Section, const QskFluent2Theme& );
@ -289,6 +293,7 @@ void Editor::setupMetrics()
setupCheckBoxMetrics(); setupCheckBoxMetrics();
setupComboBoxMetrics(); setupComboBoxMetrics();
setupDialogButtonBoxMetrics(); setupDialogButtonBoxMetrics();
setupDrawerMetrics();
setupFocusIndicatorMetrics(); setupFocusIndicatorMetrics();
setupGraphicLabelMetrics(); setupGraphicLabelMetrics();
setupListViewMetrics(); setupListViewMetrics();
@ -325,6 +330,7 @@ void Editor::setupColors( QskAspect::Section section, const QskFluent2Theme& the
setupCheckBoxColors( section, theme ); setupCheckBoxColors( section, theme );
setupComboBoxColors( section, theme ); setupComboBoxColors( section, theme );
setupDialogButtonBoxColors( section, theme ); setupDialogButtonBoxColors( section, theme );
setupDrawerColors( section, theme );
setupFocusIndicatorColors( section, theme ); setupFocusIndicatorColors( section, theme );
setupGraphicLabelColors( section, theme ); setupGraphicLabelColors( section, theme );
setupGraphicLabelMetrics(); setupGraphicLabelMetrics();
@ -597,6 +603,26 @@ void Editor::setupDialogButtonBoxColors(
theme.palette.background.solid.base ); theme.palette.background.solid.base );
} }
void Editor::setupDrawerMetrics()
{
using Q = QskDrawer;
setPadding( Q::Panel, 5 );
setHint( Q::Overlay | QskAspect::Style, false );
#if 1
setAnimation( Q::Panel | QskAspect::Position, 200 );
#endif
}
void Editor::setupDrawerColors(
QskAspect::Section section, const QskFluent2Theme& theme )
{
using Q = QskDrawer;
setGradient( Q::Panel | section, theme.palette.background.solid.base );
}
void Editor::setupFocusIndicatorMetrics() void Editor::setupFocusIndicatorMetrics()
{ {
using Q = QskFocusIndicator; using Q = QskFocusIndicator;

View File

@ -812,8 +812,9 @@ void Editor::setupDrawer()
setPadding( Q::Panel, 5_dp ); setPadding( Q::Panel, 5_dp );
setGradient( Q::Panel, m_pal.background ); setGradient( Q::Panel, m_pal.background );
setAnimation( Q::Panel | QskAspect::Position, qskDuration );
setHint( Q::Overlay | QskAspect::Style, false ); setHint( Q::Overlay | QskAspect::Style, false );
setAnimation( Q::Panel | QskAspect::Position, qskDuration );
} }
void Editor::setupSlider() void Editor::setupSlider()

View File

@ -15,15 +15,15 @@ class QSK_EXPORT QskDrawer : public QskPopup
public: public:
QSK_SUBCONTROLS( Panel, Overlay ) QSK_SUBCONTROLS( Panel, Overlay )
QskDrawer( QQuickItem* parentItem = nullptr ); QskDrawer( QQuickItem* = nullptr );
~QskDrawer() override; ~QskDrawer() override;
void setEdge( Qt::Edge edge ); void setEdge( Qt::Edge );
Qt::Edge edge() const; Qt::Edge edge() const;
void updateLayout() override; void updateLayout() override;
void setContent( QskControl* t ); void setContent( QskControl* );
Q_SIGNALS: Q_SIGNALS:
void edgeChanged( Qt::Edge ); void edgeChanged( Qt::Edge );