Fix Qt4 item view widgets
This commit is contained in:
parent
fb0568980d
commit
9cf81d2c40
26
adwaita-qt-fix-qt4-style-option.patch
Normal file
26
adwaita-qt-fix-qt4-style-option.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/style/adwaitastyle.cpp b/style/adwaitastyle.cpp
|
||||
index 73ae36d..f079943 100644
|
||||
--- a/style/adwaitastyle.cpp
|
||||
+++ b/style/adwaitastyle.cpp
|
||||
@@ -4754,12 +4758,19 @@ bool Style::drawComboBoxLabelControl(const QStyleOption *option, QPainter *paint
|
||||
//
|
||||
bool Style::drawItemViewItemControl(const QStyleOption *option, QPainter *painter, const QWidget *widget) const
|
||||
{
|
||||
+#if QT_VERSION >= 0x050000
|
||||
const QStyleOptionViewItem *vopt = qstyleoption_cast<const QStyleOptionViewItem *>(option);
|
||||
+#else
|
||||
+ const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option);
|
||||
+#endif
|
||||
if (!vopt)
|
||||
return true;
|
||||
|
||||
- QStyleOptionViewItem op = QStyleOptionViewItem(*vopt);
|
||||
-
|
||||
+#if QT_VERSION >= 0x050000
|
||||
+ QStyleOptionViewItem op(*vopt);
|
||||
+#else
|
||||
+ QStyleOptionViewItemV4 op(*vopt);
|
||||
+#endif
|
||||
QPalette palette = op.palette;
|
||||
if ((vopt->state & QStyle::State_Enabled) && !(vopt->state & QStyle::State_Active)) {
|
||||
palette.setColor(QPalette::Inactive, QPalette::Text, palette.color(QPalette::Active, QPalette::Text));
|
@ -1,6 +1,6 @@
|
||||
Name: adwaita-qt
|
||||
Version: 1.0.90
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: LGPLv2+
|
||||
Summary: Adwaita theme for Qt-based applications
|
||||
|
||||
@ -8,6 +8,7 @@ Url: https://github.com/FedoraQt/adwaita-qt
|
||||
Source0: https://github.com/FedoraQt/adwaita-qt/archive/%{version}/adwaita-qt-%{version}.tar.gz
|
||||
|
||||
Patch0: adwaita-qt-fix-build-with-qt4.patch
|
||||
Patch1: adwaita-qt-fix-qt4-style-option.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: qt4-devel
|
||||
@ -44,6 +45,7 @@ Summary: Adwaita Qt common files
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
%patch0 -p1 -b .qt-fix-build-with-qt4
|
||||
%patch1 -p1 -b .qt-fix-qt4-style-option
|
||||
|
||||
%build
|
||||
mkdir -p "%{_target_platform}-qt4"
|
||||
@ -78,6 +80,9 @@ make install/fast DESTDIR=%{buildroot} -C "%{_target_platform}-qt5"
|
||||
%files
|
||||
|
||||
%changelog
|
||||
* Mon Jul 08 2019 Jan Grulich <jgrulich@redhat.com> - 1.0.90-2
|
||||
- Fix Qt4 item view widgets
|
||||
|
||||
* Tue Jul 02 2019 Jan Grulich <jgrulich@redhat.com. - 1.0.90-1
|
||||
- Update to 1.0.90
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user