Move skin related stuff to skins.
This commit is contained in:
parent
52d75a894f
commit
be3b2339e8
@ -12,6 +12,7 @@
|
||||
#include <QskComboBox.h>
|
||||
#include <QskColorFilter.h>
|
||||
#include <QskDialogButtonBox.h>
|
||||
#include <QskDrawer.h>
|
||||
#include <QskFocusIndicator.h>
|
||||
#include <QskFunctions.h>
|
||||
#include <QskGraphic.h>
|
||||
@ -84,6 +85,7 @@ namespace
|
||||
void setupCheckBox();
|
||||
void setupComboBox();
|
||||
void setupDialogButtonBox();
|
||||
void setupDrawer();
|
||||
void setupFocusIndicator();
|
||||
void setupInputPanel();
|
||||
void setupVirtualKeyboard();
|
||||
@ -150,6 +152,7 @@ void Editor::setup()
|
||||
setupCheckBox();
|
||||
setupComboBox();
|
||||
setupDialogButtonBox();
|
||||
setupDrawer();
|
||||
setupFocusIndicator();
|
||||
setupInputPanel();
|
||||
setupVirtualKeyboard();
|
||||
@ -786,6 +789,13 @@ void Editor::setupDialogButtonBox()
|
||||
setBoxBorderMetrics( Q::Panel, 0 );
|
||||
}
|
||||
|
||||
void Editor::setupDrawer() {
|
||||
using Q = QskDrawer;
|
||||
|
||||
setAnimation( Q::Panel | QskAspect::Position, 5000 );
|
||||
setHint( Q::Overlay | QskAspect::Style, false );
|
||||
}
|
||||
|
||||
void Editor::setupSlider()
|
||||
{
|
||||
using A = QskAspect;
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <QskCheckBox.h>
|
||||
#include <QskComboBox.h>
|
||||
#include <QskDialogButtonBox.h>
|
||||
#include <QskDrawer.h>
|
||||
#include <QskFocusIndicator.h>
|
||||
#include <QskInputPanelBox.h>
|
||||
#include <QskInputPredictionBar.h>
|
||||
@ -151,6 +152,7 @@ namespace
|
||||
void setupCheckBox();
|
||||
void setupComboBox();
|
||||
void setupDialogButtonBox();
|
||||
void setupDrawer();
|
||||
void setupFocusIndicator();
|
||||
void setupInputPanel();
|
||||
void setupInputPredictionBar();
|
||||
@ -275,6 +277,7 @@ void Editor::setup()
|
||||
setupCheckBox();
|
||||
setupComboBox();
|
||||
setupDialogButtonBox();
|
||||
setupDrawer();
|
||||
setupFocusIndicator();
|
||||
setupInputPanel();
|
||||
setupInputPredictionBar();
|
||||
@ -730,6 +733,13 @@ void Editor::setupDialogButtonBox()
|
||||
setBoxShape( Q::Panel, 2 );
|
||||
}
|
||||
|
||||
void Editor::setupDrawer() {
|
||||
using Q = QskDrawer;
|
||||
|
||||
setAnimation( Q::Panel | QskAspect::Position, qskDuration );
|
||||
setHint( Q::Overlay | QskAspect::Style, false );
|
||||
}
|
||||
|
||||
void Editor::setupTabButton()
|
||||
{
|
||||
using A = QskAspect;
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <QskQuick.h>
|
||||
|
||||
QSK_SUBCONTROL( QskDrawer, Panel )
|
||||
QSK_SUBCONTROL( QskDrawer, Overlay )
|
||||
|
||||
class QskDrawer::PrivateData {
|
||||
public:
|
||||
@ -27,14 +28,11 @@ QskDrawer::QskDrawer( QQuickItem* parentItem ) :
|
||||
|
||||
m_data->contentBox = new QskBox(this);
|
||||
m_data->contentBox->setSubcontrolProxy( QskBox::Panel, Panel );
|
||||
|
||||
setAnimationHint( Panel | QskAspect::Position, QskAnimationHint( 5000 ) );
|
||||
setSubcontrolProxy( Inherited::Overlay, Overlay );
|
||||
|
||||
setFaderAspect( Panel | QskAspect::Metric );
|
||||
|
||||
setSkinHint( Overlay | QskAspect::Style, false );
|
||||
|
||||
connect(this, &QskDrawer::closed, this, [this](){
|
||||
connect(this, &QskDrawer::closed, this, [this]() {
|
||||
startTransition( Panel | QskAspect::Metric,
|
||||
animationHint( Panel | QskAspect::Position ),
|
||||
0.0, 1.0 );
|
||||
@ -146,7 +144,7 @@ void QskDrawer::updateLayout() {
|
||||
} else if( alignment().testFlag( Qt::AlignRight) ) {
|
||||
x = ( parentSize.width() - contentSize.width() );
|
||||
}
|
||||
|
||||
|
||||
qskSetItemGeometry( m_data->contentBox,
|
||||
x, y,
|
||||
parentSize.width(), contentSize.height());
|
||||
|
@ -13,7 +13,7 @@ class QSK_EXPORT QskDrawer : public QskPopup
|
||||
Q_PROPERTY( Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged )
|
||||
|
||||
public:
|
||||
QSK_SUBCONTROLS( Panel )
|
||||
QSK_SUBCONTROLS( Panel, Overlay )
|
||||
QskDrawer( QQuickItem* parentItem = nullptr );
|
||||
~QskDrawer() override;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user