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": {
|
"general": {
|
||||||
"logo": "caelestia",
|
"logo": "caelestia",
|
||||||
|
"showOverFullscreen": false,
|
||||||
"mediaGifSpeedAdjustment": 300,
|
"mediaGifSpeedAdjustment": 300,
|
||||||
"sessionGifSpeed": 0.7,
|
"sessionGifSpeed": 0.7,
|
||||||
"apps": {
|
"apps": {
|
||||||
|
|
|
||||||
|
|
@ -31,10 +31,13 @@ StyledWindow {
|
||||||
}
|
}
|
||||||
return monitor?.activeWorkspace?.toplevels.values.some(t => t.lastIpcObject.fullscreen > 1) ?? false;
|
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
|
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: {
|
readonly property int dragMaskPadding: {
|
||||||
if (focusGrab.active || panels.popouts.isDetached)
|
if (focusGrab.active || panels.popouts.isDetached)
|
||||||
|
|
@ -54,11 +57,12 @@ StyledWindow {
|
||||||
visibilities.launcher = false;
|
visibilities.launcher = false;
|
||||||
visibilities.session = false;
|
visibilities.session = false;
|
||||||
visibilities.dashboard = false;
|
visibilities.dashboard = false;
|
||||||
|
panels.popouts.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
name: "drawers"
|
name: "drawers"
|
||||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
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
|
WlrLayershell.keyboardFocus: visibilities.launcher || visibilities.session || panels.dashboard.needsKeyboard ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None
|
||||||
|
|
||||||
mask: hasFullscreen ? emptyRegion : regions
|
mask: hasFullscreen ? emptyRegion : regions
|
||||||
|
|
@ -68,20 +72,24 @@ StyledWindow {
|
||||||
anchors.left: true
|
anchors.left: true
|
||||||
anchors.right: true
|
anchors.right: true
|
||||||
|
|
||||||
Behavior on borderThickness {
|
Behavior on fsTransitionProg {
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on borderRounding {
|
|
||||||
Anim {}
|
|
||||||
}
|
|
||||||
|
|
||||||
Behavior on shadowOpacity {
|
|
||||||
Anim {}
|
Anim {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
id: emptyRegion
|
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 {
|
Regions {
|
||||||
|
|
@ -145,10 +153,10 @@ StyledWindow {
|
||||||
anchors.margins: -50 // Make border thicker to smooth out bulge from closed drawers
|
anchors.margins: -50 // Make border thicker to smooth out bulge from closed drawers
|
||||||
group: blobGroup
|
group: blobGroup
|
||||||
radius: root.borderRounding
|
radius: root.borderRounding
|
||||||
borderLeft: bar.implicitWidth - anchors.margins
|
borderLeft: bar.implicitWidth - anchors.margins - root.sdfBorderOffset
|
||||||
borderRight: root.borderThickness - anchors.margins
|
borderRight: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||||
borderTop: root.borderThickness - anchors.margins
|
borderTop: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||||
borderBottom: root.borderThickness - anchors.margins
|
borderBottom: root.borderThickness - anchors.margins - root.sdfBorderOffset
|
||||||
}
|
}
|
||||||
|
|
||||||
PanelBg {
|
PanelBg {
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ CustomMouseArea {
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: fullscreen ? Qt.NoButton : Qt.AllButtons
|
acceptedButtons: fullscreen ? Qt.NoButton : Qt.AllButtons
|
||||||
hoverEnabled: !fullscreen
|
hoverEnabled: true
|
||||||
|
|
||||||
onPressed: event => dragStart = Qt.point(event.x, event.y)
|
onPressed: event => dragStart = Qt.point(event.x, event.y)
|
||||||
onContainsMouseChanged: {
|
onContainsMouseChanged: {
|
||||||
|
|
@ -97,6 +97,11 @@ CustomMouseArea {
|
||||||
const dragX = x - dragStart.x;
|
const dragX = x - dragStart.x;
|
||||||
const dragY = y - dragStart.y;
|
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
|
// Show bar in non-exclusive mode on hover
|
||||||
if (!visibilities.bar && Config.bar.showOnHover && x < bar.clampedWidth)
|
if (!visibilities.bar && Config.bar.showOnHover && x < bar.clampedWidth)
|
||||||
bar.isHovered = true;
|
bar.isHovered = true;
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ Scope {
|
||||||
} else {
|
} else {
|
||||||
buffer = buffer.slice(0, -1);
|
buffer = buffer.slice(0, -1);
|
||||||
}
|
}
|
||||||
} else if (" abcdefghijklmnopqrstuvwxyz1234567890`~!@#$%^&*()-_=+[{]}\\|;:'\",<.>/?".includes(event.text.toLowerCase())) {
|
} else if (/^[^\x00-\x1F\x7F-\x9F]+$/.test(event.text)) {
|
||||||
// No illegal characters (you are insane if you use unicode in your password)
|
// Allow anything except control characters
|
||||||
buffer += event.text;
|
buffer += event.text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,7 @@ class GeneralConfig : public ConfigObject {
|
||||||
QML_ANONYMOUS
|
QML_ANONYMOUS
|
||||||
|
|
||||||
CONFIG_GLOBAL_PROPERTY(QString, logo)
|
CONFIG_GLOBAL_PROPERTY(QString, logo)
|
||||||
|
CONFIG_PROPERTY(bool, showOverFullscreen, false)
|
||||||
CONFIG_PROPERTY(qreal, mediaGifSpeedAdjustment, 300)
|
CONFIG_PROPERTY(qreal, mediaGifSpeedAdjustment, 300)
|
||||||
CONFIG_PROPERTY(qreal, sessionGifSpeed, 0.7)
|
CONFIG_PROPERTY(qreal, sessionGifSpeed, 0.7)
|
||||||
CONFIG_SUBOBJECT(GeneralApps, apps)
|
CONFIG_SUBOBJECT(GeneralApps, apps)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue