Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkdeclarative
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#385
  • Loading branch information
deepin-ci-robot committed Nov 13, 2024
1 parent 6589785 commit cf37580
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
14 changes: 7 additions & 7 deletions qt6/src/qml/FlowStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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)
}
}

Expand Down
9 changes: 5 additions & 4 deletions qt6/src/qml/Menu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -101,7 +101,7 @@ T.Menu {
return D.ColorSelector.backgroundColor
}
}
radius: 6
radius: 1
Component.onCompleted: {
scale = 1.0
}
Expand Down Expand Up @@ -138,6 +138,7 @@ T.Menu {
blurMultiplier: 8.0
backgroundColor: control.backgroundColor
backgroundNoBlurColor: control.backgroundNoBlurColor
outsideBorderColor: null
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/private/dquickcontrolpalette.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <private/qqmlopenmetaobject_p.h>
#include <private/qqmlglobal_p.h>
#include <private/qmetaobjectbuilder_p.h>
#include <private/qcoreapplication_p.h>

DGUI_USE_NAMESPACE
DQUICK_BEGIN_NAMESPACE
Expand Down Expand Up @@ -938,7 +939,9 @@ void DQuickControlColorSelector::notifyColorPropertyChanged()

void DQuickControlColorSelector::updatePropertyFromName(const QByteArray &name, const DQuickControlPalette *palette)
{
if (QCoreApplication::closingDown())
auto appriv = dynamic_cast<QCoreApplicationPrivate *>(QObjectPrivate::get(qApp));
Q_ASSERT(appriv);
if (QCoreApplication::closingDown() || !appriv || appriv->aboutToQuitEmitted)
return;
Q_ASSERT(!name.isEmpty());
QColor color;
Expand Down

0 comments on commit cf37580

Please sign in to comment.