Update to 1.0.90
Adwaita-qt now matches the new refreshed Adwaita theme
This commit is contained in:
parent
648b5dfbd6
commit
fb0568980d
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
|||||||
/adwaita-qt-0.97.tar.gz
|
/adwaita-qt-0.97.tar.gz
|
||||||
/adwaita-qt-0.98.tar.gz
|
/adwaita-qt-0.98.tar.gz
|
||||||
/adwaita-qt-1.0.tar.gz
|
/adwaita-qt-1.0.tar.gz
|
||||||
|
/adwaita-qt-1.0.90.tar.gz
|
||||||
|
85
adwaita-qt-fix-build-with-qt4.patch
Normal file
85
adwaita-qt-fix-build-with-qt4.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
From c1e3feb39676a05915110ecb98524cf7daa687c2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jan Grulich <jgrulich@redhat.com>
|
||||||
|
Date: Tue, 2 Jul 2019 13:08:36 +0200
|
||||||
|
Subject: Fix build against qt4
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/style/CMakeLists.txt b/style/CMakeLists.txt
|
||||||
|
index da9baf5..ce2e483 100644
|
||||||
|
--- a/style/CMakeLists.txt
|
||||||
|
+++ b/style/CMakeLists.txt
|
||||||
|
@@ -43,6 +43,7 @@ if (MSVC)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
+ ${QT_INCLUDES}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR} # for adwaita-config.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/animations/
|
||||||
|
diff --git a/style/adwaita.h b/style/adwaita.h
|
||||||
|
index 9b23aa4..165fb6a 100644
|
||||||
|
--- a/style/adwaita.h
|
||||||
|
+++ b/style/adwaita.h
|
||||||
|
@@ -102,8 +102,8 @@ namespace Adwaita
|
||||||
|
const bool SidePanelDrawFrame { false };
|
||||||
|
const bool MenuItemDrawStrongFocus { true };
|
||||||
|
const int WindowDragMode { 0 };
|
||||||
|
- const QStringList WindowDragWhiteList { };
|
||||||
|
- const QStringList WindowDragBlackList { };
|
||||||
|
+ const QStringList WindowDragWhiteList;
|
||||||
|
+ const QStringList WindowDragBlackList;
|
||||||
|
const bool UseWMMoveResize { true };
|
||||||
|
const bool SplitterProxyEnabled { true };
|
||||||
|
const int SplitterProxyWidth { 3 };
|
||||||
|
diff --git a/style/debug/adwaitawidgetexplorer.cpp b/style/debug/adwaitawidgetexplorer.cpp
|
||||||
|
index 323121d..93ee880 100644
|
||||||
|
--- a/style/debug/adwaitawidgetexplorer.cpp
|
||||||
|
+++ b/style/debug/adwaitawidgetexplorer.cpp
|
||||||
|
@@ -21,14 +21,20 @@
|
||||||
|
#include "adwaitawidgetexplorer.h"
|
||||||
|
|
||||||
|
#include "adwaita.h"
|
||||||
|
+#if QT_VERSION >= 0x050000
|
||||||
|
#include "adwaitadebug.h"
|
||||||
|
+#else
|
||||||
|
+#include <QDebug>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QApplication>
|
||||||
|
#include <QMouseEvent>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
+#if QT_VERSION >= 0x050000
|
||||||
|
Q_LOGGING_CATEGORY(ADWAITA, "adwaita.widgetexplorer")
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
namespace Adwaita
|
||||||
|
{
|
||||||
|
@@ -108,8 +114,11 @@ bool WidgetExplorer::eventFilter(QObject *object, QEvent *event)
|
||||||
|
QWidget *widget(qobject_cast<QWidget *>(object));
|
||||||
|
if (!widget)
|
||||||
|
return false;
|
||||||
|
-
|
||||||
|
+#if QT_VERSION >= 0x050000
|
||||||
|
qCDebug(ADWAITA)
|
||||||
|
+#else
|
||||||
|
+ qDebug()
|
||||||
|
+#endif
|
||||||
|
<< "Adwaita::WidgetExplorer::eventFilter -"
|
||||||
|
<< " event: " << event << " type: " << eventType(event->type())
|
||||||
|
<< " widget: " << widgetInformation(widget);
|
||||||
|
@@ -117,7 +126,12 @@ bool WidgetExplorer::eventFilter(QObject *object, QEvent *event)
|
||||||
|
// print parent information
|
||||||
|
QWidget *parent(widget->parentWidget());
|
||||||
|
while (parent) {
|
||||||
|
- qCDebug(ADWAITA) << " parent: " << widgetInformation(parent);
|
||||||
|
+#if QT_VERSION >= 0x050000
|
||||||
|
+ qCDebug(ADWAITA)
|
||||||
|
+#else
|
||||||
|
+ qDebug()
|
||||||
|
+#endif
|
||||||
|
+ << " parent: " << widgetInformation(parent);
|
||||||
|
parent = parent->parentWidget();
|
||||||
|
}
|
||||||
|
}
|
@ -1,14 +1,17 @@
|
|||||||
Name: adwaita-qt
|
Name: adwaita-qt
|
||||||
Version: 1.0
|
Version: 1.0.90
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Summary: Adwaita theme for Qt-based applications
|
Summary: Adwaita theme for Qt-based applications
|
||||||
|
|
||||||
Url: https://github.com/MartinBriza/adwaita-qt
|
Url: https://github.com/FedoraQt/adwaita-qt
|
||||||
Source0: https://github.com/MartinBriza/adwaita-qt/archive/%{version}/adwaita-qt-%{version}.tar.gz
|
Source0: https://github.com/FedoraQt/adwaita-qt/archive/%{version}/adwaita-qt-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: adwaita-qt-fix-build-with-qt4.patch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: qt4-devel
|
BuildRequires: qt4-devel
|
||||||
|
|
||||||
BuildRequires: qt5-qtbase-devel
|
BuildRequires: qt5-qtbase-devel
|
||||||
|
|
||||||
Requires: adwaita-qt4
|
Requires: adwaita-qt4
|
||||||
@ -40,6 +43,7 @@ Summary: Adwaita Qt common files
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
|
|
||||||
|
%patch0 -p1 -b .qt-fix-build-with-qt4
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p "%{_target_platform}-qt4"
|
mkdir -p "%{_target_platform}-qt4"
|
||||||
@ -74,6 +78,9 @@ make install/fast DESTDIR=%{buildroot} -C "%{_target_platform}-qt5"
|
|||||||
%files
|
%files
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 02 2019 Jan Grulich <jgrulich@redhat.com. - 1.0.90-1
|
||||||
|
- Update to 1.0.90
|
||||||
|
|
||||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-6
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
From 1a175067dfeec339ac77cbb12f23abc858f8f4bb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jan Grulich <jgrulich@redhat.com>
|
|
||||||
Date: Thu, 30 Jun 2016 11:28:00 +0200
|
|
||||||
Subject: Attempt to fix missing menubar issue for QtCreator
|
|
||||||
|
|
||||||
It shouldn't be necessary to set MenuBar size, as height should be already set by MenuBarItem and setting
|
|
||||||
width to 30px doesn't make much sense as it will be always wider
|
|
||||||
|
|
||||||
diff --git a/src/style/adwaita.cpp b/src/style/adwaita.cpp
|
|
||||||
index f751d50..9c719a0 100644
|
|
||||||
--- a/src/style/adwaita.cpp
|
|
||||||
+++ b/src/style/adwaita.cpp
|
|
||||||
@@ -1670,14 +1670,20 @@ QSize Adwaita::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt
|
|
||||||
}
|
|
||||||
case CT_MenuBarItem: {
|
|
||||||
//const QStyleOptionMenuItem *miopt = qstyleoption_cast<const QStyleOptionMenuItem*>(opt);
|
|
||||||
- return QSize(QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget).width() + 16, 30);
|
|
||||||
+ return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(16, 8);
|
|
||||||
}
|
|
||||||
case CT_MenuItem: {
|
|
||||||
return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(24, 0);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // FIXME: is it necessary to set MenuBar size? Height should be already set by MenuBarItem to 30px and setting
|
|
||||||
+ // width to 30px doesn't really make sense to me. Resolves: https://github.com/MartinBriza/adwaita-qt/issues/34
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
case CT_MenuBar: {
|
|
||||||
return QSize(30, 30);
|
|
||||||
}
|
|
||||||
+ */
|
|
||||||
case CT_ComboBox: {
|
|
||||||
return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget) + QSize(4, 6);
|
|
||||||
}
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (adwaita-qt-1.0.tar.gz) = 35993a9f99f9d41812d448d679a9e7a8cb15e8ed9b23a2ea9a33c61c1bfc98a226f8bea2fce3ff0dab29420ff10c4e4a4a800c9b989475cc66c4042257fe154c
|
SHA512 (adwaita-qt-1.0.90.tar.gz) = a49956f552e1629b90cda779ab60c900e1d82ffb2509b1258700dce2d7e356c7a490fe7a52878bf36d70e65c66a82ac663d7f84a5457461258502521f08bc0f1
|
||||||
|
Loading…
Reference in New Issue
Block a user