diff options
| author | 2023-10-01 22:15:28 -0400 | |
|---|---|---|
| committer | 2023-10-01 22:15:28 -0400 | |
| commit | b4aec80fb155d11cde43352cf92090ee593807c5 (patch) | |
| tree | beb8d157a191d12bacb4aaa35b665c94f4df6269 /src/qt5gtk2-style/qgtkstyle.cpp | |
| parent | d34bb25414f6887dd788a4f817b4da903570e66a (diff) | |
New upstream version 1.0.upstream/1.0upstream
Diffstat (limited to 'src/qt5gtk2-style/qgtkstyle.cpp')
| -rw-r--r-- | src/qt5gtk2-style/qgtkstyle.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/qt5gtk2-style/qgtkstyle.cpp b/src/qt5gtk2-style/qgtkstyle.cpp index 024fe5f..4d1935f 100644 --- a/src/qt5gtk2-style/qgtkstyle.cpp +++ b/src/qt5gtk2-style/qgtkstyle.cpp @@ -1,6 +1,6 @@ /*************************************************************************** * Copyright (C) 2015 The Qt Company Ltd. * - * Copyright (C) 2016-2022 Ilya Kotov, forkotov02@ya.ru * + * Copyright (C) 2016-2023 Ilya Kotov, forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -381,13 +381,11 @@ QPalette QGtkStyle::standardPalette() const palette.setColor(QPalette::Window, bg); palette.setColor(QPalette::Button, bg); - palette.setColor(QPalette::Background, bg); QColor disabled((fg.red() + bg.red()) / 2, (fg.green() + bg.green())/ 2, (fg.blue() + bg.blue()) / 2); palette.setColor(QPalette::Disabled, QPalette::Text, disabled); palette.setColor(QPalette::Disabled, QPalette::WindowText, disabled); - palette.setColor(QPalette::Disabled, QPalette::Foreground, disabled); palette.setColor(QPalette::Disabled, QPalette::ButtonText, disabled); palette.setColor(QPalette::Highlight, highlight); // calculate disabled colors by removing saturation @@ -1031,12 +1029,12 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, QCommonStyle::drawPrimitive(element, option, painter, widget); if (!(option->state & State_Selected)) { break; - } else { - if (const QAbstractItemView *view = qobject_cast<const QAbstractItemView*>(widget)) { - if (!qobject_cast<QStyledItemDelegate*>(view->itemDelegate())) - break; - } - } // fall through + } + if (const QAbstractItemView *view = qobject_cast<const QAbstractItemView*>(widget)) { + if (!qobject_cast<QStyledItemDelegate*>(view->itemDelegate())) + break; + } + // fall through case PE_PanelItemViewItem: if (const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option)) { @@ -1702,7 +1700,6 @@ void QGtkStyle::drawComplexControl(ComplexControl control, const QStyleOptionCom bool sunken = (titleBar->activeSubControls & SC_TitleBarContextHelpButton) && (titleBar->state & State_Sunken); qt_gtk_draw_mdibutton(painter, titleBar, contextHelpButtonRect, hover, sunken); - QColor blend; QImage image(qt_titlebar_context_help); QColor alpha = textColor; alpha.setAlpha(128); @@ -3598,7 +3595,7 @@ QRect QGtkStyle::subControlRect(ComplexControl control, const QStyleOptionComple if (subControl == SC_GroupBoxFrame) return rect; - else if (subControl == SC_GroupBoxContents) { + if (subControl == SC_GroupBoxContents) { int margin = 0; int leftMarginExtension = 8; return frameRect.adjusted(leftMarginExtension + margin, margin + topHeight + groupBoxTitleMargin, -margin, -margin); |
