QWindows11Style: Decrease bottomline frame thickness for QToolButton
Decrease the bottom line frame thickness for QToolButton by using fractional coordinates. Task-number: QTBUG-132261 Change-Id: I77a3acdd20c694dce38d809db9c3051949a98fa3 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 3e9baca7d2197bfc10d20de6f326e2749a8f781e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit f8adee805b9cb673ed66ffa22f5bb1896439e6b3)
This commit is contained in:
parent
5e75ef6d8b
commit
5e4b33f39d
@ -892,7 +892,7 @@ void QWindows11Style::drawPrimitive(PrimitiveElement element, const QStyleOption
|
||||
else
|
||||
painter->setPen(QPen(WINUI3Colors[colorSchemeIndex][controlStrokePrimary]));
|
||||
painter->setBrush(buttonFillBrush(option));
|
||||
painter->drawRoundedRect(rect.marginsAdded(QMargins(0.5, 0.5, 0.5, 0.5)),
|
||||
painter->drawRoundedRect(rect,
|
||||
secondLevelRoundingRadius, secondLevelRoundingRadius);
|
||||
|
||||
painter->setPen(Qt::NoPen);
|
||||
@ -904,8 +904,9 @@ void QWindows11Style::drawPrimitive(PrimitiveElement element, const QStyleOption
|
||||
painter->setBrush(option->palette.button());
|
||||
painter->drawRoundedRect(rect, secondLevelRoundingRadius, secondLevelRoundingRadius);
|
||||
if (isRaised) {
|
||||
const qreal sublineOffset = secondLevelRoundingRadius - 0.5;
|
||||
painter->setPen(QPen(WINUI3Colors[colorSchemeIndex][controlStrokeSecondary]));
|
||||
painter->drawLine(rect.bottomLeft() + QPoint(2,1), rect.bottomRight() + QPoint(-2,1));
|
||||
painter->drawLine(rect.bottomLeft() + QPointF(sublineOffset, 0.5), rect.bottomRight() + QPointF(-sublineOffset, 0.5));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user