only enforce minimum button size when a non empty text is passed to Pushbutton SizeFromContents

wilder-pre-rebase
Hugo Pereira Da Costa 12 years ago
parent afdba7c3f4
commit acb0f01293
  1. 3
      kstyle/breezestyle.cpp

@ -2334,7 +2334,8 @@ namespace Breeze
}
// make sure buttons have a minimum width
size.rwidth() = qMax( size.rwidth(), int( Metrics::Button_MinWidth ) );
if( !buttonOption->text.isEmpty() )
{ size.rwidth() = qMax( size.rwidth(), int( Metrics::Button_MinWidth ) ); }
// finally add margins
return flat ? size : expandSize( size, Metrics::Frame_FrameWidth );

Loading…
Cancel
Save