summaryrefslogtreecommitdiff
path: root/raveos-sddm-theme/sddm-rave-theme/Components/LoginForm.qml
blob: d3fd1b4a6cd2d931dde418e787ee6f6dc32b8c6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Config created by Keyitdev https://git.rp1.hu/gabeszm/sddm-rave-theme
// Copyright (C) 2022-2025 Keyitdev
// Based on https://github.com/MarianArlt/sddm-sugar-dark
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html

import QtQuick 2.15
import QtQuick.Layouts 6.5
import SddmComponents 2.0 as SDDM

ColumnLayout {
    id: formContainer
    SDDM.TextConstants { id: textConstants }

    property int p: config.ScreenPadding == "" ? 0 : config.ScreenPadding
    property string a: config.FormPosition

    spacing: root.font.pointSize * 0.9
    clip: true

    readonly property real innerPadding: root.font.pointSize * 0.9

    Clock {
        id: clock

        Layout.fillWidth: true
        Layout.alignment: Qt.AlignHCenter
        Layout.preferredHeight: clock.implicitHeight
        Layout.leftMargin: innerPadding
        Layout.rightMargin: innerPadding
    }

    // Akkumulátor + Hálózat jelzők
    RowLayout {
        id: statusRow

        Layout.alignment: Qt.AlignHCenter
        Layout.bottomMargin: visible ? root.font.pointSize * 0.3 : 0
        visible: (batteryIndicator.batteryLevel >= 0) || networkIndicator.isConnected

        spacing: root.font.pointSize * 1.2

        BatteryIndicator {
            id: batteryIndicator
            Layout.alignment: Qt.AlignVCenter
            Layout.preferredWidth: batteryIndicator.implicitWidth
            Layout.preferredHeight: batteryIndicator.implicitHeight
            visible: batteryIndicator.batteryLevel >= 0
        }

        NetworkIndicator {
            id: networkIndicator
            Layout.alignment: Qt.AlignVCenter
            Layout.preferredWidth: networkIndicator.implicitWidth
            Layout.preferredHeight: networkIndicator.implicitHeight
            visible: networkIndicator.isConnected
        }
    }

    // Billentyűzet kiosztás jelző (külön sorban, hogy akksi/wifi hiányában is látszódjon)
    KeyboardLayoutIndicator {
        id: keyboardLayoutIndicator

        Layout.alignment: Qt.AlignHCenter
        Layout.preferredHeight: keyboardLayoutIndicator.implicitHeight
        Layout.bottomMargin: visible ? root.font.pointSize * 0.3 : 0
        Layout.leftMargin: innerPadding
        Layout.rightMargin: innerPadding
    }

    Input {
        id: input

        Layout.fillWidth: true
        Layout.alignment: Qt.AlignHCenter
        Layout.preferredHeight: input.implicitHeight
        Layout.leftMargin: innerPadding
        Layout.rightMargin: innerPadding
    }

    SessionButton {
        id: sessionSelect

        Layout.fillWidth: true
        Layout.alignment: Qt.AlignHCenter
        Layout.preferredHeight: sessionSelect.height
        Layout.leftMargin: innerPadding
        Layout.rightMargin: innerPadding
    }

    VirtualKeyboardButton {
        id: virtualKeyboardButton

        Layout.fillWidth: true
        Layout.alignment: Qt.AlignHCenter
        Layout.preferredHeight: root.font.pointSize * 2
        Layout.leftMargin: innerPadding
        Layout.rightMargin: innerPadding
    }
}