mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge branch 'main' into qt-scaling
This commit is contained in:
+240
-139
@@ -49,6 +49,8 @@ Loader {
|
||||
locked: lockScreen.active
|
||||
|
||||
WlSessionLockSurface {
|
||||
readonly property var now: Time.date
|
||||
|
||||
Item {
|
||||
id: batteryIndicator
|
||||
property var battery: UPower.displayDevice
|
||||
@@ -101,8 +103,8 @@ Loader {
|
||||
visible: Settings.data.general.showScreenCorners
|
||||
|
||||
property color cornerColor: Settings.data.general.forceBlackScreenCorners ? Qt.rgba(0, 0, 0, 1) : Qt.alpha(Color.mSurface, Settings.data.bar.backgroundOpacity)
|
||||
property real cornerRadius: Style.screenRadius
|
||||
property real cornerSize: Style.screenRadius
|
||||
property real cornerRadius: Style.screenRadius
|
||||
property real cornerSize: Style.screenRadius
|
||||
|
||||
// Top-left concave corner
|
||||
Canvas {
|
||||
@@ -246,12 +248,12 @@ Loader {
|
||||
|
||||
// Time, Date, and User Profile Container
|
||||
Rectangle {
|
||||
width: Math.max(500, contentRow.implicitWidth + 24)
|
||||
height: 120
|
||||
width: Math.max(500 , contentRow.implicitWidth + 32)
|
||||
height: Math.max(120 , contentRow.implicitHeight + 32)
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 100
|
||||
radius: Style.radiusL
|
||||
anchors.topMargin: 100
|
||||
radius: Style.radiusL
|
||||
color: Color.mSurface
|
||||
border.color: Qt.alpha(Color.mOutline, 0.2)
|
||||
border.width: 1
|
||||
@@ -259,13 +261,13 @@ Loader {
|
||||
RowLayout {
|
||||
id: contentRow
|
||||
anchors.fill: parent
|
||||
anchors.margins: 12
|
||||
spacing: 8
|
||||
anchors.margins: 16
|
||||
spacing: 32
|
||||
|
||||
// Left side: Avatar
|
||||
Rectangle {
|
||||
Layout.preferredWidth: 70
|
||||
Layout.preferredHeight: 70
|
||||
Layout.preferredWidth: 70
|
||||
Layout.preferredHeight: 70
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
radius: width * 0.5
|
||||
color: Color.transparent
|
||||
@@ -294,9 +296,9 @@ Loader {
|
||||
|
||||
NImageCircled {
|
||||
anchors.centerIn: parent
|
||||
width: 66
|
||||
height: 66
|
||||
imagePath: Settings.data.general.avatarImage
|
||||
width: 66
|
||||
height: 66
|
||||
imagePath: Settings.preprocessPath(Settings.data.general.avatarImage)
|
||||
fallbackIcon: "person"
|
||||
|
||||
SequentialAnimation on scale {
|
||||
@@ -318,12 +320,12 @@ Loader {
|
||||
// Center: User Info Column (left-aligned text)
|
||||
ColumnLayout {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
spacing: 2
|
||||
spacing: 2
|
||||
|
||||
// Welcome back + Username on one line
|
||||
NText {
|
||||
text: I18n.tr("lock-screen.welcome-back") + " " + Quickshell.env("USER") + "!"
|
||||
pointSize: Style.fontSizeXXXL
|
||||
pointSize: Style.fontSizeXXL
|
||||
font.weight: Font.Medium
|
||||
color: Color.mOnSurface
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@@ -332,7 +334,7 @@ Loader {
|
||||
// Date below
|
||||
NText {
|
||||
text: Qt.locale().toString(Time.date, "dddd, MMMM d")
|
||||
pointSize: Style.fontSizeXXL
|
||||
pointSize: Style.fontSizeXL
|
||||
font.weight: Font.Medium
|
||||
color: Color.mOnSurfaceVariant
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
@@ -345,8 +347,8 @@ Loader {
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: 70
|
||||
Layout.preferredHeight: 70
|
||||
Layout.preferredWidth: 70
|
||||
Layout.preferredHeight: 70
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
// Seconds circular progress
|
||||
@@ -369,21 +371,21 @@ Loader {
|
||||
var ctx = getContext("2d")
|
||||
var centerX = width / 2
|
||||
var centerY = height / 2
|
||||
var radius = Math.min(width, height) / 2 - 3
|
||||
var radius = Math.min(width, height) / 2 - 3
|
||||
|
||||
ctx.reset()
|
||||
|
||||
// Background circle
|
||||
ctx.beginPath()
|
||||
ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI)
|
||||
ctx.lineWidth = 2.5
|
||||
ctx.lineWidth = 2.5
|
||||
ctx.strokeStyle = Qt.alpha(Color.mOnSurface, 0.15)
|
||||
ctx.stroke()
|
||||
|
||||
// Progress arc
|
||||
ctx.beginPath()
|
||||
ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + progress * 2 * Math.PI)
|
||||
ctx.lineWidth = 2.5
|
||||
ctx.lineWidth = 2.5
|
||||
ctx.strokeStyle = Color.mPrimary
|
||||
ctx.lineCap = "round"
|
||||
ctx.stroke()
|
||||
@@ -400,7 +402,7 @@ Loader {
|
||||
var t = Settings.data.location.use12hourFormat ? Qt.locale().toString(Time.date, "hh AP") : Qt.locale().toString(Time.date, "HH")
|
||||
return t
|
||||
}
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Style.fontSizeL
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Color.mOnSurface
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -409,7 +411,7 @@ Loader {
|
||||
|
||||
NText {
|
||||
text: Qt.formatTime(Time.date, "mm")
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Style.fontSizeL
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Color.mOnSurfaceVariant
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -422,12 +424,12 @@ Loader {
|
||||
|
||||
// Error notification
|
||||
Rectangle {
|
||||
width: 450
|
||||
height: 60
|
||||
width: 450
|
||||
height: 60
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 300
|
||||
radius: 30
|
||||
anchors.bottomMargin: 300
|
||||
radius: 30
|
||||
color: Color.mError
|
||||
border.color: Color.mError
|
||||
border.width: 1
|
||||
@@ -436,18 +438,18 @@ Loader {
|
||||
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 10
|
||||
spacing: 10
|
||||
|
||||
NIcon {
|
||||
icon: "alert-circle"
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Style.fontSizeL
|
||||
color: Color.mOnError
|
||||
}
|
||||
|
||||
NText {
|
||||
text: lockContext.errorMessage || "Authentication failed"
|
||||
color: Color.mOnError
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Style.fontSizeL
|
||||
font.weight: Font.Medium
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
@@ -468,61 +470,62 @@ Loader {
|
||||
var hasKeyboard = keyboardLayout.currentLayout !== "Unknown"
|
||||
|
||||
if (hasBattery && hasKeyboard) {
|
||||
return 200
|
||||
return 200
|
||||
} else if (hasBattery || hasKeyboard) {
|
||||
return 120
|
||||
return 120
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
height: 40
|
||||
height: 40
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 96 + (Settings.data.general.compactLockScreen ? 116 : 220)
|
||||
topLeftRadius: Style.radiusL
|
||||
topRightRadius: Style.radiusL
|
||||
anchors.bottomMargin: 96 + (Settings.data.general.compactLockScreen ? 116 : 220 )
|
||||
topLeftRadius: Style.radiusL
|
||||
topRightRadius: Style.radiusL
|
||||
color: Color.mSurface
|
||||
visible: Settings.data.general.compactLockScreen && ((UPower.displayDevice && UPower.displayDevice.ready && UPower.displayDevice.isPresent) || keyboardLayout.currentLayout !== "Unknown")
|
||||
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 16
|
||||
spacing: 16
|
||||
|
||||
// Battery indicator
|
||||
RowLayout {
|
||||
spacing: 6
|
||||
spacing: 6
|
||||
visible: UPower.displayDevice && UPower.displayDevice.ready && UPower.displayDevice.isPresent
|
||||
|
||||
NIcon {
|
||||
icon: BatteryService.getIcon(Math.round(UPower.displayDevice.percentage * 100), UPower.displayDevice.state === UPowerDeviceState.Charging, true)
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: UPower.displayDevice.state === UPowerDeviceState.Charging ? Color.mPrimary : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: Math.round(UPower.displayDevice.percentage * 100) + "%"
|
||||
color: Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
|
||||
// Keyboard layout indicator
|
||||
RowLayout {
|
||||
spacing: 6
|
||||
spacing: 6
|
||||
visible: keyboardLayout.currentLayout !== "Unknown"
|
||||
|
||||
NIcon {
|
||||
icon: "keyboard"
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: keyboardLayout.currentLayout
|
||||
color: Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -530,38 +533,38 @@ Loader {
|
||||
|
||||
// Bottom container with weather, password input and controls
|
||||
Rectangle {
|
||||
width: 750
|
||||
height: Settings.data.general.compactLockScreen ? 120 : 220
|
||||
width: 750
|
||||
height: Settings.data.general.compactLockScreen ? 120 : 220
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 100
|
||||
radius: Style.radiusL
|
||||
anchors.bottomMargin: 100
|
||||
radius: Style.radiusL
|
||||
color: Color.mSurface
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 14
|
||||
spacing: 14
|
||||
anchors.margins: 14
|
||||
spacing: 14
|
||||
|
||||
// Weather section
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 65
|
||||
spacing: 18
|
||||
Layout.preferredHeight: 65
|
||||
spacing: 18
|
||||
visible: !Settings.data.general.compactLockScreen && LocationService.coordinatesReady && LocationService.data.weather !== null
|
||||
|
||||
// Media widget with visualizer
|
||||
Rectangle {
|
||||
Layout.preferredWidth: 220
|
||||
Layout.preferredHeight: 50
|
||||
radius: 25
|
||||
Layout.preferredWidth: 220
|
||||
Layout.preferredHeight: 50
|
||||
radius: 25
|
||||
color: Color.transparent
|
||||
clip: true
|
||||
visible: MediaService.currentPlayer && MediaService.canPlay
|
||||
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
anchors.margins: 4
|
||||
active: Settings.data.audio.visualizerType === "linear"
|
||||
z: 0
|
||||
sourceComponent: LinearSpectrum {
|
||||
@@ -574,7 +577,7 @@ Loader {
|
||||
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
anchors.margins: 4
|
||||
active: Settings.data.audio.visualizerType === "mirrored"
|
||||
z: 0
|
||||
sourceComponent: MirroredSpectrum {
|
||||
@@ -587,7 +590,7 @@ Loader {
|
||||
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 4
|
||||
anchors.margins: 4
|
||||
active: Settings.data.audio.visualizerType === "wave"
|
||||
z: 0
|
||||
sourceComponent: WaveSpectrum {
|
||||
@@ -600,35 +603,35 @@ Loader {
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 8
|
||||
spacing: 8
|
||||
anchors.margins: 8
|
||||
spacing: 8
|
||||
z: 1
|
||||
|
||||
Rectangle {
|
||||
Layout.preferredWidth: 34
|
||||
Layout.preferredHeight: 34
|
||||
Layout.preferredWidth: 34
|
||||
Layout.preferredHeight: 34
|
||||
radius: width * 0.5
|
||||
color: Color.transparent
|
||||
clip: true
|
||||
|
||||
NImageCircled {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 2
|
||||
anchors.margins: 2
|
||||
imagePath: MediaService.trackArtUrl
|
||||
fallbackIcon: "disc"
|
||||
fallbackIconSize: Style.fontSizeM
|
||||
fallbackIconSize: Style.fontSizeM
|
||||
borderColor: Color.mOutline
|
||||
borderWidth: Math.max(1, Style.borderS)
|
||||
borderWidth: Math.max(1, Style.borderS )
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 2
|
||||
spacing: 2
|
||||
|
||||
NText {
|
||||
text: MediaService.trackTitle || "No media"
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Style.fontWeightMedium
|
||||
color: Color.mOnSurface
|
||||
Layout.fillWidth: true
|
||||
@@ -637,7 +640,7 @@ Loader {
|
||||
|
||||
NText {
|
||||
text: MediaService.trackArtist || ""
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
Layout.fillWidth: true
|
||||
elide: Text.ElideRight
|
||||
@@ -649,46 +652,64 @@ Loader {
|
||||
Rectangle {
|
||||
Layout.preferredWidth: 1
|
||||
Layout.fillHeight: true
|
||||
Layout.rightMargin: 4
|
||||
Layout.rightMargin: 4
|
||||
color: Qt.alpha(Color.mOutline, 0.3)
|
||||
visible: MediaService.currentPlayer && MediaService.canPlay
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Style.marginM
|
||||
Layout.preferredWidth: Style.marginM
|
||||
visible: !(MediaService.currentPlayer && MediaService.canPlay)
|
||||
}
|
||||
|
||||
// Current weather
|
||||
RowLayout {
|
||||
Layout.preferredWidth: 180
|
||||
spacing: 8
|
||||
Layout.preferredWidth: 180
|
||||
spacing: 8
|
||||
|
||||
NIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.current_weather.weathercode)
|
||||
pointSize: Style.fontSizeXXXL
|
||||
pointSize: Style.fontSizeXXXL
|
||||
color: Color.mPrimary
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 2
|
||||
spacing: 2
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 12
|
||||
spacing: 12
|
||||
|
||||
NText {
|
||||
text: Math.round(LocationService.data.weather.current_weather.temperature) + "°"
|
||||
pointSize: Style.fontSizeXL
|
||||
text: {
|
||||
var temp = LocationService.data.weather.current_weather.temperature
|
||||
var suffix = "C"
|
||||
if (Settings.data.location.useFahrenheit) {
|
||||
temp = LocationService.celsiusToFahrenheit(temp)
|
||||
suffix = "F"
|
||||
}
|
||||
temp = Math.round(temp)
|
||||
return temp + "°" + suffix
|
||||
}
|
||||
pointSize: Style.fontSizeXL
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Color.mOnSurface
|
||||
}
|
||||
|
||||
NText {
|
||||
text: LocationService.data.weather.current_weather.windspeed + " km/h"
|
||||
pointSize: Style.fontSizeM
|
||||
text: {
|
||||
var wind = LocationService.data.weather.current_weather.windspeed
|
||||
var unit = "km/h"
|
||||
if (Settings.data.location.useFahrenheit) {
|
||||
wind = wind * 0.621371 // Convert km/h to mph
|
||||
unit = "mph"
|
||||
}
|
||||
wind = Math.round(wind)
|
||||
return wind + " " + unit
|
||||
}
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
font.weight: Font.Normal
|
||||
}
|
||||
@@ -696,17 +717,17 @@ Loader {
|
||||
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 8
|
||||
spacing: 8
|
||||
|
||||
NText {
|
||||
text: Settings.data.location.name.split(",")[0]
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: (LocationService.data.weather.current && LocationService.data.weather.current.relativehumidity_2m) ? LocationService.data.weather.current.relativehumidity_2m + "% humidity" : ""
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
}
|
||||
}
|
||||
@@ -715,19 +736,19 @@ Loader {
|
||||
|
||||
// 3-day forecast
|
||||
RowLayout {
|
||||
Layout.preferredWidth: 260
|
||||
Layout.rightMargin: 8
|
||||
spacing: 4
|
||||
Layout.preferredWidth: 260
|
||||
Layout.rightMargin: 8
|
||||
spacing: 4
|
||||
|
||||
Repeater {
|
||||
model: 3
|
||||
delegate: ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 3
|
||||
spacing: 3
|
||||
|
||||
NText {
|
||||
text: Qt.locale().toString(new Date(LocationService.data.weather.daily.time[index].replace(/-/g, "/")), "ddd")
|
||||
pointSize: Style.fontSizeM
|
||||
text: Qt.locale().toString(now, "ddd")
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
@@ -736,13 +757,23 @@ Loader {
|
||||
NIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
icon: LocationService.weatherSymbolFromCode(LocationService.data.weather.daily.weathercode[index])
|
||||
pointSize: Style.fontSizeXL
|
||||
pointSize: Style.fontSizeXL
|
||||
color: Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: Math.round(LocationService.data.weather.daily.temperature_2m_max[index]) + "°/" + Math.round(LocationService.data.weather.daily.temperature_2m_min[index]) + "°"
|
||||
pointSize: Style.fontSizeM
|
||||
text: {
|
||||
var max = LocationService.data.weather.daily.temperature_2m_max[index]
|
||||
var min = LocationService.data.weather.daily.temperature_2m_min[index]
|
||||
if (Settings.data.location.useFahrenheit) {
|
||||
max = LocationService.celsiusToFahrenheit(max)
|
||||
min = LocationService.celsiusToFahrenheit(min)
|
||||
}
|
||||
max = Math.round(max)
|
||||
min = Math.round(min)
|
||||
return max + "°/" + min + "°"
|
||||
}
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Style.fontWeightMedium
|
||||
color: Color.mOnSurfaceVariant
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
@@ -753,45 +784,49 @@ Loader {
|
||||
}
|
||||
|
||||
// Battery and Keyboard Layout (full mode only)
|
||||
RowLayout {
|
||||
Layout.preferredWidth: 60
|
||||
spacing: 4
|
||||
ColumnLayout {
|
||||
Layout.preferredWidth: 60
|
||||
spacing: 8
|
||||
|
||||
// Battery
|
||||
RowLayout {
|
||||
spacing: 4
|
||||
spacing: 4
|
||||
visible: UPower.displayDevice && UPower.displayDevice.ready && UPower.displayDevice.isPresent
|
||||
|
||||
NIcon {
|
||||
icon: BatteryService.getIcon(Math.round(UPower.displayDevice.percentage * 100), UPower.displayDevice.state === UPowerDeviceState.Charging, true)
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: UPower.displayDevice.state === UPowerDeviceState.Charging ? Color.mPrimary : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: Math.round(UPower.displayDevice.percentage * 100) + "%"
|
||||
color: Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
|
||||
// Keyboard Layout
|
||||
RowLayout {
|
||||
spacing: 4
|
||||
spacing: 4
|
||||
visible: keyboardLayout.currentLayout !== "Unknown"
|
||||
|
||||
NIcon {
|
||||
icon: "keyboard"
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: keyboardLayout.currentLayout
|
||||
color: Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -803,26 +838,26 @@ Loader {
|
||||
spacing: 0
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Style.marginM
|
||||
Layout.preferredWidth: Style.marginM
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 48
|
||||
radius: 24
|
||||
Layout.preferredHeight: 48
|
||||
radius: 24
|
||||
color: Color.mSurface
|
||||
border.color: passwordInput.activeFocus ? Color.mPrimary : Qt.alpha(Color.mOutline, 0.3)
|
||||
border.width: passwordInput.activeFocus ? 2 : 1
|
||||
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 18
|
||||
anchors.leftMargin: 18
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 14
|
||||
spacing: 14
|
||||
|
||||
NIcon {
|
||||
icon: "lock"
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Style.fontSizeL
|
||||
color: passwordInput.activeFocus ? Color.mPrimary : Color.mOnSurfaceVariant
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
@@ -834,7 +869,7 @@ Loader {
|
||||
height: 0
|
||||
visible: false
|
||||
enabled: !lockContext.unlockInProgress
|
||||
font.pointSize: Style.fontSizeM
|
||||
font.pointSize: Style.fontSizeM
|
||||
color: Color.mPrimary
|
||||
echoMode: TextInput.Password
|
||||
passwordCharacter: "•"
|
||||
@@ -855,8 +890,8 @@ Loader {
|
||||
spacing: 0
|
||||
|
||||
Rectangle {
|
||||
width: 2
|
||||
height: 20
|
||||
width: 2
|
||||
height: 20
|
||||
color: Color.mPrimary
|
||||
visible: passwordInput.activeFocus && passwordInput.text.length === 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -876,7 +911,7 @@ Loader {
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: 6
|
||||
spacing: 6
|
||||
visible: passwordInput.text.length > 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -885,7 +920,7 @@ Loader {
|
||||
|
||||
NIcon {
|
||||
icon: "circle-filled"
|
||||
pointSize: Style.fontSizeS
|
||||
pointSize: Style.fontSizeS
|
||||
color: Color.mPrimary
|
||||
opacity: 1.0
|
||||
}
|
||||
@@ -893,8 +928,8 @@ Loader {
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 2
|
||||
height: 20
|
||||
width: 2
|
||||
height: 20
|
||||
color: Color.mPrimary
|
||||
visible: passwordInput.activeFocus && passwordInput.text.length > 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
@@ -917,10 +952,10 @@ Loader {
|
||||
|
||||
Rectangle {
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 8
|
||||
anchors.rightMargin: 8
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 36
|
||||
height: 36
|
||||
width: 36
|
||||
height: 36
|
||||
radius: width * 0.5
|
||||
color: submitButtonArea.containsMouse ? Color.mPrimary : Qt.alpha(Color.mPrimary, 0.8)
|
||||
border.color: Color.mPrimary
|
||||
@@ -930,7 +965,7 @@ Loader {
|
||||
NIcon {
|
||||
anchors.centerIn: parent
|
||||
icon: "arrow-forward"
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnPrimary
|
||||
}
|
||||
|
||||
@@ -951,40 +986,42 @@ Loader {
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Style.marginM
|
||||
Layout.preferredWidth: Style.marginM
|
||||
}
|
||||
}
|
||||
|
||||
// System control buttons
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 48
|
||||
spacing: 10
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
spacing: 10
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Style.marginM
|
||||
Layout.preferredWidth: Style.marginM
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 48
|
||||
radius: 24
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
radius: Settings.data.general.compactLockScreen ? 18 : 24
|
||||
color: logoutButtonArea.containsMouse ? Color.mTertiary : "transparent"
|
||||
border.color: Color.mOutline
|
||||
border.width: 1
|
||||
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 6
|
||||
spacing: 6
|
||||
|
||||
NIcon {
|
||||
icon: "logout"
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL
|
||||
color: logoutButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("session-menu.logout")
|
||||
color: logoutButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
@@ -1002,28 +1039,85 @@ Loader {
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 48
|
||||
radius: 24
|
||||
color: rebootButtonArea.containsMouse ? Color.mTertiary : "transparent"
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
radius: Settings.data.general.compactLockScreen ? 18 : 24
|
||||
color: suspendButtonArea.containsMouse ? Color.mTertiary : "transparent"
|
||||
border.color: Color.mOutline
|
||||
border.width: 1
|
||||
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 6
|
||||
spacing: 6
|
||||
|
||||
NIcon {
|
||||
icon: "suspend"
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL
|
||||
color: suspendButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("session-menu.suspend")
|
||||
color: suspendButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: suspendButtonArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onClicked: CompositorService.suspend()
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
radius: Settings.data.general.compactLockScreen ? 18 : 24
|
||||
color: rebootButtonArea.containsMouse ? Color.mTertiary : "transparent"
|
||||
border.color: Color.mOutline
|
||||
border.width: 1
|
||||
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 6
|
||||
|
||||
NIcon {
|
||||
icon: "reboot"
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL
|
||||
color: rebootButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("session-menu.reboot")
|
||||
color: rebootButtonArea.containsMouse ? Color.mOnTertiary : Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
@@ -1041,30 +1135,37 @@ Loader {
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
Behavior on border.color {
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 48
|
||||
radius: 24
|
||||
Layout.preferredHeight: Settings.data.general.compactLockScreen ? 36 : 48
|
||||
radius: Settings.data.general.compactLockScreen ? 18 : 24
|
||||
color: shutdownButtonArea.containsMouse ? Color.mError : "transparent"
|
||||
border.color: shutdownButtonArea.containsMouse ? Color.mError : Color.transparent
|
||||
border.color: shutdownButtonArea.containsMouse ? Color.mError : Color.mOutline
|
||||
border.width: 1
|
||||
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
spacing: 6
|
||||
spacing: 6
|
||||
|
||||
NIcon {
|
||||
icon: "shutdown"
|
||||
pointSize: Style.fontSizeL
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeM : Style.fontSizeL
|
||||
color: shutdownButtonArea.containsMouse ? Color.mOnError : Color.mOnSurfaceVariant
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("session-menu.shutdown")
|
||||
color: shutdownButtonArea.containsMouse ? Color.mOnError : Color.mOnSurfaceVariant
|
||||
pointSize: Style.fontSizeM
|
||||
pointSize: Settings.data.general.compactLockScreen ? Style.fontSizeS : Style.fontSizeM
|
||||
font.weight: Font.Medium
|
||||
}
|
||||
}
|
||||
@@ -1092,7 +1193,7 @@ Loader {
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: Style.marginM
|
||||
Layout.preferredWidth: Style.marginM
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1102,4 +1203,4 @@ Loader {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user