Refine window chrome position and sizing
Updates UI theme metrics for traffic-light controls and chrome inset to slightly larger values. In the desktop window chrome surface, positioning now uses the title bar center directly, rounds rendered margins, and introduces short easing animations for X/Y chrome offsets to reduce jitter during movement.
This commit is contained in:
@@ -52,9 +52,9 @@ QtObject {
|
|||||||
readonly property int topBarHeight: 40
|
readonly property int topBarHeight: 40
|
||||||
readonly property int controlHeight: 28
|
readonly property int controlHeight: 28
|
||||||
readonly property int searchHeight: 36
|
readonly property int searchHeight: 36
|
||||||
readonly property int trafficLightSize: 18
|
readonly property int trafficLightSize: 20
|
||||||
readonly property int trafficLightGap: 8
|
readonly property int trafficLightGap: 9
|
||||||
readonly property int windowChromeInset: 12
|
readonly property int windowChromeInset: 14
|
||||||
|
|
||||||
readonly property int fontSize: 13
|
readonly property int fontSize: 13
|
||||||
readonly property int fontSizeApp: 12
|
readonly property int fontSizeApp: 12
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ Window {
|
|||||||
readonly property int chromeY: {
|
readonly property int chromeY: {
|
||||||
const barY = WindowService.focusedWindowTitleBarY
|
const barY = WindowService.focusedWindowTitleBarY
|
||||||
const barH = Math.max(WindowService.focusedWindowTitleBarHeight, height)
|
const barH = Math.max(WindowService.focusedWindowTitleBarHeight, height)
|
||||||
const centered = barY + Math.round((barH - height) / 2)
|
return barY + Math.round((barH - height) / 2)
|
||||||
return centered - Theme.topBarHeight
|
|
||||||
}
|
}
|
||||||
|
property real renderedChromeX: chromeX
|
||||||
|
property real renderedChromeY: chromeY
|
||||||
|
|
||||||
title: qsTr("Nebula Window Chrome")
|
title: qsTr("Nebula Window Chrome")
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
@@ -28,11 +29,25 @@ Window {
|
|||||||
LayerShell.Window.scope: "nebula-window-chrome"
|
LayerShell.Window.scope: "nebula-window-chrome"
|
||||||
LayerShell.Window.layer: LayerShell.Window.LayerTop
|
LayerShell.Window.layer: LayerShell.Window.LayerTop
|
||||||
LayerShell.Window.anchors: LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorTop
|
LayerShell.Window.anchors: LayerShell.Window.AnchorLeft | LayerShell.Window.AnchorTop
|
||||||
LayerShell.Window.margins.left: Math.max(0, chromeX)
|
LayerShell.Window.margins.left: Math.max(0, Math.round(renderedChromeX))
|
||||||
LayerShell.Window.margins.top: Math.max(0, chromeY)
|
LayerShell.Window.margins.top: Math.max(0, Math.round(renderedChromeY))
|
||||||
LayerShell.Window.exclusionZone: 0
|
LayerShell.Window.exclusionZone: 0
|
||||||
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
|
LayerShell.Window.keyboardInteractivity: LayerShell.Window.KeyboardInteractivityNone
|
||||||
|
|
||||||
|
Behavior on renderedChromeX {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 34
|
||||||
|
easing.type: Easing.OutQuad
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on renderedChromeY {
|
||||||
|
NumberAnimation {
|
||||||
|
duration: 34
|
||||||
|
easing.type: Easing.OutQuad
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WindowControls {
|
WindowControls {
|
||||||
id: controls
|
id: controls
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
|
|||||||
Reference in New Issue
Block a user