summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Graphics_Controls.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-10-21 17:40:09 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-10-22 12:22:09 +0200
commitc519dd2ea19cb6c53c29aeeb67e263f6b9f832b2 (patch)
treef567fa87154f2f561a310f102d387134a6abaa27 /vcl/qt5/Qt5Graphics_Controls.cxx
parent3f7515258e91266f10e5c7bafee2d3d6fa9c91c2 (diff)
Qt5 forward the flat push button style
Change-Id: I0835f66b8ce478f645ca2e5c376bef9a0740c8c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104637 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5/Qt5Graphics_Controls.cxx')
-rw-r--r--vcl/qt5/Qt5Graphics_Controls.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/qt5/Qt5Graphics_Controls.cxx b/vcl/qt5/Qt5Graphics_Controls.cxx
index b28734b4aefc..6f88d66a1c3b 100644
--- a/vcl/qt5/Qt5Graphics_Controls.cxx
+++ b/vcl/qt5/Qt5Graphics_Controls.cxx
@@ -306,8 +306,13 @@ bool Qt5Graphics_Controls::drawNativeControl(ControlType type, ControlPart part,
if (type == ControlType::Pushbutton)
{
+ const PushButtonValue& rPBValue = static_cast<const PushButtonValue&>(value);
assert(part == ControlPart::Entire);
QStyleOptionButton option;
+ if (nControlState & ControlState::DEFAULT)
+ option.features |= QStyleOptionButton::DefaultButton;
+ if (rPBValue.m_bFlatButton)
+ option.features |= QStyleOptionButton::Flat;
draw(QStyle::CE_PushButton, option, m_image.get(), rBackgroundColor,
vclStateValue2StateFlag(nControlState, value));
}