beautified
This commit is contained in:
parent
8010d70e4a
commit
ca2cdf7663
|
@ -84,9 +84,9 @@ inline bool QskArcMetrics::operator==(
|
|||
const QskArcMetrics& other ) const noexcept
|
||||
{
|
||||
return ( qskFuzzyCompare( m_width, other.m_width )
|
||||
&& qskFuzzyCompare( m_startAngle, other.m_startAngle )
|
||||
&& qskFuzzyCompare( m_spanAngle, other.m_spanAngle )
|
||||
&& m_sizeMode == other.m_sizeMode );
|
||||
&& qskFuzzyCompare( m_startAngle, other.m_startAngle )
|
||||
&& qskFuzzyCompare( m_spanAngle, other.m_spanAngle )
|
||||
&& m_sizeMode == other.m_sizeMode );
|
||||
}
|
||||
|
||||
inline bool QskArcMetrics::operator!=(
|
||||
|
|
|
@ -145,7 +145,7 @@ static inline QskGradientStops qskExtractedStops(
|
|||
}
|
||||
|
||||
const auto color =
|
||||
QskGradientStop::interpolated( stops[i-1], stops[i], from );
|
||||
QskGradientStop::interpolated( stops[i - 1], stops[i], from );
|
||||
|
||||
extracted += QskGradientStop( 0.0, color );
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ static inline QskGradientStops qskExtractedStops(
|
|||
extracted += QskGradientStop( pos, s.color() );
|
||||
}
|
||||
|
||||
const auto color = QskGradientStop::interpolated( stops[i-1], stops[i], to );
|
||||
const auto color = QskGradientStop::interpolated( stops[i - 1], stops[i], to );
|
||||
extracted += QskGradientStop( 1.0, color );
|
||||
|
||||
return extracted;
|
||||
|
@ -370,7 +370,7 @@ bool QskGradient::hasStopAt( qreal value ) const
|
|||
|
||||
uint QskGradient::hash( uint seed ) const
|
||||
{
|
||||
if ( m_stops.isEmpty() )
|
||||
if ( m_stops.isEmpty() )
|
||||
return seed;
|
||||
|
||||
uint hash = qHashBits( &m_orientation, sizeof( m_orientation ), seed );
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
#define RGB( color, weight ) color ## weight
|
||||
|
||||
#define RGBTABLE( c ) \
|
||||
{ \
|
||||
RGB( c, 50 ), RGB( c, 100 ), RGB( c, 200 ), RGB( c, 300 ), RGB( c, 400 ), \
|
||||
RGB( c, 500 ), RGB( c, 600 ), RGB( c, 700 ), RGB( c, 800 ), RGB( c, 900 ) \
|
||||
}
|
||||
{ \
|
||||
RGB( c, 50 ), RGB( c, 100 ), RGB( c, 200 ), RGB( c, 300 ), RGB( c, 400 ), \
|
||||
RGB( c, 500 ), RGB( c, 600 ), RGB( c, 700 ), RGB( c, 800 ), RGB( c, 900 ) \
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ static QskGradientStops qskColorStops(
|
|||
for ( int i = 1; i < count; i++ )
|
||||
{
|
||||
const qreal pos = i * step;
|
||||
stops += QskGradientStop( pos, rgb[i-1] );
|
||||
stops += QskGradientStop( pos, rgb[i - 1] );
|
||||
stops += QskGradientStop( pos, rgb[i] );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,15 +17,15 @@ QSK_SYSTEM_STATE( QskMenu, Selected, QskAspect::FirstSystemState << 2 )
|
|||
|
||||
class QskMenu::PrivateData
|
||||
{
|
||||
public:
|
||||
QVector< Entry > entries;
|
||||
QVector< QskGraphic > icons;
|
||||
public:
|
||||
QVector< Entry > entries;
|
||||
QVector< QskGraphic > icons;
|
||||
|
||||
QskTextOptions textOptions;
|
||||
QPointF origin;
|
||||
QskTextOptions textOptions;
|
||||
QPointF origin;
|
||||
|
||||
int currentIndex = 0;
|
||||
bool isPressed = false;
|
||||
int currentIndex = 0;
|
||||
bool isPressed = false;
|
||||
};
|
||||
|
||||
QskMenu::QskMenu( QQuickItem* parent )
|
||||
|
|
|
@ -19,12 +19,12 @@ class QSK_EXPORT QskMenu : public QskPopup
|
|||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY( QPointF origin READ origin
|
||||
WRITE setOrigin NOTIFY originChanged )
|
||||
WRITE setOrigin NOTIFY originChanged )
|
||||
|
||||
Q_PROPERTY( int count READ count )
|
||||
|
||||
Q_PROPERTY( int currentIndex READ currentIndex
|
||||
WRITE setCurrentIndex NOTIFY currentIndexChanged )
|
||||
WRITE setCurrentIndex NOTIFY currentIndexChanged )
|
||||
|
||||
using Inherited = QskPopup;
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ static QSGNode* qskUpdateTextNode( const QskMenu* menu,
|
|||
QskMenu::Text, Qt::AlignVCenter | Qt::AlignLeft );
|
||||
|
||||
return QskSkinlet::updateTextNode( menu, node, rect, alignment,
|
||||
text, menu->textOptions(), QskMenu::Text );
|
||||
text, menu->textOptions(), QskMenu::Text );
|
||||
}
|
||||
|
||||
static QSGNode* qskUpdateBackgroundNode( const QskMenu*, QSGNode* )
|
||||
|
|
|
@ -20,8 +20,8 @@ class QSK_EXPORT QskMenuSkinlet : public QskPopupSkinlet
|
|||
Q_INVOKABLE QskMenuSkinlet( QskSkin* = nullptr );
|
||||
~QskMenuSkinlet() = default;
|
||||
|
||||
QRectF subControlRect( const QskSkinnable*, const QRectF&,
|
||||
QskAspect::Subcontrol ) const override;
|
||||
QRectF subControlRect( const QskSkinnable*,
|
||||
const QRectF&, QskAspect::Subcontrol ) const override;
|
||||
|
||||
QSizeF sizeHint( const QskSkinnable*,
|
||||
Qt::SizeHint, const QSizeF& ) const override;
|
||||
|
|
|
@ -39,7 +39,7 @@ class QSK_EXPORT QskPushButton : public QskAbstractButton
|
|||
Q_PROPERTY( bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL )
|
||||
|
||||
Q_PROPERTY( QskBoxShapeMetrics shape READ shape
|
||||
WRITE setShape RESET resetShape NOTIFY shapeChanged )
|
||||
WRITE setShape RESET resetShape NOTIFY shapeChanged )
|
||||
|
||||
using Inherited = QskAbstractButton;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <qquickwindow.h>
|
||||
#include <qsgsimplerectnode.h>
|
||||
|
||||
static inline QRectF qskSceneAlignedRect( const QQuickItem* item , const QRectF& rect )
|
||||
static inline QRectF qskSceneAlignedRect( const QQuickItem* item, const QRectF& rect )
|
||||
{
|
||||
/*
|
||||
Aligning rect according to scene coordinates, so that
|
||||
|
|
|
@ -122,7 +122,7 @@ class QSK_EXPORT QskSkinlet
|
|||
void replaceChildNode( quint8 nodeRole, QSGNode* parentNode,
|
||||
QSGNode* oldNode, QSGNode* newNode ) const;
|
||||
|
||||
QSizeF hintWithoutConstraint(
|
||||
QSizeF hintWithoutConstraint(
|
||||
const QSizeF& hint, const QSizeF& constraint ) const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -44,7 +44,7 @@ class QSK_EXPORT QskStatusIndicator : public QskControl
|
|||
int status() const;
|
||||
bool hasStatus( int status ) const;
|
||||
|
||||
QList<int> statusList() const;
|
||||
QList< int > statusList() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setStatus( int status );
|
||||
|
|
|
@ -15,7 +15,7 @@ QskArcNode::~QskArcNode()
|
|||
}
|
||||
|
||||
void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& metrics,
|
||||
const QskGradient &gradient, QQuickWindow* window )
|
||||
const QskGradient& gradient, QQuickWindow* window )
|
||||
{
|
||||
m_metrics = metrics;
|
||||
m_gradient = gradient;
|
||||
|
@ -23,7 +23,7 @@ void QskArcNode::setArcData( const QRectF& rect, const QskArcMetrics& metrics,
|
|||
update( window, QskTextureRenderer::AutoDetect, rect.toRect() );
|
||||
}
|
||||
|
||||
void QskArcNode::paint( QPainter* painter, const QSizeF &size )
|
||||
void QskArcNode::paint( QPainter* painter, const QSizeF& size )
|
||||
{
|
||||
const qreal w = m_metrics.width();
|
||||
const QRectF rect( 0.5 * w, 0.5 * w, size.width() - w, size.height() - w );
|
||||
|
|
Loading…
Reference in New Issue