Squiek settings for the spin box added
This commit is contained in:
parent
c0eb74f292
commit
9b2c2a8f12
|
@ -859,6 +859,7 @@ void Editor::setupSpinBox()
|
||||||
{
|
{
|
||||||
using Q = QskSpinBox;
|
using Q = QskSpinBox;
|
||||||
|
|
||||||
|
setFlagHint( Q::Panel | QskAspect::Style, Q::Buttons );
|
||||||
setSpacing( Q::Panel, 4_dp );
|
setSpacing( Q::Panel, 4_dp );
|
||||||
|
|
||||||
setStrutSize( Q::TextPanel, 80_dp, 40_dp );
|
setStrutSize( Q::TextPanel, 80_dp, 40_dp );
|
||||||
|
|
|
@ -1044,6 +1044,14 @@ void Editor::setupSpinBox()
|
||||||
setPadding( subControl, 0.0 );
|
setPadding( subControl, 0.0 );
|
||||||
setStrutSize( subControl, 20, 10 );
|
setStrutSize( subControl, 20, 10 );
|
||||||
setBoxShape( subControl, 0 );
|
setBoxShape( subControl, 0 );
|
||||||
|
|
||||||
|
const auto downState = ( subControl == Q::UpPanel )
|
||||||
|
? Q::Increasing : Q::Decreasing;
|
||||||
|
|
||||||
|
setButton( subControl | downState, Sunken, 1.0 );
|
||||||
|
|
||||||
|
setAnimation( subControl | A::Metric, 100 );
|
||||||
|
setAnimation( subControl | A::Color, 100 );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( auto subControl : { Q::UpIndicator, Q::DownIndicator } )
|
for ( auto subControl : { Q::UpIndicator, Q::DownIndicator } )
|
||||||
|
@ -1052,6 +1060,7 @@ void Editor::setupSpinBox()
|
||||||
#if 1
|
#if 1
|
||||||
setFontRole( subControl, QskSkin::TinyFont ); // until it is no graphic
|
setFontRole( subControl, QskSkin::TinyFont ); // until it is no graphic
|
||||||
#endif
|
#endif
|
||||||
|
setAnimation( subControl | A::Color, 100 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ QRectF QskSpinBoxSkinlet::buttonRect( const QskSkinnable* skinnable,
|
||||||
{
|
{
|
||||||
qreal x, y, w, h;
|
qreal x, y, w, h;
|
||||||
|
|
||||||
if ( decoration == QskSpinBox::UpDownControl )
|
if ( decoration == Q::UpDownControl )
|
||||||
{
|
{
|
||||||
const auto hint1 = spinBox->strutSizeHint( Q::UpPanel );
|
const auto hint1 = spinBox->strutSizeHint( Q::UpPanel );
|
||||||
const auto hint2 = spinBox->strutSizeHint( Q::DownPanel );
|
const auto hint2 = spinBox->strutSizeHint( Q::DownPanel );
|
||||||
|
|
Loading…
Reference in New Issue