Skip to content

Commit

Permalink
Merge remote-tracking branch 'mixxxdj/2.4' into 2.4-rel
Browse files Browse the repository at this point in the history
  • Loading branch information
daschuer committed Jun 19, 2023
2 parents d5a93e2 + 834882e commit cc3c615
Show file tree
Hide file tree
Showing 8 changed files with 811 additions and 300 deletions.
2 changes: 1 addition & 1 deletion overlay/osx/qt5-base/cmake/qt_download_submodule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function(qt_download_submodule)
set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz")

vcpkg_download_distfile(ARCHIVE_FILE
URLS "https://download.qt.io/archive/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}"
URLS "https://download.qt.io/new_archive/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}"
FILENAME ${ARCHIVE_NAME}
SHA512 ${QT_HASH_${PORT}}
)
Expand Down
57 changes: 57 additions & 0 deletions overlay/osx/qt5-base/patches/scrollbars_style.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
From e0f8cad075e0688e7e88d42eefbaa000b2636e2f Mon Sep 17 00:00:00 2001
From: Volker Hilsheimer <[email protected]>
Date: Tue, 23 Nov 2021 17:05:05 +0100
Subject: [PATCH] Never handle scrollbars styled with box or border changes as
transient

If scrollbars are styled with a style sheet that includes a box or
removes off the native border, then we never treat them as transient or
overlapping. Otherwise, the layout logic in QAbstractScrollArea will
show them on top of the viewport, overlapping the content.

The cherry-pick doesn't include the base line test from the upstream
change, as the testing framework is not available in 6.2.

Fixes: QTBUG-98289
Change-Id: Ic53ad248b3eedd54722ac7b2fe5256a27092dbc1
Reviewed-by: Richard Moe Gustavsen <[email protected]>
(cherry picked from commit 56da533b45e2785e8fd54ef6fcddb7b973c665bf)
Reviewed-by: Volker Hilsheimer <[email protected]>
---
src/widgets/styles/qstylesheetstyle.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index c2c9cc9fd7e..efa79789a8e 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -4837,11 +4837,17 @@ int QStyleSheetStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const
break;

case PM_ScrollView_ScrollBarSpacing:
- if(!rule.hasNativeBorder() || rule.hasBox())
+ if (!rule.hasNativeBorder() || rule.hasBox())
+ return 0;
+ break;
+
+ case PM_ScrollView_ScrollBarOverlap:
+ if (!proxy()->styleHint(SH_ScrollBar_Transient, opt, w))
return 0;
break;
#endif // QT_CONFIG(scrollbar)

+
case PM_ProgressBarChunkWidth:
subRule = renderRule(w, opt, PseudoElement_ProgressBarChunk);
if (subRule.hasContentsSize()) {
@@ -5399,6 +5405,10 @@ int QStyleSheetStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWi
case SH_ItemView_PaintAlternatingRowColorsForEmptyArea: s = QLatin1String("paint-alternating-row-colors-for-empty-area"); break;
case SH_TitleBar_ShowToolTipsOnButtons: s = QLatin1String("titlebar-show-tooltips-on-buttons"); break;
case SH_Widget_Animation_Duration: s = QLatin1String("widget-animation-duration"); break;
+ case SH_ScrollBar_Transient:
+ if (!rule.hasNativeBorder() || rule.hasBox() || rule.hasDrawable())
+ return 0;
+ break;
default: break;
}
if (!s.isEmpty() && rule.hasStyleHint(s)) {
1 change: 1 addition & 0 deletions overlay/osx/qt5-base/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH
patches/arm64_qcocoahelper.patch # alow to build on arm64
patches/arm64_send_super_stret.patch # don't use qt_msgSendSuper_stret on arm64
patches/replace_result_of.patch # Replace usage of std::result_of with decltype
patches/scrollbars_style.patch # Never handle scrollbars styled with box or border changes as transient
)

# Remove vendored dependencies to ensure they are not picked up by the build
Expand Down
2 changes: 1 addition & 1 deletion overlay/osx/qt5-base/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "qt5-base",
"version-semver": "5.12.5",
"port-version": 16,
"port-version": 17,
"description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"dependencies": [
Expand Down
Loading

0 comments on commit cc3c615

Please sign in to comment.