17
17
along with LightDM-KDE. If not, see <http://www.gnu.org/licenses/>.
20
21
import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
21
22
import org.kde.plasma.components 0.1 as PlasmaComponents
23
import org.kde.qtextracomponents 0.1 as ExtraComponents
22
24
import org.kde.plasma.core 0.1 as PlasmaCore
23
26
import MyLibrary 1.0 as LightDMPlasmaWidgets
26
29
width: screenSize.width;
27
30
height: screenSize.height;
30
fillMode: Image.PreserveAspectCrop
32
//read from config, if there's no entry use plasma theme
33
source: config.readEntry("Background") ? config.readEntry("Background"): plasmaTheme.wallpaperPath();
35
fillMode: Image.PreserveAspectCrop
36
//read from config, if there's no entry use plasma theme
37
source: config.readEntry("Background") ? config.readEntry("Background"): plasmaTheme.wallpaperPath();
41
Item { //recreate active screen at a sibling level which we can anchor in.
43
x: screenManager.activeScreen.x
44
y: screenManager.activeScreen.y
45
width: screenManager.activeScreen.width
46
height: screenManager.activeScreen.height
60
76
PlasmaCore.FrameSvgItem {
62
78
imagePath: "translucent/dialogs/background"
63
anchors.centerIn: parent;
79
anchors.centerIn: activeScreen;
65
width: childrenRect.width + 80;
81
width: childrenRect.width + 40;
66
82
height: childrenRect.height + 40;
91
source: "image://icon/meeting-participant"
92
height: usernameInput.height;
93
fillMode: Image.PreserveAspectFit
97
//not actually a password!
98
LightDMPlasmaWidgets.LineEdit {
102
clickMessage: "Username";
103
clearButtonShown: true;
105
passwordInput.setFocus();
107
width: childrenRect.width
108
height: childRect.height
108
Component.onCompleted: {
109
usernameInput.setFocus();
117
source: "image://icon/object-locked.png"
118
height: passwordInput.height;
119
fillMode: Image.PreserveAspectFit
123
LightDMPlasmaWidgets.LineEdit {
127
clickMessage: i18n("Password");
136
anchors.horizontalCenter: parent.horizontalCenter;
139
PlasmaComponents.Button {
114
ExtraComponents.QIconItem {
115
icon: "meeting-participant"
116
height: passwordInput.height;
117
width: passwordInput.height;
120
/*PlasmaComponents.*/TextField {
122
placeholderText: i18n("Username");
123
text: greeter.selectUser
125
passwordInput.focus = true;
128
Component.onCompleted: {
129
//if the username field has text, focus the password, else focus the username
131
passwordInput.focus = true
133
usernameInput.focus = true
137
KeyNavigation.tab: passwordInput
140
ExtraComponents.QIconItem {
141
icon: "object-locked"
142
height: passwordInput.height;
143
width: passwordInput.height;
146
/*PlasmaComponents.*/TextField {
148
echoMode: TextInput.Password
149
placeholderText: i18n("Password")
153
KeyNavigation.backtab: usernameInput
154
KeyNavigation.tab: loginButton
158
/*PlasmaComponents.*/ToolButton {
160
anchors.verticalCenter: parent.verticalCenter
161
iconSource: "go-next"
165
KeyNavigation.backtab: passwordInput
166
KeyNavigation.tab: usernameInput
146
PlasmaComponents.Button {
178
icon: "system-shutdown"
149
180
if (powerDialog.opacity == 1) {
150
181
powerDialog.opacity = 0;
152
183
powerDialog.opacity = 1;
155
185
optionsDialog.opacity = 0;
159
PlasmaComponents.Button {
160
text: i18n("Options");
191
icon: "system-log-out"
162
193
if (optionsDialog.opacity == 1) {
163
194
optionsDialog.opacity = 0;
165
196
optionsDialog.opacity = 1;
168
198
powerDialog.opacity = 0;