refactor done?
This commit is contained in:
+1
-2
@@ -19,7 +19,7 @@ RowLayout {
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
function checkPopout(x: real): void {
|
||||
const ch = childAt(x, 2) as WrappedLoader;
|
||||
const ch = childAt(x, height / 2) as WrappedLoader;
|
||||
|
||||
if (!ch || ch?.id === "spacer") {
|
||||
if (!popouts.currentName.startsWith("traymenu"))
|
||||
@@ -205,7 +205,6 @@ RowLayout {
|
||||
}
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillHeight: true
|
||||
Layout.leftMargin: findFirstEnabled() === this ? root.vPadding : 0
|
||||
Layout.rightMargin: findLastEnabled() === this ? root.vPadding : 0
|
||||
active: enabled
|
||||
|
||||
@@ -14,14 +14,13 @@ import qs.Modules.Network
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property PanelWindow bar
|
||||
readonly property int contentHeight: Config.barConfig.height + padding * 2
|
||||
readonly property int exclusiveZone: Config.barConfig.autoHide ? Config.barConfig.border : contentHeight
|
||||
property bool isHovered
|
||||
readonly property int padding: Math.max(Appearance.padding.smaller, Config.barConfig.border)
|
||||
required property Wrapper popouts
|
||||
required property ShellScreen screen
|
||||
readonly property bool shouldBeVisible: (!Config.barConfig.autoHide || visibilities.bar)
|
||||
readonly property bool shouldBeVisible: (!Config.barConfig.autoHide || visibilities.bar || isHovered)
|
||||
readonly property int vPadding: 6
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
@@ -30,7 +29,7 @@ Item {
|
||||
}
|
||||
|
||||
implicitHeight: Config.barConfig.border
|
||||
visible: width > Config.barConfig.border
|
||||
visible: height > Config.barConfig.border
|
||||
|
||||
states: State {
|
||||
name: "visible"
|
||||
@@ -46,8 +45,8 @@ Item {
|
||||
to: "visible"
|
||||
|
||||
Anim {
|
||||
duration: Appearance.anim.durations.expressiveDefaultSpatial
|
||||
easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial
|
||||
duration: MaterialEasing.expressiveEffectsTime
|
||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
||||
property: "implicitHeight"
|
||||
target: root
|
||||
}
|
||||
@@ -57,7 +56,8 @@ Item {
|
||||
to: ""
|
||||
|
||||
Anim {
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
duration: MaterialEasing.expressiveEffectsTime
|
||||
easing.bezierCurve: MaterialEasing.expressiveEffects
|
||||
property: "implicitHeight"
|
||||
target: root
|
||||
}
|
||||
@@ -68,9 +68,9 @@ Item {
|
||||
id: content
|
||||
|
||||
active: root.shouldBeVisible || root.visible
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
sourceComponent: Bar {
|
||||
height: root.contentHeight
|
||||
|
||||
@@ -17,7 +17,7 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
anchors.fill: parent
|
||||
color: Config.barConfig.autoHide && !root.visibilities.bar ? "transparent" : DynamicColors.palette.m3surface
|
||||
color: Config.barConfig.border === 1 ? "transparent" : DynamicColors.palette.m3surface
|
||||
layer.enabled: true
|
||||
|
||||
layer.effect: MultiEffect {
|
||||
@@ -39,15 +39,10 @@ Item {
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Config.barConfig.border
|
||||
anchors.topMargin: Config.barConfig.autoHide && !root.visibilities.bar ? 4 : root.bar.implicitHeight
|
||||
anchors.topMargin: root.bar.implicitHeight
|
||||
radius: Config.barConfig.border > 0 ? Config.barConfig.rounding : 0
|
||||
topLeftRadius: Config.barConfig.rounding
|
||||
topRightRadius: Config.barConfig.rounding
|
||||
|
||||
Behavior on anchors.topMargin {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user