Merge branch 'main' into feat/m3-revamp
This commit is contained in:
commit
05333b5e02
5 changed files with 35 additions and 20 deletions
|
|
@ -298,6 +298,7 @@ For example, to disable the bar on DP-1:
|
|||
},
|
||||
"general": {
|
||||
"logo": "caelestia",
|
||||
"showOverFullscreen": false,
|
||||
"mediaGifSpeedAdjustment": 300,
|
||||
"sessionGifSpeed": 0.7,
|
||||
"apps": {
|
||||
|
|
|
|||
|
|
@ -31,10 +31,13 @@ StyledWindow {
|
|||
}
|
||||
return monitor?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false;
|
||||
}
|
||||
property real borderThickness: hasFullscreen ? 0 : contentItem.Config.border.thickness
|
||||
|
||||
property real fsTransitionProg: hasFullscreen ? 1 : 0
|
||||
readonly property real sdfBorderOffset: 2 * fsTransitionProg // SDFs joins are not exact, so offset by 2px to ensure nothing shows
|
||||
readonly property real borderThickness: contentItem.Config.border.thickness * (1 - fsTransitionProg)
|
||||
readonly property real borderRounding: contentItem.Config.border.rounding * (1 - fsTransitionProg)
|
||||
readonly property real shadowOpacity: 0.7 * (1 - fsTransitionProg)
|
||||
readonly property real borderLayoutThickness: hasFullscreen ? 0 : contentItem.Config.border.thickness
|
||||
property real borderRounding: hasFullscreen ? 0 : contentItem.Config.border.rounding
|
||||
property real shadowOpacity: hasFullscreen ? 0 : 0.7
|
||||
|
||||
readonly property int dragMaskPadding: {
|
||||
if (focusGrab.active || panels.popouts.isDetached)
|
||||
|
|
@ -54,11 +57,12 @@ StyledWindow {
|
|||
visibilities.launcher = false;
|
||||
visibilities.session = false;
|
||||
visibilities.dashboard = false;
|
||||
panels.popouts.close();
|
||||
}
|
||||
|
||||
name: "drawers"
|
||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
WlrLayershell.layer: fsTransitionProg > 0 && contentItem.Config.general.showOverFullscreen ? WlrLayer.Overlay : WlrLayer.Top
|
||||
WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session || panels.dashboard.needsKeyboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||
|
||||
mask: hasFullscreen ? emptyRegion : regions
|
||||
|
|
@ -68,20 +72,24 @@ StyledWindow {
|
|||
anchors.left: true
|
||||
anchors.right: true
|
||||
|
||||
Behavior on borderThickness {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
Behavior on borderRounding {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
Behavior on shadowOpacity {
|
||||
Behavior on fsTransitionProg {
|
||||
Anim {}
|
||||
}
|
||||
|
||||
Region {
|
||||
id: emptyRegion
|
||||
|
||||
x: panels.notifications.x + bar.implicitWidth
|
||||
y: panels.notifications.y + root.borderThickness
|
||||
width: panels.notifications.width
|
||||
height: panels.notifications.height
|
||||
|
||||
Region {
|
||||
x: root.width - width
|
||||
y: panels.osdWrapper.y + root.borderThickness
|
||||
width: panels.osdWrapper.width * (1 - panels.osd.offsetScale) + root.borderThickness
|
||||
height: panels.osd.height
|
||||
}
|
||||
}
|
||||
|
||||
Regions {
|
||||
|
|
@ -145,10 +153,10 @@ StyledWindow {
|
|||
anchors.margins: -50 // Make border thicker to smooth out bulge from closed drawers
|
||||
group: blobGroup
|
||||
radius: root.borderRounding
|
||||
borderLeft: bar.implicitWidth - anchors.margins
|
||||
borderRight: root.borderThickness - anchors.margins
|
||||
borderTop: root.borderThickness - anchors.margins
|
||||
borderBottom: root.borderThickness - anchors.margins
|
||||
borderLeft: bar.implicitWidth - anchors.margins - root.sdfBorderOffset
|
||||
borderRight: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||
borderTop: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||
borderBottom: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||
}
|
||||
|
||||
PanelBg {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ CustomMouseArea {
|
|||
|
||||
anchors.fill: parent
|
||||
acceptedButtons: fullscreen ? Qt.NoButton : Qt.AllButtons
|
||||
hoverEnabled: !fullscreen
|
||||
hoverEnabled: true
|
||||
|
||||
onPressed: event => dragStart = Qt.point(event.x, event.y)
|
||||
onContainsMouseChanged: {
|
||||
|
|
@ -97,6 +97,11 @@ CustomMouseArea {
|
|||
const dragX = x - dragStart.x;
|
||||
const dragY = y - dragStart.y;
|
||||
|
||||
if (fullscreen) {
|
||||
root.panels.osd.hovered = inRightPanel(panels.osdWrapper, x, y);
|
||||
return;
|
||||
}
|
||||
|
||||
// Show bar in non-exclusive mode on hover
|
||||
if (!visibilities.bar && Config.bar.showOnHover && x < bar.clampedWidth)
|
||||
bar.isHovered = true;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ Scope {
|
|||
} else {
|
||||
buffer = buffer.slice(0, -1);
|
||||
}
|
||||
} else if (" abcdefghijklmnopqrstuvwxyz1234567890`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?".includes(event.text.toLowerCase())) {
|
||||
// No illegal characters (you are insane if you use unicode in your password)
|
||||
} else if (/^[^\x00-\x1F\x7F-\x9F]+$/.test(event.text)) {
|
||||
// Allow anything except control characters
|
||||
buffer += event.text;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ class GeneralConfig : public ConfigObject {
|
|||
QML_ANONYMOUS
|
||||
|
||||
CONFIG_GLOBAL_PROPERTY(QString, logo)
|
||||
CONFIG_PROPERTY(bool, showOverFullscreen, false)
|
||||
CONFIG_PROPERTY(qreal, mediaGifSpeedAdjustment, 300)
|
||||
CONFIG_PROPERTY(qreal, sessionGifSpeed, 0.7)
|
||||
CONFIG_SUBOBJECT(GeneralApps, apps)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue