Commit 2ec448d1 authored by Jens Bache-Wiig's avatar Jens Bache-Wiig
Browse files

Fixes: Fix a styling issue with toolbuttons

Details:
This ensures that the manhattan button arrow does not depend on the
menubutton indicator size, which it should not.
parent fdd77d8c
......@@ -894,11 +894,12 @@ void ManhattanStyle::drawComplexControl(ComplexControl control, const QStyleOpti
tool.rect = tool.rect.adjusted(2, 2, -2, -2);
drawPrimitive(PE_IndicatorArrowDown, &tool, painter, widget);
} else if (toolbutton->features & QStyleOptionToolButton::HasMenu) {
int mbi = pixelMetric(PM_MenuButtonIndicator, toolbutton, widget);
int arrowSize = 6;
QRect ir = toolbutton->rect.adjusted(1, 1, -1, -1);
QStyleOptionToolButton newBtn = *toolbutton;
newBtn.palette = panelPalette(option->palette);
newBtn.rect = QRect(ir.right() + 5 - mbi, ir.height() - mbi + 4, mbi - 6, mbi - 6);
newBtn.rect = QRect(ir.right() - arrowSize - 1,
ir.height() - arrowSize - 2, arrowSize, arrowSize);
QWindowsStyle::drawPrimitive(PE_IndicatorArrowDown, &newBtn, painter, widget);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment