Changeset View
Changeset View
Standalone View
Standalone View
sddm-theme/Main.qml
Show All 11 Lines | |||||
12 | * GNU General Public License for more details | 12 | * GNU General Public License for more details | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Library General Public | 14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.2 | 20 | import QtQuick 2.8 | ||
21 | 21 | | |||
22 | import QtQuick.Layouts 1.1 | 22 | import QtQuick.Layouts 1.1 | ||
23 | import QtQuick.Controls 1.1 | 23 | import QtQuick.Controls 1.1 | ||
24 | import QtGraphicalEffects 1.0 | 24 | import QtGraphicalEffects 1.0 | ||
25 | 25 | | |||
26 | import org.kde.plasma.core 2.0 as PlasmaCore | 26 | import org.kde.plasma.core 2.0 as PlasmaCore | ||
27 | import org.kde.plasma.components 2.0 as PlasmaComponents | 27 | import org.kde.plasma.components 2.0 as PlasmaComponents | ||
28 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 28 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
29 | 29 | | |||
30 | import "components" | 30 | import "components" | ||
31 | 31 | | |||
32 | PlasmaCore.ColorScope { | 32 | PlasmaCore.ColorScope { | ||
33 | id: root | 33 | id: root | ||
34 | | ||||
35 | // If we're using software rendering, draw outlines instead of shadows | ||||
36 | // See https://bugs.kde.org/show_bug.cgi?id=398317 | ||||
37 | readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software | ||||
38 | | ||||
34 | colorGroup: PlasmaCore.Theme.ComplementaryColorGroup | 39 | colorGroup: PlasmaCore.Theme.ComplementaryColorGroup | ||
35 | 40 | | |||
36 | width: 1600 | 41 | width: 1600 | ||
37 | height: 900 | 42 | height: 900 | ||
38 | 43 | | |||
39 | property string notificationMessage | 44 | property string notificationMessage | ||
40 | 45 | | |||
41 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | 46 | LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft | ||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 113 | WallpaperFader { | |||
110 | anchors.fill: parent | 115 | anchors.fill: parent | ||
111 | state: loginScreenRoot.uiVisible ? "on" : "off" | 116 | state: loginScreenRoot.uiVisible ? "on" : "off" | ||
112 | source: wallpaper | 117 | source: wallpaper | ||
113 | mainStack: mainStack | 118 | mainStack: mainStack | ||
114 | footer: footer | 119 | footer: footer | ||
115 | clock: clock | 120 | clock: clock | ||
116 | } | 121 | } | ||
117 | 122 | | |||
123 | DropShadow { | ||||
124 | id: clockShadow | ||||
125 | anchors.fill: clock | ||||
126 | source: clock | ||||
127 | visible: !softwareRendering | ||||
128 | horizontalOffset: 1 | ||||
129 | verticalOffset: 1 | ||||
130 | radius: 6 | ||||
131 | samples: 14 | ||||
132 | spread: 0.3 | ||||
133 | color: "black" // matches Breeze window decoration and desktopcontainment | ||||
134 | Behavior on opacity { | ||||
135 | OpacityAnimator { | ||||
136 | duration: 1000 | ||||
137 | easing.type: Easing.InOutQuad | ||||
138 | } | ||||
139 | } | ||||
140 | } | ||||
141 | | ||||
118 | Clock { | 142 | Clock { | ||
119 | id: clock | 143 | id: clock | ||
120 | visible: y > 0 | 144 | visible: y > 0 | ||
145 | property Item shadow: clockShadow | ||||
121 | y: (userListComponent.userList.y + mainStack.y)/2 - height/2 | 146 | y: (userListComponent.userList.y + mainStack.y)/2 - height/2 | ||
122 | anchors.horizontalCenter: parent.horizontalCenter | 147 | anchors.horizontalCenter: parent.horizontalCenter | ||
123 | } | 148 | } | ||
124 | 149 | | |||
125 | 150 | | |||
126 | StackView { | 151 | StackView { | ||
127 | id: mainStack | 152 | id: mainStack | ||
128 | anchors { | 153 | anchors { | ||
▲ Show 20 Lines • Show All 315 Lines • Show Last 20 Lines |