From 81e8190ed646b2431f214f74ccc16a51b8e7e4d7 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Wed, 2 Jun 2021 11:30:53 +0200 Subject: [PATCH] 1.3.0 --- ...er-versions-compatible-with-old-ones.patch | 22 +++++++++ ...tabs-to-full-height-or-width-of-tabs.patch | 48 +++++++++++++++++++ adwaita-qt.spec | 10 ++-- 3 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 adwaita-qt-make-newer-versions-compatible-with-old-ones.patch create mode 100644 adwaita-qt-tabwidget-dont-stretch-tabs-to-full-height-or-width-of-tabs.patch diff --git a/adwaita-qt-make-newer-versions-compatible-with-old-ones.patch b/adwaita-qt-make-newer-versions-compatible-with-old-ones.patch new file mode 100644 index 0000000..9f3c6c0 --- /dev/null +++ b/adwaita-qt-make-newer-versions-compatible-with-old-ones.patch @@ -0,0 +1,22 @@ +From b348762c7d5f92fb8cbbcb781c94ed675bf916f8 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Mon, 17 May 2021 19:51:25 +0200 +Subject: [PATCH] Make never versions compatible with old ones + +--- + src/lib/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt +index 3f37ce9a..5dd2b8a7 100644 +--- a/src/lib/CMakeLists.txt ++++ b/src/lib/CMakeLists.txt +@@ -110,7 +110,7 @@ configure_package_config_file( + write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/AdwaitaQtConfigVersion.cmake + VERSION ${ADWAITAQT_VERSION} +- COMPATIBILITY SameMinorVersion ++ COMPATIBILITY AnyNewerVersion + ) + + install(FILES diff --git a/adwaita-qt-tabwidget-dont-stretch-tabs-to-full-height-or-width-of-tabs.patch b/adwaita-qt-tabwidget-dont-stretch-tabs-to-full-height-or-width-of-tabs.patch new file mode 100644 index 0000000..99027c1 --- /dev/null +++ b/adwaita-qt-tabwidget-dont-stretch-tabs-to-full-height-or-width-of-tabs.patch @@ -0,0 +1,48 @@ +From 1a089c8f0b1e111fd1b077de2180ac125708b327 Mon Sep 17 00:00:00 2001 +From: Jan Grulich +Date: Thu, 20 May 2021 14:44:37 +0200 +Subject: [PATCH] TabWidget: do not stretch tabs to full width/height of tab + widget + +--- + src/style/adwaitastyle.cpp | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/src/style/adwaitastyle.cpp b/src/style/adwaitastyle.cpp +index febbea4f..3b53a7e5 100644 +--- a/src/style/adwaitastyle.cpp ++++ b/src/style/adwaitastyle.cpp +@@ -2008,11 +2008,12 @@ QRect Style::tabWidgetTabBarRect(const QStyleOption *option, const QWidget *widg + // horizontal positioning + bool verticalTabs(isVerticalTab(tabOption->shape)); + if (verticalTabs) { +- tabBarRect.setTop(option->rect.top() + 1); +- tabBarRect.setBottom(option->rect.bottom() - 1); +- //tabBarRect.setHeight( qMin( tabBarRect.height(), rect.height() - 2 ) ); +- //if( tabBarAlignment == Qt::AlignCenter ) tabBarRect.moveTop( rect.top() + ( rect.height() - tabBarRect.height() )/2 ); +- //else tabBarRect.moveTop( rect.top()+1 ); ++ tabBarRect.setHeight(qMin(tabBarRect.height(), rect.height() - 2)); ++ if (tabBarAlignment == Qt::AlignCenter) { ++ tabBarRect.moveTop(rect.top() + (rect.height() - tabBarRect.height()) / 2); ++ } else { ++ tabBarRect.moveTop(rect.top() + 1); ++ } + } else { + // account for corner rects + // need to re-run visualRect to remove right-to-left handling, since it is re-added on tabBarRect at the end +@@ -2022,8 +2023,13 @@ QRect Style::tabWidgetTabBarRect(const QStyleOption *option, const QWidget *widg + rect.setLeft(leftButtonRect.width()); + rect.setRight(rightButtonRect.left() - 1); + +- tabBarRect.moveLeft(rect.left() + 1); +- tabBarRect.setWidth(rect.width() - 2); ++ tabBarRect.setWidth(qMin(tabBarRect.width(), rect.width() - 2)); ++ ++ if (tabBarAlignment == Qt::AlignCenter) { ++ tabBarRect.moveLeft(rect.left() + (rect.width() - tabBarRect.width()) / 2); ++ } else { ++ tabBarRect.moveLeft(rect.left() + 1); ++ } + + tabBarRect = visualRect(option, tabBarRect); + } diff --git a/adwaita-qt.spec b/adwaita-qt.spec index d257c05..3d249d0 100644 --- a/adwaita-qt.spec +++ b/adwaita-qt.spec @@ -1,8 +1,6 @@ -# Force out of source build -%undefine __cmake_in_source_build Name: adwaita-qt -Version: 1.2.1 +Version: 1.3.0 Release: 1%{?dist} License: LGPLv2+ and GPLv2+ Summary: Adwaita theme for Qt-based applications @@ -10,6 +8,9 @@ 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-make-newer-versions-compatible-with-old-ones.patch +Patch1: adwaita-qt-tabwidget-dont-stretch-tabs-to-full-height-or-width-of-tabs.patch + BuildRequires: cmake BuildRequires: qt5-qtbase-devel @@ -76,6 +77,9 @@ developing applications that use libadwaita-qt5. %{_libdir}/libadwaitaqtpriv.so %changelog +* Wed Jun 02 2021 Jan Grulich - 1.3.0-1 +- 1.3.0 + * Mon Mar 22 2021 Jan Grulich - 1.2.1-1 - 1.2.1