uncrustified

This commit is contained in:
Uwe Rathmann 2022-09-13 12:22:20 +02:00
parent 1900adbabb
commit 7ca1e2f261
12 changed files with 23 additions and 18 deletions

View File

@ -12,7 +12,7 @@
/* /*
For M(aterial)3 the new HTC color system has been created, that For M(aterial)3 the new HTC color system has been created, that
is based on H(ue), (C)hroma, (T)one: is based on H(ue), (C)hroma, (T)one:
https://material.io/blog/science-of-color-design https://material.io/blog/science-of-color-design
This system allows to create color palettes by varying the tone This system allows to create color palettes by varying the tone
@ -80,8 +80,10 @@ inline constexpr QskHctColor QskHctColor::toned( qreal tone ) const noexcept
} }
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
class QDebug; class QDebug;
QSK_EXPORT QDebug operator<<( QDebug, const QskHctColor& ); QSK_EXPORT QDebug operator<<( QDebug, const QskHctColor& );
#endif #endif
#endif #endif

View File

@ -7,10 +7,10 @@
#include <qtextdocument.h> #include <qtextdocument.h>
static void qskRegisterTextOptions() static void qskRegisterTextOptions()
{ {
qRegisterMetaType< QskTextOptions >(); qRegisterMetaType< QskTextOptions >();
} }
Q_CONSTRUCTOR_FUNCTION( qskRegisterTextOptions ) Q_CONSTRUCTOR_FUNCTION( qskRegisterTextOptions )
int QskTextOptions::textFlags() const noexcept int QskTextOptions::textFlags() const noexcept

View File

@ -125,7 +125,7 @@ QSGNode* QskCheckBoxSkinlet::updateIndicatorNode(
#if 1 #if 1
/* /*
Our default skins do not have the concept of colorRoles Our default skins do not have the concept of colorRoles
implemented. Until then we do the recoloring manually here implemented. Until then we do the recoloring manually here
*/ */
QskColorFilter filter; QskColorFilter filter;

View File

@ -43,7 +43,7 @@ class QSK_EXPORT QskCheckBoxSkinlet : public QskSkinlet
private: private:
QRectF textRect( const QskCheckBox*, const QRectF& ) const; QRectF textRect( const QskCheckBox*, const QRectF& ) const;
QRectF boxRect( const QskCheckBox*, const QRectF& ) const; QRectF boxRect( const QskCheckBox*, const QRectF& ) const;
QSGNode* updateIndicatorNode( const QskCheckBox*, QSGNode* ) const; QSGNode* updateIndicatorNode( const QskCheckBox*, QSGNode* ) const;
QSGNode* updateTextNode( const QskCheckBox*, QSGNode* ) const; QSGNode* updateTextNode( const QskCheckBox*, QSGNode* ) const;
}; };

View File

