Skip to content

Commit

Permalink
fix: Adjust menu styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchieMeng committed Oct 25, 2024
1 parent 31a5949 commit 4f8e7fc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 23 deletions.
10 changes: 0 additions & 10 deletions qt6/src/qml/FloatingPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,5 @@ Control {
borderWidth: DS.Style.control.borderWidth
}
}

Loader {
anchors.fill: backgroundRect
active: control.outsideBorderColor
sourceComponent: OutsideBoxBorder {
radius: backgroundRect.radius
color: control.D.ColorSelector.outsideBorderColor
borderWidth: DS.Style.control.borderWidth
}
}
}
}
12 changes: 6 additions & 6 deletions qt6/src/qml/FlowStyle.qml
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ QtObject {
}

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
12 changes: 6 additions & 6 deletions qt6/src/qml/Menu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ T.Menu {
readonly property bool active: parent && parent.Window.active

implicitHeight: DS.Style.control.implicitHeight(control)
implicitWidth: DS.Style.control.implicitWidth(control)
implicitWidth: DS.Style.control.implicitWidth(control) - 10
margins: DS.Style.menu.margins
overlap: DS.Style.menu.overlap
padding: DS.Style.menu.padding
Expand All @@ -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,9 +87,9 @@ T.Menu {
id: highlightRect
anchors.left: parent ? parent.left : undefined
anchors.right: parent ? parent.right : undefined
anchors.leftMargin: 6
anchors.rightMargin: 6
scale: D.DTK.hasAnimation ? 0.9 : 1.0
anchors.leftMargin: 0
anchors.rightMargin: 0
scale: 0.9
property D.Palette backgroundColor: DS.Style.highlightPanel.background
property D.Palette submenuOpenedItemHighlightColor: DS.Style.menu.submenuOpenedItemHighlight
property D.Palette itemHighlightShadowColor: DS.Style.menu.itemHighlightShadow
Expand All @@ -101,7 +101,7 @@ T.Menu {
return D.ColorSelector.backgroundColor
}
}
radius: 6
radius: 1
Component.onCompleted: {
scale = 1.0
}
Expand Down
2 changes: 1 addition & 1 deletion qt6/src/qml/MenuItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ T.MenuItem {
readonly property real indicatorPadding: control.useIndicatorPadding && control.indicator ? control.indicator.width + control.spacing : 0

leftPadding: (!control.mirrored ? indicatorPadding : arrowPadding) + DS.Style.menu.item.contentPadding
rightPadding: (control.mirrored ? indicatorPadding : arrowPadding) + DS.Style.menu.item.contentPadding
rightPadding: 0
spacing: control.spacing
mirrored: control.mirrored
display: control.display
Expand Down

0 comments on commit 4f8e7fc

Please sign in to comment.