autohide
This commit is contained in:
@@ -23,10 +23,11 @@ RowLayout {
|
||||
required property ShellScreen screen
|
||||
|
||||
function checkPopout(x: real): void {
|
||||
const ch = childAt(x, height / 2) as WrappedLoader;
|
||||
const ch = childAt(x, 2) as WrappedLoader;
|
||||
|
||||
if (!ch && !popouts.currentName.includes("traymenu")) {
|
||||
popouts.hasCurrent = false;
|
||||
if (!ch) {
|
||||
if ( !popouts.currentName.includes("traymenu") )
|
||||
popouts.hasCurrent = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import qs.Modules
|
||||
@@ -10,12 +11,13 @@ Item {
|
||||
id: root
|
||||
|
||||
required property Item bar
|
||||
required property PersistentProperties visibilities
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
CustomRect {
|
||||
anchors.fill: parent
|
||||
color: DynamicColors.palette.m3surface
|
||||
color: Config.autoHide && !root.visibilities.bar ? "transparent" : DynamicColors.palette.m3surface
|
||||
|
||||
layer.enabled: true
|
||||
|
||||
@@ -36,9 +38,12 @@ Item {
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: root.bar.implicitHeight
|
||||
anchors.topMargin: Config.autoHide && !root.visibilities.bar ? 4 : root.bar.implicitHeight
|
||||
topLeftRadius: 8
|
||||
topRightRadius: 8
|
||||
Behavior on anchors.topMargin {
|
||||
Anim {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,8 @@ Item {
|
||||
|
||||
CustomRect {
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 3
|
||||
anchors.bottomMargin: 3
|
||||
anchors.topMargin: 4
|
||||
anchors.bottomMargin: 4
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
radius: 1000
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user