using 0/1 for closed/open ( instead of 1/0 )
This commit is contained in:
parent
25461aaaf6
commit
e56360480f
|
@ -745,8 +745,8 @@ void Editor::setupMenuMetrics()
|
|||
setPadding( Q::Icon, { 8, 8, 0, 8 } );
|
||||
|
||||
#if 1
|
||||
setPosition( Q::Panel, 0 );
|
||||
setPosition( Q::Panel | QskPopup::Closed, 1 );
|
||||
setPosition( Q::Panel, 1 );
|
||||
setPosition( Q::Panel | QskPopup::Closed, 0 );
|
||||
|
||||
// copied from Mat3 - what are the correct values for Fluent2 ???
|
||||
setAnimation( Q::Panel | A::Metric, 150 );
|
||||
|
|
|
@ -378,8 +378,8 @@ void Editor::setupMenu()
|
|||
setColor( Q::Text, m_pal.onSurface );
|
||||
setFontRole( Q::Text, QskMaterial3Skin::M3BodyMedium );
|
||||
|
||||
setPosition( Q::Panel, 0 );
|
||||
setPosition( Q::Panel | QskPopup::Closed, 1 );
|
||||
setPosition( Q::Panel, 1 );
|
||||
setPosition( Q::Panel | QskPopup::Closed, 0 );
|
||||
|
||||
setAnimation( Q::Panel | A::Metric, 150 );
|
||||
setAnimation( Q::Cursor | A::Position | A::Metric, 75, QEasingCurve::OutCubic );
|
||||
|
|
|
@ -446,8 +446,8 @@ void Editor::setupMenu()
|
|||
setGraphicRole( Q::Icon | Q::Disabled, DisabledSymbol );
|
||||
setGraphicRole( Q::Icon | Q::Selected, CursorSymbol );
|
||||
|
||||
setPosition( Q::Panel, 0 );
|
||||
setPosition( Q::Panel | QskPopup::Closed, 1 );
|
||||
setPosition( Q::Panel, 1 );
|
||||
setPosition( Q::Panel | QskPopup::Closed, 0 );
|
||||
|
||||
setAnimation( Q::Panel | A::Metric, 150 );
|
||||
setAnimation( Q::Cursor | A::Position | A::Metric, 75, QEasingCurve::OutCubic );
|
||||
|
|
|
@ -108,6 +108,8 @@ static inline QRectF qskSlidingRect(
|
|||
auto x = 0.0;
|
||||
auto y = 0.0;
|
||||
|
||||
ratio = 1.0 - ratio;
|
||||
|
||||
switch( edge )
|
||||
{
|
||||
case Qt::LeftEdge:
|
||||
|
@ -437,7 +439,7 @@ QRectF QskDrawer::layoutRectForSize( const QSizeF& size ) const
|
|||
if ( isFading() )
|
||||
ratio = metric( faderAspect() );
|
||||
else
|
||||
ratio = isOpen() ? 0.0 : 1.0;
|
||||
ratio = isOpen() ? 1.0 : 0.0;
|
||||
|
||||
return qskSlidingRect( size, m_data->edge, ratio );
|
||||
}
|
||||
|
@ -467,8 +469,8 @@ void QskDrawer::itemChange( QQuickItem::ItemChange change,
|
|||
|
||||
void QskDrawer::setFading( bool on )
|
||||
{
|
||||
const qreal from = on ? 1.0 : 0.0;
|
||||
const qreal to = on ? 0.0 : 1.0;
|
||||
const qreal from = on ? 0.0 : 1.0;
|
||||
const qreal to = on ? 1.0 : 0.0;
|
||||
|
||||
const auto aspect = faderAspect();
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ void QskSlideInNode::updateTranslation( const QRectF& rect,
|
|||
{
|
||||
// clipping
|
||||
|
||||
if ( progress > 0.0 && progress <= 1.0 )
|
||||
if ( progress >= 0.0 && progress < 1.0 )
|
||||
{
|
||||
if ( d->clipNode == nullptr )
|
||||
{
|
||||
|
@ -85,7 +85,7 @@ void QskSlideInNode::updateTranslation( const QRectF& rect,
|
|||
// translation
|
||||
|
||||
qreal dx = 0.0;
|
||||
qreal dy = -progress* rect.height();
|
||||
qreal dy = ( progress - 1.0 ) * rect.height();
|
||||
|
||||
if ( dx != 0.0 || dy != 0.0 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue