1.1.90
This commit is contained in:
parent
404ad36f06
commit
7a75bc37b1
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,3 +11,4 @@
|
||||
/adwaita-qt-1.1.1.tar.gz
|
||||
/adwaita-qt-1.1.2.tar.gz
|
||||
/adwaita-qt-1.1.3.tar.gz
|
||||
/adwaita-qt-1.1.90.tar.gz
|
||||
|
39
adwaita-qt-upstream-fixes.patch
Normal file
39
adwaita-qt-upstream-fixes.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt
|
||||
index d3be838..b6bd930 100644
|
||||
--- a/src/lib/CMakeLists.txt
|
||||
+++ b/src/lib/CMakeLists.txt
|
||||
@@ -74,6 +74,8 @@ target_link_libraries(adwaitaqt
|
||||
adwaitaqtpriv
|
||||
)
|
||||
|
||||
+set_target_properties(adwaitaqtpriv PROPERTIES VERSION ${ADWAITAQT_VERSION} SOVERSION 1)
|
||||
+
|
||||
set_target_properties(adwaitaqt PROPERTIES VERSION ${ADWAITAQT_VERSION} SOVERSION 1)
|
||||
target_include_directories(adwaitaqt PUBLIC ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
||||
|
||||
diff --git a/src/lib/adwaita.h b/src/lib/adwaita.h
|
||||
index 1cb7e2c..ba8306d 100644
|
||||
--- a/src/lib/adwaita.h
|
||||
+++ b/src/lib/adwaita.h
|
||||
@@ -168,7 +168,7 @@ enum Metrics {
|
||||
// checkboxes and radio buttons
|
||||
CheckBox_Size = 22,
|
||||
CheckBox_FocusMarginWidth = 3,
|
||||
- CheckBox_ItemSpacing = 8,
|
||||
+ CheckBox_ItemSpacing = 4,
|
||||
|
||||
// menubar items
|
||||
MenuBarItem_MarginWidth = 8,
|
||||
diff --git a/src/style/adwaitastyle.cpp b/src/style/adwaitastyle.cpp
|
||||
index 86ba710..08f31ac 100644
|
||||
--- a/src/style/adwaitastyle.cpp
|
||||
+++ b/src/style/adwaitastyle.cpp
|
||||
@@ -1686,7 +1686,7 @@ QRect Style::checkBoxContentsRect(const QStyleOption *option, const QWidget *) c
|
||||
//___________________________________________________________________________________________________________________
|
||||
QRect Style::checkBoxIndicatorRect(const QStyleOption *option, const QWidget *widget) const
|
||||
{
|
||||
- return ParentStyleClass::subElementRect(SE_CheckBoxIndicator, option, widget).translated(Metrics::CheckBox_ItemSpacing, 0);
|
||||
+ return ParentStyleClass::subElementRect(SE_CheckBoxIndicator, option, widget);
|
||||
}
|
||||
|
||||
//___________________________________________________________________________________________________________________
|
@ -1,62 +0,0 @@
|
||||
diff --git a/style/adwaitastyle.cpp b/style/adwaitastyle.cpp
|
||||
index c50078f..7c3e1c2 100644
|
||||
--- a/style/adwaitastyle.cpp
|
||||
+++ b/style/adwaitastyle.cpp
|
||||
@@ -409,28 +409,19 @@ void Style::polish(QWidget *widget)
|
||||
|
||||
#if QT_VERSION > 0x050000
|
||||
// HACK to avoid different text color in unfocused views
|
||||
+ // This has a side effect that the view will never grey out, but it's still better then having
|
||||
+ // views greyed out when the application is active
|
||||
if (QPointer<QAbstractItemView> view = qobject_cast<QAbstractItemView *>(widget)) {
|
||||
- QWindow *win = widget ? widget->window()->windowHandle() : nullptr;
|
||||
- if (win) {
|
||||
- connect(win, &QWindow::activeChanged, this, [=] () {
|
||||
- if (view.isNull()) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- QPalette pal = view->palette();
|
||||
- if (win->isActive()) {
|
||||
- pal.setColor(QPalette::Inactive, QPalette::Text, pal.color(QPalette::Active, QPalette::Text));
|
||||
- } else {
|
||||
- polish(pal);
|
||||
- }
|
||||
- view->setPalette(pal);
|
||||
- });
|
||||
-
|
||||
- if (win->isActive()) {
|
||||
- QMetaObject::invokeMethod(win, "activeChanged", Qt::QueuedConnection);
|
||||
- }
|
||||
+ QPalette pal = view->palette();
|
||||
+ // TODO keep synced with the standard palette
|
||||
+ const QColor activeTextColor = _dark ? QColor("#eeeeec") : QColor("#2e3436");
|
||||
+ const QColor inactiveTextColor = _dark ? _helper->mix(QColor("#eeeeec"), _helper->darken(_helper->desaturate(QColor("#3d3846"), 1.0), 0.04)) :
|
||||
+ _helper->mix(QColor("#2e3436"), QColor("#f6f5f4"));
|
||||
+ // No custom text color used, we can do our HACK
|
||||
+ if (inactiveTextColor == pal.color(QPalette::Inactive, QPalette::Text) && activeTextColor == pal.color(QPalette::Active, QPalette::Text)) {
|
||||
+ pal.setColor(QPalette::Inactive, QPalette::Text, pal.color(QPalette::Active, QPalette::Text));
|
||||
+ view->setPalette(pal);
|
||||
}
|
||||
-
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4625,9 +4616,15 @@ bool Style::drawItemViewItemControl(const QStyleOption *option, QPainter *painte
|
||||
#endif
|
||||
#if QT_VERSION > 0x050000
|
||||
if (_helper->isWindowActive(widget)) {
|
||||
+ const QColor activeTextColor = _dark ? QColor("#eeeeec") : QColor("#2e3436");
|
||||
+ const QColor inactiveTextColor = _dark ? _helper->mix(QColor("#eeeeec"), _helper->darken(_helper->desaturate(QColor("#3d3846"), 1.0), 0.04)) :
|
||||
+ _helper->mix(QColor("#2e3436"), QColor("#f6f5f4"));
|
||||
+ // No custom text color used, we can do our HACK
|
||||
QPalette palette = op.palette;
|
||||
- palette.setColor(QPalette::Inactive, QPalette::Text, palette.color(QPalette::Active, QPalette::Text));
|
||||
- op.palette = palette;
|
||||
+ if (inactiveTextColor == palette.color(QPalette::Inactive, QPalette::Text) && activeTextColor == palette.color(QPalette::Active, QPalette::Text)) {
|
||||
+ palette.setColor(QPalette::Inactive, QPalette::Text, palette.color(QPalette::Active, QPalette::Text));
|
||||
+ op.palette = palette;
|
||||
+ }
|
||||
}
|
||||
#endif
|
||||
ParentStyleClass::drawControl(CE_ItemViewItem, &op, painter, widget);
|
@ -1,81 +1,86 @@
|
||||
# Force out of source build
|
||||
%undefine __cmake_in_source_build
|
||||
|
||||
|
||||
Name: adwaita-qt
|
||||
Version: 1.1.3
|
||||
Release: 4%{?dist}
|
||||
License: LGPLv2+
|
||||
Version: 1.1.90
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+ and GPLv2+
|
||||
Summary: Adwaita theme for Qt-based applications
|
||||
|
||||
Url: https://github.com/FedoraQt/adwaita-qt
|
||||
Source0: https://github.com/FedoraQt/adwaita-qt/archive/%{version}/adwaita-qt-%{version}.tar.gz
|
||||
|
||||
Patch0: adwaita-qt-views-do-not-set-colors-to-views-with-custom-colors.patch
|
||||
Patch0: adwaita-qt-upstream-fixes.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: qt4-devel
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qt5-qtx11extras-devel
|
||||
|
||||
Requires: adwaita-qt4
|
||||
BuildRequires: libxcb-devel
|
||||
|
||||
Obsoletes: adwaita-qt4 < 1.1.90
|
||||
Obsoletes: adwaita-qt-common < 1.1.90
|
||||
|
||||
Requires: adwaita-qt5
|
||||
|
||||
%description
|
||||
Theme to let Qt applications fit nicely into Fedora Workstation
|
||||
|
||||
|
||||
%package -n adwaita-qt4
|
||||
Summary: Adwaita Qt4 theme
|
||||
|
||||
%description -n adwaita-qt4
|
||||
Adwaita theme variant for applications utilizing Qt4
|
||||
|
||||
|
||||
# Use -qt5 naming in case we provide -qt6 version in the future
|
||||
%package -n adwaita-qt5
|
||||
Summary: Adwaita Qt5 theme
|
||||
Requires: libadwaita-qt5%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n adwaita-qt5
|
||||
Adwaita theme variant for applications utilizing Qt5
|
||||
Adwaita theme variant for applications utilizing Qt5.
|
||||
|
||||
%package -n libadwaita-qt5
|
||||
Summary: Adwaita Qt5 library
|
||||
|
||||
%package -n adwaita-qt-common
|
||||
Summary: Adwaita Qt common files
|
||||
%description -n libadwaita-qt5
|
||||
%{summary}.
|
||||
|
||||
%description -n adwaita-qt-common
|
||||
%package -n libadwaita-qt5-devel
|
||||
Summary: Development files for libadwaita-qt5
|
||||
Requires: libadwaita-qt5%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description -n libadwaita-qt5-devel
|
||||
The libadwaita-qt5-devel package contains libraries and header files for
|
||||
developing applications that use libadwaita-qt5.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
%global _vpath_builddir %{_target_platform}-qt4
|
||||
%cmake -DUSE_QT4=true
|
||||
%cmake_build
|
||||
|
||||
%global _vpath_builddir %{_target_platform}-qt5
|
||||
%cmake
|
||||
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%global _vpath_builddir %{_target_platform}-qt4
|
||||
%cmake_install
|
||||
%global _vpath_builddir %{_target_platform}-qt5
|
||||
%cmake_install
|
||||
|
||||
|
||||
%files -n adwaita-qt4
|
||||
%doc LICENSE.LGPL2 README.md
|
||||
%{_qt4_plugindir}/styles/adwaita.so
|
||||
|
||||
%files -n adwaita-qt5
|
||||
%doc LICENSE.LGPL2 README.md
|
||||
%{_qt5_plugindir}/styles/adwaita.so
|
||||
|
||||
%files -n adwaita-qt-common
|
||||
%files -n libadwaita-qt5
|
||||
%{_libdir}/libadwaitaqt.so.*
|
||||
%{_libdir}/libadwaitaqtpriv.so.*
|
||||
|
||||
%files
|
||||
%files -n libadwaita-qt5-devel
|
||||
%dir %{_includedir}/AdwaitaQt
|
||||
%{_includedir}/AdwaitaQt/*.h
|
||||
%dir %{_libdir}/cmake/AdwaitaQt
|
||||
%{_libdir}/cmake/AdwaitaQt/*.cmake
|
||||
%{_libdir}/pkgconfig/adwaita-qt.pc
|
||||
%{_libdir}/libadwaitaqt.so
|
||||
%{_libdir}/libadwaitaqtpriv.so
|
||||
|
||||
%changelog
|
||||
* Wed Sep 30 2020 Jan Grulich <jgrulich@redhat.com> - 1.1.90-1
|
||||
- 1.1.90
|
||||
|
||||
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-4
|
||||
- Second attempt - Rebuilt for
|
||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
@ -83,7 +88,7 @@ Summary: Adwaita Qt common files
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue May 20 2020 Jan Grulich <jgrulich@redhat.com> - 1.1.3-2
|
||||
* Wed May 20 2020 Jan Grulich <jgrulich@redhat.com> - 1.1.3-2
|
||||
- Views: do not set color to views which don't use our palette
|
||||
|
||||
* Fri May 15 2020 Jan Grulich <jgrulich@redhat.com> - 1.1.3-1
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (adwaita-qt-1.1.3.tar.gz) = 82abdd2320cbfcd6983d0ea8b07615ee2d675849d03b6fa61c8c18dcf5974136d80612cb308a5502714827b2e9358f2ee66091a2d9a19851969d8070c9a454bb
|
||||
SHA512 (adwaita-qt-1.1.90.tar.gz) = ae23a9d018dd64570d03bd7741ef3eafeaf812f55843e1cc527632bda18bd6f23a1ca58185b034b3a48025444c940a4f4b719d8e4cbf60454c8fc8bb7d2189ca
|
||||
|
Loading…
Reference in New Issue
Block a user