From b038c1ac6bdac15b123946821bbff3ee25bfad2b Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 14 May 2009 05:09:58 -0700 Subject: Fixes combobox menu separator on XP While the delegate is somewhat abusing the ToolbarSeparator here, we should make sure we draw something for small heights as well. It seems microsoft requires us to allocate a few more pixels for the separator to actually be visible. Task-number: 249192 Reviewed-by: ogoffart --- src/gui/styles/qwindowsxpstyle.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 639eff0..3dac9f5 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -1792,7 +1792,12 @@ case PE_Frame: return; case PE_IndicatorToolBarSeparator: - + if (option->rect.height() < 3) { + // XP style requires a few pixels for the separator + // to be visible. + QWindowsStyle::drawPrimitive(pe, option, p, widget); + return; + } name = QLatin1String("TOOLBAR"); partId = TP_SEPARATOR; -- cgit v0.12