LockScreen: fixed multi-monitor setup!
This commit is contained in:
parent
8f829da5cb
commit
d135139100
2 changed files with 261 additions and 262 deletions
|
|
@ -43,14 +43,6 @@ Loader {
|
|||
// Tie session lock to loader visibility
|
||||
locked: lockScreen.active
|
||||
|
||||
// Lockscreen is a different beast, needs a capital 'S' in 'Screen' to access the current screen
|
||||
// Also we use a different scaling algorithm based on the resolution, as the design is full screen
|
||||
readonly property real scaling: {
|
||||
var tt = ScalingService.dynamicScale(Screen)
|
||||
console.log(tt)
|
||||
return tt
|
||||
}
|
||||
|
||||
property string errorMessage: ""
|
||||
property bool authenticating: false
|
||||
property string password: ""
|
||||
|
|
@ -127,6 +119,11 @@ Loader {
|
|||
|
||||
WlSessionLockSurface {
|
||||
// Battery indicator component
|
||||
|
||||
// WlSessionLockSurface provides a screen variable for the current screen.
|
||||
// Also we use a different scaling algorithm based on the resolution, as the design is full screen.
|
||||
readonly property real scaling: ScalingService.dynamicScale(screen)
|
||||
|
||||
Item {
|
||||
id: batteryIndicator
|
||||
|
||||
|
|
@ -500,11 +497,6 @@ Loader {
|
|||
height: 280 * scaling
|
||||
anchors.centerIn: parent
|
||||
|
||||
ColumnLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 20 * scaling
|
||||
width: parent.width
|
||||
|
||||
// Futuristic Terminal-Style Input
|
||||
Item {
|
||||
width: parent.width
|
||||
|
|
@ -527,7 +519,7 @@ Loader {
|
|||
width: parent.width
|
||||
height: 1
|
||||
color: Color.applyOpacity(Color.mPrimary, "1A")
|
||||
y: index * 10
|
||||
y: index * 10 * scaling
|
||||
opacity: Style.opacityMedium
|
||||
|
||||
SequentialAnimation on opacity {
|
||||
|
|
@ -554,7 +546,10 @@ Loader {
|
|||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginM * scaling
|
||||
anchors.topMargin: Style.marginM * scaling
|
||||
anchors.bottomMargin: Style.marginM * scaling
|
||||
anchors.leftMargin: Style.marginL * scaling
|
||||
anchors.rightMargin: Style.marginL * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
NText {
|
||||
|
|
@ -594,8 +589,8 @@ Loader {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.margins: Style.marginL * scaling
|
||||
anchors.topMargin: 70 * scaling
|
||||
anchors.margins: Style.marginM * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
// Welcome back typing effect
|
||||
|
|
@ -760,6 +755,9 @@ Loader {
|
|||
}
|
||||
|
||||
// Execute button
|
||||
Row {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.bottomMargin: -10 * scaling
|
||||
Rectangle {
|
||||
width: 120 * scaling
|
||||
height: 40 * scaling
|
||||
|
|
@ -768,8 +766,6 @@ Loader {
|
|||
border.color: Color.mPrimary
|
||||
border.width: Math.max(1, Style.borderS * scaling)
|
||||
enabled: !lock.authenticating
|
||||
Layout.alignment: Qt.AlignRight
|
||||
Layout.bottomMargin: -12 * scaling
|
||||
|
||||
NText {
|
||||
anchors.centerIn: parent
|
||||
|
|
@ -822,6 +818,7 @@ Loader {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Terminal glow effect
|
||||
Rectangle {
|
||||
|
|
@ -850,7 +847,6 @@ Loader {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Enhanced power buttons with hover effects
|
||||
Row {
|
||||
|
|
|
|||
|
|
@ -43,8 +43,11 @@ Singleton {
|
|||
readonly property int designScreenHeight: 1440
|
||||
|
||||
function dynamicScale(aScreen) {
|
||||
if (aScreen != null) {
|
||||
var ratioW = aScreen.width / designScreenWidth
|
||||
var ratioH = aScreen.height / designScreenHeight
|
||||
return Math.min(ratioW, ratioH)
|
||||
}
|
||||
return 1.0
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue