Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Greeter orientation #402

Merged
merged 10 commits into from
Jan 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions qml/Greeter/CoverPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ Showable {
property var infographicModel
property bool draggable: true

property alias infographics: infographics
property alias showInfographic: infographicsLoader.active
property real infographicsLeftMargin: 0
property real infographicsTopMargin: 0
property real infographicsRightMargin: 0
property real infographicsBottomMargin: 0

property alias blurAreaHeight: loginBoxEffects.height
property alias blurAreaWidth: loginBoxEffects.width
property alias blurAreaX: loginBoxEffects.x
property alias blurAreaY: loginBoxEffects.y
property alias blurRadius: loginBoxBlur.radius

readonly property real showProgress: MathUtils.clamp((width - Math.abs(x + launcherOffset)) / width, 0, 1)

Expand Down Expand Up @@ -115,10 +120,10 @@ Showable {
}

FastBlur {
id: loginBoxBlur
visible: !draggable
anchors.fill: effectSource
source: effectSource
radius: 64
transparentBorder: true
}

Expand All @@ -132,14 +137,21 @@ Showable {
visible: false
}

Infographics {
id: infographics
objectName: "infographics"
model: root.infographicModel
clip: true // clip large data bubbles
Loader {
id: infographicsLoader
objectName: "infographicsLoader"
sourceComponent:Infographics {
id: infographics
objectName: "infographics"
model: root.infographicModel
clip: true // clip large data bubbles
}

anchors {
topMargin: root.panelHeight
leftMargin: root.infographicsLeftMargin
topMargin: root.infographicsTopMargin ? root.infographicsTopMargin : root.panelHeight
rightMargin: root.infographicsRightMargin
bottomMargin: root.infographicsBottomMargin
top: parent.top
bottom: parent.bottom
left: parent.left
Expand Down
23 changes: 21 additions & 2 deletions qml/Greeter/Greeter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Showable {
readonly property bool locked: LightDMService.greeter.active && !LightDMService.greeter.authenticated && !forcedUnlock

property bool tabletMode
property string usageMode
property url viewSource // only used for testing

property int failedLoginsDelayAttempts: 7 // number of failed logins
Expand All @@ -69,6 +70,7 @@ Showable {
property rect inputMethodRect

property bool hasKeyboard: false
property int orientation

signal tease()
signal sessionStarted()
Expand Down Expand Up @@ -356,8 +358,7 @@ Showable {
anchors.fill: parent

active: root.required
source: root.viewSource.toString() ? root.viewSource :
(d.multiUser || root.tabletMode) ? "WideView.qml" : "NarrowView.qml"
source: root.viewSource.toString() ? root.viewSource : "GreeterView.qml"

onLoaded: {
root.lockedApp = "";
Expand Down Expand Up @@ -476,6 +477,24 @@ Showable {
property: "hasKeyboard"
value: root.hasKeyboard
}

Binding {
target: loader.item
property: "usageMode"
value: root.usageMode
}

Binding {
target: loader.item
property: "multiUser"
value: d.multiUser
}

Binding {
target: loader.item
property: "orientation"
value: root.orientation
}
}

Connections {
Expand Down
Loading