Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezestyle.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 2498 Lines • ▼ Show 20 Line(s) | 2492 | { | |||
---|---|---|---|---|---|
2499 | QSize size( contentsSize ); | 2499 | QSize size( contentsSize ); | ||
2500 | 2500 | | |||
2501 | // add relevant margin | 2501 | // add relevant margin | ||
2502 | const bool flat( !comboBoxOption->frame ); | 2502 | const bool flat( !comboBoxOption->frame ); | ||
2503 | const int frameWidth( pixelMetric( PM_ComboBoxFrameWidth, option, widget ) ); | 2503 | const int frameWidth( pixelMetric( PM_ComboBoxFrameWidth, option, widget ) ); | ||
2504 | if( !flat ) size = expandSize( size, frameWidth ); | 2504 | if( !flat ) size = expandSize( size, frameWidth ); | ||
2505 | 2505 | | |||
2506 | // make sure there is enough height for the button | 2506 | // make sure there is enough height for the button | ||
2507 | size.setHeight( qMax( size.height(), int(Metrics::MenuButton_IndicatorWidth) ) ); | 2507 | size.setHeight( qMax( size.height(), int(Metrics::MenuButton_IndicatorWidth) ) ); | ||
davidedmundson: you're still basing the height off the MenuButton_IndicatorWidth which you're otherwise not… | |||||
Good point, I didn't notice that it was using MenuButton_IndicatorWidth to set the height, but still, height seems to be fine, so I wouldn't change that. antlarr: Good point, I didn't notice that it was using MenuButton_IndicatorWidth to set the height, but… | |||||
2508 | 2508 | | |||
2509 | // add button width and spacing | 2509 | // add button width and spacing | ||
2510 | size.rwidth() += Metrics::MenuButton_IndicatorWidth; | 2510 | size.rwidth() += Metrics::MenuButton_IndicatorWidth+2; | ||
2511 | 2511 | | |||
2512 | return size; | 2512 | return size; | ||
2513 | 2513 | | |||
2514 | } | 2514 | } | ||
2515 | 2515 | | |||
2516 | //______________________________________________________________ | 2516 | //______________________________________________________________ | ||
2517 | QSize Style::spinBoxSizeFromContents( const QStyleOption* option, const QSize& contentsSize, const QWidget* widget ) const | 2517 | QSize Style::spinBoxSizeFromContents( const QStyleOption* option, const QSize& contentsSize, const QWidget* widget ) const | ||
2518 | { | 2518 | { | ||
▲ Show 20 Lines • Show All 4498 Lines • Show Last 20 Lines |
you're still basing the height off the MenuButton_IndicatorWidth which you're otherwise not using
Is that intentional?