Changeset View
Changeset View
Standalone View
Standalone View
kstyle/oxygenstyle.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 3167 Lines • ▼ Show 20 Line(s) | 3167 | { | |||
---|---|---|---|---|---|
3168 | contentsWidth += iconSize.width(); | 3168 | contentsWidth += iconSize.width(); | ||
3169 | if( hasText ) contentsWidth += Metrics::Header_ItemSpacing; | 3169 | if( hasText ) contentsWidth += Metrics::Header_ItemSpacing; | ||
3170 | } | 3170 | } | ||
3171 | 3171 | | |||
3172 | // contents height | 3172 | // contents height | ||
3173 | int contentsHeight( headerOption->fontMetrics.height() ); | 3173 | int contentsHeight( headerOption->fontMetrics.height() ); | ||
3174 | if( hasIcon ) contentsHeight = qMax( contentsHeight, iconSize.height() ); | 3174 | if( hasIcon ) contentsHeight = qMax( contentsHeight, iconSize.height() ); | ||
3175 | 3175 | | |||
3176 | if( horizontal ) | 3176 | if( horizontal && headerOption->sortIndicator != QStyleOptionHeader::None ) | ||
3177 | { | 3177 | { | ||
3178 | // also add space for icon | 3178 | // also add space for sort indicator | ||
3179 | contentsWidth += Metrics::Header_ArrowSize + Metrics::Header_ItemSpacing; | 3179 | contentsWidth += Metrics::Header_ArrowSize + Metrics::Header_ItemSpacing; | ||
3180 | contentsHeight = qMax( contentsHeight, int(Metrics::Header_ArrowSize) ); | 3180 | contentsHeight = qMax( contentsHeight, int(Metrics::Header_ArrowSize) ); | ||
3181 | } | 3181 | } | ||
3182 | 3182 | | |||
3183 | // update contents size, add margins and return | 3183 | // update contents size, add margins and return | ||
3184 | const QSize size( contentsSize.expandedTo( QSize( contentsWidth, contentsHeight ) ) ); | 3184 | const QSize size( contentsSize.expandedTo( QSize( contentsWidth, contentsHeight ) ) ); | ||
3185 | return expandSize( size, Metrics::Header_MarginWidth ); | 3185 | return expandSize( size, Metrics::Header_MarginWidth ); | ||
3186 | 3186 | | |||
▲ Show 20 Lines • Show All 5583 Lines • Show Last 20 Lines |