From 41702d8455a9e88ac70108e500a10e7bd4df2771 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Mon, 21 Oct 2019 21:23:08 +0200 Subject: Honor alpha for SH_Table_GridLineColor Make sure to honor the alpha channel for the color returned by SH_Table_GridLineColor. Fixes: QTBUG-74909 Change-Id: If9688329e5e2ab41833dfeb7e6292fdfcbf63aa1 Reviewed-by: Richard Moe Gustavsen --- src/widgets/styles/qcommonstyle.cpp | 2 +- src/widgets/styles/qfusionstyle.cpp | 2 +- src/widgets/styles/qstyle.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets/styles') diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 271b43fe89..861dd7a54c 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -5143,7 +5143,7 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget case SH_Table_GridLineColor: if (opt) - ret = opt->palette.color(QPalette::Mid).rgb(); + ret = opt->palette.color(QPalette::Mid).rgba(); else ret = -1; break; diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index b58dc1660a..0f01a70faa 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -3733,7 +3733,7 @@ int QFusionStyle::styleHint(StyleHint hint, const QStyleOption *option, const QW return 0; case SH_Table_GridLineColor: - return option ? option->palette.window().color().darker(120).rgb() : 0; + return option ? option->palette.window().color().darker(120).rgba() : 0; case SH_MessageBox_TextInteractionFlags: return Qt::TextSelectableByMouse | Qt::LinksAccessibleByMouse; diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 6cbed34c3a..d2f5ac76f9 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -1835,7 +1835,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment, \value SH_LineEdit_PasswordMaskDelay Determines the delay before visible character is masked with password character, in milliseconds. This enum value was added in Qt 5.4. - \value SH_Table_GridLineColor The RGB value of the grid for a table. + \value SH_Table_GridLineColor The RGBA value of the grid for a table. \value SH_UnderlineShortcut Whether shortcuts are underlined. -- cgit v1.2.3