added a minimum button width for buttons. This is similar to what's done in e.g. fusion, and enforces that all buttons in

dialogs have the same width, for instance
CCMAIL: hein@kde.org
wilder-pre-rebase
Hugo Pereira Da Costa 12 years ago
parent 40aa31a8ab
commit 12984e4ae1
  1. 2
      kstyle/breeze.h
  2. 3
      kstyle/breezestyle.cpp

@ -86,9 +86,11 @@ namespace Breeze
GroupBox_TitleMarginWidth = 4,
// buttons
Button_MinWidth = 80,
Button_MarginWidth = 6,
Button_BoxTextSpace = 4,
// tool buttons
ToolButton_MarginWidth = 6,
ToolButton_BoxTextSpace = 12,

@ -2322,6 +2322,9 @@ namespace Breeze
}
// make sure buttons have a minimum width
size.rwidth() = qMax( size.rwidth(), int( Metrics::Button_MinWidth ) );
// finally add margins
return flat ? size : expandSize( size, Metrics::Frame_FrameWidth );

Loading…
Cancel
Save