From cf375805614ea5d80b4b4858619819d087fde292 Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Wed, 13 Nov 2024 02:09:35 +0000 Subject: [PATCH] sync: from linuxdeepin/dtkdeclarative Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: https://github.com/linuxdeepin/dtkdeclarative/pull/385 --- qt6/src/qml/FlowStyle.qml | 14 +++++++------- qt6/src/qml/Menu.qml | 9 +++++---- src/private/dquickcontrolpalette.cpp | 5 ++++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/qt6/src/qml/FlowStyle.qml b/qt6/src/qml/FlowStyle.qml index 3d6ebb9..ff73d8a 100644 --- a/qt6/src/qml/FlowStyle.qml +++ b/qt6/src/qml/FlowStyle.qml @@ -643,13 +643,13 @@ QtObject { property int height: 34 property size iconSize: Qt.size(14, 14) property int count: 0 - property int contentPadding: 36 + property int contentPadding: 30 property int indicatorMargin: 10 } property QtObject separator: QtObject { - property int lineTopPadding : 6 - property int lineBottomPadding : 4 + property int lineTopPadding : 0 + property int lineBottomPadding : 0 property int lineHeight : 2 property int topPadding: 11 property int bottomPadding: 2 @@ -660,8 +660,8 @@ QtObject { } property D.Palette background: D.Palette { - normal: behindWindowBlur.lightColor - normalDark: behindWindowBlur.darkColor + normal: Qt.rgba(235 / 255., 235 / 255., 235 / 255., 0.6) + normalDark: ("#80000000") } property D.Palette backgroundNoBlur: D.Palette { @@ -686,7 +686,7 @@ QtObject { property D.Palette itemText: D.Palette { normal: ("black") - normalDark: Qt.rgba(1, 1, 1, 0.6) + normalDark: ("white") } property D.Palette separatorText: D.Palette { @@ -814,7 +814,7 @@ QtObject { property D.Palette insideBorder: D.Palette { normal: Qt.rgba(0, 0, 0, 0.05) - normalDark: Qt.rgba(1, 1, 1, 0.05) + normalDark: Qt.rgba(1, 1, 1, 0.1) } } diff --git a/qt6/src/qml/Menu.qml b/qt6/src/qml/Menu.qml index ad3946e..36549ea 100644 --- a/qt6/src/qml/Menu.qml +++ b/qt6/src/qml/Menu.qml @@ -42,7 +42,7 @@ T.Menu { } contentItem: Control { - topPadding: 6 // TODO how to clip radius + topPadding: 15 // TODO how to clip radius bottomPadding: topPadding leftPadding: 0 rightPadding: leftPadding @@ -87,8 +87,8 @@ T.Menu { id: highlightRect anchors.left: parent ? parent.left : undefined anchors.right: parent ? parent.right : undefined - anchors.leftMargin: 6 - anchors.rightMargin: 6 + anchors.leftMargin: 0 + anchors.rightMargin: 0 scale: D.DTK.hasAnimation ? 0.9 : 1.0 property D.Palette backgroundColor: DS.Style.highlightPanel.background property D.Palette submenuOpenedItemHighlightColor: DS.Style.menu.submenuOpenedItemHighlight @@ -101,7 +101,7 @@ T.Menu { return D.ColorSelector.backgroundColor } } - radius: 6 + radius: 1 Component.onCompleted: { scale = 1.0 } @@ -138,6 +138,7 @@ T.Menu { blurMultiplier: 8.0 backgroundColor: control.backgroundColor backgroundNoBlurColor: control.backgroundNoBlurColor + outsideBorderColor: null } } diff --git a/src/private/dquickcontrolpalette.cpp b/src/private/dquickcontrolpalette.cpp index 2fe3e00..2777eae 100644 --- a/src/private/dquickcontrolpalette.cpp +++ b/src/private/dquickcontrolpalette.cpp @@ -18,6 +18,7 @@ #include #include #include +#include DGUI_USE_NAMESPACE DQUICK_BEGIN_NAMESPACE @@ -938,7 +939,9 @@ void DQuickControlColorSelector::notifyColorPropertyChanged() void DQuickControlColorSelector::updatePropertyFromName(const QByteArray &name, const DQuickControlPalette *palette) { - if (QCoreApplication::closingDown()) + auto appriv = dynamic_cast(QObjectPrivate::get(qApp)); + Q_ASSERT(appriv); + if (QCoreApplication::closingDown() || !appriv || appriv->aboutToQuitEmitted) return; Q_ASSERT(!name.isEmpty()); QColor color;