code cleanup

This commit is contained in:
Uwe Rathmann 2020-12-17 08:50:35 +01:00
parent 58de684902
commit 898791a440
2 changed files with 7 additions and 6 deletions

View File

@ -116,7 +116,6 @@ QSGNode* SpeedometerSkinlet::updatePanelNode(
QSGNode* SpeedometerSkinlet::updateLabelsNode( QSGNode* SpeedometerSkinlet::updateLabelsNode(
const Speedometer* speedometer, QSGNode* node ) const const Speedometer* speedometer, QSGNode* node ) const
{ {
using namespace QskAspect;
using Q = Speedometer; using Q = Speedometer;
const int labelsCount = speedometer->labels().count(); const int labelsCount = speedometer->labels().count();

View File

@ -18,15 +18,17 @@ QSK_SUBCONTROL( CustomSlider, Decoration )
CustomSlider::CustomSlider( QQuickItem* parentItem ) CustomSlider::CustomSlider( QQuickItem* parentItem )
: QskSlider( parentItem ) : QskSlider( parentItem )
{ {
using namespace QskRgb;
setBoxShapeHint( Fill, 0 ); setBoxShapeHint( Fill, 0 );
setGradientHint( Fill, QskRgb::Grey700 ); setGradientHint( Fill, Grey700 );
setColor( Scale, qRgb( 178, 178, 178 ) ); // for the ticks setColor( Scale, qRgb( 178, 178, 178 ) ); // for the ticks
setMetric( QskSlider::Handle | QskAspect::Size, 80 ); setMetric( Handle | QskAspect::Size, 80 );
setColor( QskSlider::Handle, QskRgb::Grey800 ); setColor( Handle, Grey800 );
for ( auto state : { Pressed, Focused | Hovered, Hovered, Focused } ) for ( auto state : { Pressed, Focused | Hovered, Hovered, Focused } )
setColor( QskSlider::Handle | state, QskRgb::Orange600 ); setColor( Handle | state, Orange600 );
setAnimation( QskSlider::Handle | QskAspect::Color, 1000 ); setAnimation( QskSlider::Handle | QskAspect::Color, 1000 );
for ( auto state : { Focused | Hovered, Hovered, Focused } ) for ( auto state : { Focused | Hovered, Hovered, Focused } )
@ -56,5 +58,5 @@ QSizeF CustomSlider::contentsSizeHint(
QRectF CustomSlider::focusIndicatorRect() const QRectF CustomSlider::focusIndicatorRect() const
{ {
return subControlRect( QskSlider::Handle ); return subControlRect( Handle );
} }