m3 spinbox metrics improved

This commit is contained in:
Uwe Rathmann 2024-10-21 14:20:06 +02:00
parent 3d77cfbb7a
commit b7c2b27691

View File

@ -898,6 +898,7 @@ void Editor::setupSpinBox()
setHint( Q::Panel | QskAspect::Style, Q::ButtonsLeftAndRight ); setHint( Q::Panel | QskAspect::Style, Q::ButtonsLeftAndRight );
setStrutSize( Q::Panel, -1.0, 48_dp );
setBoxShape( Q::Panel, 4_dp ); setBoxShape( Q::Panel, 4_dp );
setBoxBorderMetrics( Q::Panel, 1_dp ); setBoxBorderMetrics( Q::Panel, 1_dp );
@ -916,14 +917,18 @@ void Editor::setupSpinBox()
for( const auto subControl : { Q::DownPanel, Q::UpPanel, Q::TextPanel } ) for( const auto subControl : { Q::DownPanel, Q::UpPanel, Q::TextPanel } )
{ {
setBoxShape( subControl, 4_dp );
setBoxBorderMetrics( subControl, 1_dp ); setBoxBorderMetrics( subControl, 1_dp );
} }
setBoxShape( Q::TextPanel, 4_dp );
setBoxShape( Q::DownPanel, 100, Qt::RelativeSize );
setBoxShape( Q::UpPanel, 100, Qt::RelativeSize );
for( const auto subControl : { Q::DownPanel, Q::UpPanel } ) for( const auto subControl : { Q::DownPanel, Q::UpPanel } )
{ {
setGradient( subControl | Q::Hovered, m_pal.primary8 ); setGradient( subControl | Q::Hovered, m_pal.primary8 );
setPadding( subControl, 10 ); setPadding( subControl, 11_dp );
} }
{ {