diff options
Diffstat (limited to 'src/qt5gtk2-style')
| -rw-r--r-- | src/qt5gtk2-style/plugin.cpp | 2 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtk2painter.cpp | 9 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtk2painter_p.h | 2 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtkglobal_p.h | 2 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtkpainter.cpp | 2 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtkpainter_p.h | 2 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtkstyle.cpp | 19 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtkstyle_p.cpp | 4 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtkstyle_p.h | 2 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qgtkstyle_p_p.h | 2 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qstylehelper.cpp | 3 | ||||
| -rw-r--r-- | src/qt5gtk2-style/qstylehelper_p.h | 2 |
12 files changed, 23 insertions, 28 deletions
diff --git a/src/qt5gtk2-style/plugin.cpp b/src/qt5gtk2-style/plugin.cpp index 4ab0bb5..70d4739 100644 --- a/src/qt5gtk2-style/plugin.cpp +++ b/src/qt5gtk2-style/plugin.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 * diff --git a/src/qt5gtk2-style/qgtk2painter.cpp b/src/qt5gtk2-style/qgtk2painter.cpp index fc7ebca..6f44c34 100644 --- a/src/qt5gtk2-style/qgtk2painter.cpp +++ b/src/qt5gtk2-style/qgtk2painter.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 * @@ -56,11 +56,10 @@ QPixmap QGtk2Painter::renderTheme(uchar *bdata, uchar *wdata, const QRect &rect) if (m_hflipped || m_vflipped) { return QPixmap::fromImage(converted.mirrored(m_hflipped, m_vflipped)); - } else { - // on raster graphicssystem we need to do a copy here, because - // we intend to deallocate the qimage bits shortly after... - return QPixmap::fromImage(converted.copy()); } + // on raster graphicssystem we need to do a copy here, because + // we intend to deallocate the qimage bits shortly after... + return QPixmap::fromImage(converted.copy()); } // This macro is responsible for painting any GtkStyle painting function onto a QPixmap diff --git a/src/qt5gtk2-style/qgtk2painter_p.h b/src/qt5gtk2-style/qgtk2painter_p.h index 05f6490..9c53796 100644 --- a/src/qt5gtk2-style/qgtk2painter_p.h +++ b/src/qt5gtk2-style/qgtk2painter_p.h @@ -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 * diff --git a/src/qt5gtk2-style/qgtkglobal_p.h b/src/qt5gtk2-style/qgtkglobal_p.h index ff3d612..2c19da0 100644 --- a/src/qt5gtk2-style/qgtkglobal_p.h +++ b/src/qt5gtk2-style/qgtkglobal_p.h @@ -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 * diff --git a/src/qt5gtk2-style/qgtkpainter.cpp b/src/qt5gtk2-style/qgtkpainter.cpp index ca19f7c..99ae828 100644 --- a/src/qt5gtk2-style/qgtkpainter.cpp +++ b/src/qt5gtk2-style/qgtkpainter.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 * diff --git a/src/qt5gtk2-style/qgtkpainter_p.h b/src/qt5gtk2-style/qgtkpainter_p.h index bcaae0b..22ea6cf 100644 --- a/src/qt5gtk2-style/qgtkpainter_p.h +++ b/src/qt5gtk2-style/qgtkpainter_p.h @@ -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 * 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); diff --git a/src/qt5gtk2-style/qgtkstyle_p.cpp b/src/qt5gtk2-style/qgtkstyle_p.cpp index 4ac2a2b..1bdf58c 100644 --- a/src/qt5gtk2-style/qgtkstyle_p.cpp +++ b/src/qt5gtk2-style/qgtkstyle_p.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 * @@ -386,7 +386,7 @@ bool QGtkStylePrivate::isKDE4Session() { static int version = -1; if (version == -1) - version = qgetenv("KDE_SESSION_VERSION").toInt(); + version = qEnvironmentVariableIntValue("KDE_SESSION_VERSION"); return (version == 4); } diff --git a/src/qt5gtk2-style/qgtkstyle_p.h b/src/qt5gtk2-style/qgtkstyle_p.h index 456f372..d206843 100644 --- a/src/qt5gtk2-style/qgtkstyle_p.h +++ b/src/qt5gtk2-style/qgtkstyle_p.h @@ -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 * diff --git a/src/qt5gtk2-style/qgtkstyle_p_p.h b/src/qt5gtk2-style/qgtkstyle_p_p.h index d03d977..46e38be 100644 --- a/src/qt5gtk2-style/qgtkstyle_p_p.h +++ b/src/qt5gtk2-style/qgtkstyle_p_p.h @@ -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 * diff --git a/src/qt5gtk2-style/qstylehelper.cpp b/src/qt5gtk2-style/qstylehelper.cpp index 00249ec..091d944 100644 --- a/src/qt5gtk2-style/qstylehelper.cpp +++ b/src/qt5gtk2-style/qstylehelper.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 * @@ -224,7 +224,6 @@ void drawDial(const QStyleOptionSlider *option, QPainter *painter) buttonColor.setHsv(buttonColor .hue(), qMin(140, buttonColor .saturation()), qMax(180, buttonColor.value())); - QColor shadowColor(0, 0, 0, 20); if (enabled) { // Drop shadow diff --git a/src/qt5gtk2-style/qstylehelper_p.h b/src/qt5gtk2-style/qstylehelper_p.h index d5453cb..c070f71 100644 --- a/src/qt5gtk2-style/qstylehelper_p.h +++ b/src/qt5gtk2-style/qstylehelper_p.h @@ -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 * |
