clean up
This commit is contained in:
parent
1ccd19392b
commit
deb5df8edb
|
@ -6,7 +6,6 @@
|
|||
#include "CircularProgressBarSkinlet.h"
|
||||
#include "CircularProgressBar.h"
|
||||
|
||||
#include <QskArcNode.h>
|
||||
#include <QskPaintedNode.h>
|
||||
|
||||
#include <QEasingCurve>
|
||||
|
@ -42,7 +41,6 @@ QSGNode* CircularProgressBarSkinlet::updateSubNode(
|
|||
}
|
||||
case BarRole:
|
||||
{
|
||||
const auto subControl = CircularProgressBar::Bar;
|
||||
return updateArcNode( skinnable, node, CircularProgressBar::Bar,
|
||||
bar->window() );
|
||||
}
|
||||
|
|
|
@ -116,6 +116,8 @@ void Skin::initHints( const Palette& palette )
|
|||
|
||||
// the bar gradient is defined through the top bar items above
|
||||
ed.setArcMetrics( CircularProgressBar::Groove, { 8.53, 90 * 16, -360 * 16 } );
|
||||
// the span angle will be set in the progress bar, we just give a dummy
|
||||
// value here:
|
||||
ed.setArcMetrics( CircularProgressBar::Bar, { 8.53, 90 * 16, -180 * 16 } );
|
||||
|
||||
ed.setFontRole( TimeTitleLabel::Text, Skin::TitleFont );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************************************
|
||||
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
* QSkinny - Copyright (C) 2021 Uwe Rathmann
|
||||
* This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -110,8 +110,8 @@ QDebug operator<<( QDebug debug, const QskArcMetrics& metrics )
|
|||
|
||||
debug << "Arc" << '(';
|
||||
debug << "width:" << metrics.width();
|
||||
debug << "start angle:" << metrics.startAngle();
|
||||
debug << "span angle:" << metrics.spanAngle();
|
||||
debug << ", start angle:" << metrics.startAngle();
|
||||
debug << ", span angle:" << metrics.spanAngle();
|
||||
debug << ", size mode:" << metrics.sizeMode();
|
||||
debug << ')';
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************************************
|
||||
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
* QSkinny - Copyright (C) 2021 Uwe Rathmann
|
||||
* This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
|
@ -474,11 +474,11 @@ QskBoxBorderColors QskSkinHintTableEditor::boxBorderColors( QskAspect aspect ) c
|
|||
return colorHint< QskBoxBorderColors >( aspectBorder( aspect ) );
|
||||
}
|
||||
|
||||
void QskSkinHintTableEditor::setArcMetrics( QskAspect aspect, qreal startAngle,
|
||||
qreal endAngle, qreal width, Qt::SizeMode sizeMode )
|
||||
void QskSkinHintTableEditor::setArcMetrics( QskAspect aspect, qreal width,
|
||||
int startAngle, int spanAngle, Qt::SizeMode sizeMode )
|
||||
{
|
||||
setMetricHint( aspectArc( aspect ),
|
||||
QskArcMetrics( startAngle, endAngle, width, sizeMode ) );
|
||||
QskArcMetrics( width, startAngle, spanAngle, sizeMode ) );
|
||||
}
|
||||
|
||||
void QskSkinHintTableEditor::setArcMetrics( QskAspect aspect,
|
||||
|
|
|
@ -223,8 +223,8 @@ class QSK_EXPORT QskSkinHintTableEditor
|
|||
|
||||
// arcMetrics
|
||||
|
||||
void setArcMetrics( QskAspect,
|
||||
qreal, qreal, qreal, Qt::SizeMode = Qt::AbsoluteSize );
|
||||
void setArcMetrics( QskAspect, qreal, int, int,
|
||||
Qt::SizeMode = Qt::AbsoluteSize );
|
||||
|
||||
void setArcMetrics( QskAspect,
|
||||
const QskArcMetrics&, QskStateCombination = QskStateCombination() );
|
||||
|
|
|
@ -344,6 +344,7 @@ QSGNode* QskSkinlet::updateArcNode( const QskSkinnable* skinnable,
|
|||
const auto margins = skinnable->marginHint( subControl );
|
||||
|
||||
const auto arcRect = rect.marginsRemoved( margins );
|
||||
|
||||
if ( arcRect.isEmpty() )
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
/**********************************************************************
|
||||
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
* QSkinny - Copyright (C) 2021 Uwe Rathmann
|
||||
* This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
#include "QskArcNode.h"
|
||||
#include "QskArcRenderer.h"
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
QskArcNode::QskArcNode()
|
||||
{
|
||||
}
|
||||
|
@ -19,11 +17,10 @@ QskArcNode::~QskArcNode()
|
|||
void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& metrics,
|
||||
const QskGradient &gradient, QQuickWindow* window )
|
||||
{
|
||||
m_rect = rect;
|
||||
m_metrics = metrics;
|
||||
m_gradient = gradient;
|
||||
|
||||
update( window, QskTextureRenderer::AutoDetect, m_rect.toRect() );
|
||||
update( window, QskTextureRenderer::AutoDetect, rect.toRect() );
|
||||
}
|
||||
|
||||
void QskArcNode::paint( QPainter* painter, const QSizeF &size )
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**********************************************************************
|
||||
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
* QSkinny - Copyright (C) 2021 Uwe Rathmann
|
||||
* This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -23,7 +23,6 @@ class QSK_EXPORT QskArcNode : public QskPaintedNode
|
|||
uint hash() const override;
|
||||
|
||||
private:
|
||||
QRectF m_rect;
|
||||
QskArcMetrics m_metrics;
|
||||
QskGradient m_gradient;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/******************************************************************************
|
||||
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
||||
* QSkinny - Copyright (C) 2021 Uwe Rathmann
|
||||
* This file may be used under the terms of the QSkinny License, Version 1.0
|
||||
*****************************************************************************/
|
||||
|
||||
|
|
Loading…
Reference in New Issue