Fix sizes of content

This commit is contained in:
Clemens Manert 2023-04-25 22:43:51 +02:00 committed by uwerat
parent 29d1116af2
commit e46e602a37
2 changed files with 3 additions and 11 deletions

View File

@ -40,8 +40,7 @@ QskDrawer::QskDrawer( QQuickItem* parentItem ) :
setAnimationHint( QskDrawer::DasPanel | QskAspect::Metric, QskAnimationHint(300) ); setAnimationHint( QskDrawer::DasPanel | QskAspect::Metric, QskAnimationHint(300) );
setModal( false ); setModal( false );
setFaderAspect( QskDrawer::DasPanel | QskAspect::Metric );
setMetric( DasPanel, 0.1);
setFaderAspect( DasPanel | QskAspect::Metric ); setFaderAspect( DasPanel | QskAspect::Metric );
setSkinHint( Q::Overlay | QskAspect::Style, false ); setSkinHint( Q::Overlay | QskAspect::Style, false );
@ -52,6 +51,7 @@ QskDrawer::QskDrawer( QQuickItem* parentItem ) :
qDebug() << "Close this motherfucker"; qDebug() << "Close this motherfucker";
startTransition( DasPanel | QskAspect::Metric, QskAnimationHint(200), .0, 1.0 ); startTransition( DasPanel | QskAspect::Metric, QskAnimationHint(200), .0, 1.0 );
}); });
} }
QskDrawer::~QskDrawer() QskDrawer::~QskDrawer()
@ -74,7 +74,6 @@ void QskDrawer::setEdge( Qt::Edge edge ) {
void QskDrawer::setContent( QskControl* t ) { void QskDrawer::setContent( QskControl* t ) {
m_data->control = t; m_data->control = t;
t->setParentItem( m_data->content ); t->setParentItem( m_data->content );
// polish();
} }
void QskDrawer::updateLayout() { void QskDrawer::updateLayout() {
@ -83,7 +82,6 @@ void QskDrawer::updateLayout() {
} }
auto rect = parentItem()->childrenRect(); auto rect = parentItem()->childrenRect();
rect.setSize( {200, 400} ); //m_data->content->preferredSize() );
switch( m_data->edge ) { switch( m_data->edge ) {
case Qt::Edge::LeftEdge: case Qt::Edge::LeftEdge:
@ -108,14 +106,9 @@ void QskDrawer::updateLayout() {
Inherited::updateLayout(); Inherited::updateLayout();
} }
QSizeF QskDrawer::contentsSizeHint( Qt::SizeHint, const QSizeF& ) const {
return {200, 200};
}
void QskDrawer::aboutToShow() void QskDrawer::aboutToShow()
{ {
startTransition( DasPanel | QskAspect::Metric, QskAnimationHint(2000), 1.0, .0 ); startTransition( DasPanel | QskAspect::Metric, QskAnimationHint(200), 1.0, .0 );
Inherited::aboutToShow(); Inherited::aboutToShow();
} }

View File

@ -30,7 +30,6 @@ class QSK_EXPORT QskDrawer : public QskPopup
protected: protected:
void aboutToShow() override; void aboutToShow() override;
QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override;
Q_SIGNALS: Q_SIGNALS:
void edgeChanged( Qt::Edge ); void edgeChanged( Qt::Edge );