@ -422,7 +422,7 @@ void QskControlPrivate::setPlacementPolicy(
else else
{ {
this->visiblePlacementPolicy = this->visiblePlacementPolicy =
( policy == QskPlacementPolicy::Reserve ) ? 1 : 0; ( policy == QskPlacementPolicy::Reserve ) ? 1 : 0;
if ( isTransparentForPositioner() ) if ( isTransparentForPositioner() )
{ {

View File

@ -59,7 +59,7 @@ QRectF QskPushButtonSkinlet::subControlRect( const QskSkinnable* skinnable,
if ( ( subControl == Q::Text ) || ( subControl == Q::Graphic ) ) if ( ( subControl == Q::Text ) || ( subControl == Q::Graphic ) )
{ {
const auto r = button->subControlContentsRect( contentsRect, Q::Panel ); const auto r = button->subControlContentsRect( contentsRect, Q::Panel );
LayoutEngine layoutEngine( button ); LayoutEngine layoutEngine( button );
layoutEngine.setGeometries( r ); layoutEngine.setGeometries( r );

View File

@ -236,12 +236,15 @@ QRectF QskSliderSkinlet::handleRect(
QRectF QskSliderSkinlet::rippleRect( QRectF QskSliderSkinlet::rippleRect(
const QskSlider* slider, const QRectF& rect ) const const QskSlider* slider, const QRectF& rect ) const
{ {
const auto rippleSize = slider->strutSizeHint( QskSlider::Ripple );
const auto handleSize = slider->strutSizeHint( QskSlider::Handle );
const auto w = ( rippleSize.width() - handleSize.width() ) / 2;
const auto h = ( rippleSize.height() - handleSize.height() ) / 2;
auto r = handleRect( slider, rect ); auto r = handleRect( slider, rect );
auto rippleSize = slider->strutSizeHint( QskSlider::Ripple );
auto handleSize = slider->strutSizeHint( QskSlider::Handle );
auto w = ( rippleSize.width() - handleSize.width() ) / 2,
h = ( rippleSize.height() - handleSize.height() ) / 2;
r = r.marginsAdded( { w, h, w, h } ); r = r.marginsAdded( { w, h, w, h } );
return r; return r;
} }

View File

@ -309,7 +309,7 @@ void QskTabBar::setEdge( Qt::Edge edge )
{ {
const auto oldEdge = this->edge(); const auto oldEdge = this->edge();
setFlagHint( Panel | QskAspect::Style, edge ); setFlagHint( Panel | QskAspect::Style, edge );
if ( edge == oldEdge ) if ( edge == oldEdge )
return; return;

View File

@ -88,7 +88,7 @@ QskTextOptions QskTabButton::textOptions() const
} }
void QskTabButton::resetTextOptions() void QskTabButton::resetTextOptions()
{ {
if ( resetTextOptionsHint( Text ) ) if ( resetTextOptionsHint( Text ) )
Q_EMIT textOptionsChanged(); Q_EMIT textOptionsChanged();
} }

View File

@ -104,7 +104,7 @@ QskTextOptions QskTextLabel::textOptions() const
} }
void QskTextLabel::resetTextOptions() void QskTextLabel::resetTextOptions()
{ {
if ( resetTextOptionsHint( Text ) ) if ( resetTextOptionsHint( Text ) )
Q_EMIT textOptionsChanged( textOptions() ); Q_EMIT textOptionsChanged( textOptions() );
} }

View File

@ -68,7 +68,7 @@ namespace
public: public:
RotationTransform( Qt::Axis axis, qreal dx1, qreal dy1, qreal dx2, RotationTransform( Qt::Axis axis, qreal dx1, qreal dy1, qreal dx2,
qreal dy2, qreal radians, QQuickItem* item ) qreal dy2, qreal radians, QQuickItem* item )
: QQuickTransform( item ) : QQuickTransform( item )
, m_axis( axis ) , m_axis( axis )
, m_dx1( dx1 ) , m_dx1( dx1 )

View File

@ -336,7 +336,7 @@ void QskSubcontrolLayoutEngine::setGraphicTextElements( const QskSkinnable* skin
GraphicElement* graphicElement = nullptr; GraphicElement* graphicElement = nullptr;
if ( !graphicSize.isEmpty() && ( graphicSubControl != QskAspect::Control ) ) if ( !graphicSize.isEmpty() && ( graphicSubControl != QskAspect::Control ) )
{ {
graphicElement = dynamic_cast< GraphicElement * >( element( graphicSubControl ) ); graphicElement = dynamic_cast< GraphicElement* >( element( graphicSubControl ) );
if ( graphicElement == nullptr ) if ( graphicElement == nullptr )
{ {
graphicElement = new GraphicElement( skinnable, graphicSubControl ); graphicElement = new GraphicElement( skinnable, graphicSubControl );
@ -445,7 +445,7 @@ QskSizePolicy QskSubcontrolLayoutEngine::sizePolicyAt( int index ) const
int QskSubcontrolLayoutEngine::count() const int QskSubcontrolLayoutEngine::count() const
{ {
return m_data->elements.count(); return m_data->elements.count();
} }
void QskSubcontrolLayoutEngine::layoutItems() void QskSubcontrolLayoutEngine::layoutItems()