Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
5bf0e705
Commit
5bf0e705
authored
Mar 07, 2022
by
Aleix Pol Gonzalez
🐧
Committed by
Nate Graham
Mar 07, 2022
Browse files
Port SDDM theme to PlasmaComponents 3.0
parent
35f75865
Pipeline
#146422
passed with stage
in 11 minutes and 30 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
sddm-theme/BreezeMenuStyle.qml
deleted
100644 → 0
View file @
35f75865
import
QtQuick
2.15
// Don't bump them any further, these are the latest.
import
QtQuick
.
Controls
1.6
as
QQC
import
QtQuick
.
Controls
.
Styles
1.4
as
QQCS
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
QQCS.MenuStyle
{
frame
:
Rectangle
{
color
:
PlasmaCore
.
ColorScope
.
backgroundColor
border.color
:
Qt
.
tint
(
PlasmaCore
.
ColorScope
.
textColor
,
Qt
.
rgba
(
color
.
r
,
color
.
g
,
color
.
b
,
0.7
))
border.width
:
1
}
itemDelegate.label
:
QQC.Label
{
height
:
contentHeight
*
1.2
verticalAlignment
:
Text
.
AlignVCenter
color
:
styleData
.
selected
?
PlasmaCore
.
ColorScope
.
highlightedTextColor
:
PlasmaCore
.
ColorScope
.
textColor
font.pointSize
:
config
.
fontSize
text
:
styleData
.
text
}
itemDelegate.background
:
Rectangle
{
visible
:
styleData
.
selected
color
:
PlasmaCore
.
ColorScope
.
highlightColor
}
}
sddm-theme/KeyboardButton.qml
View file @
5bf0e705
/*
SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import
QtQuick
2.15
import
QtQuick
.
Controls
1.6
as
QQC
// Don't bump it any further, this is the latest.
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2
.0
as
PlasmaComponents
// Because PC3 ToolButton can't take a menu
import
org
.
kde
.
plasma
.
components
3
.0
as
PlasmaComponents
PlasmaComponents.ToolButton
{
id
:
keyboardButton
id
:
root
property
int
currentIndex
:
-
1
property
int
currentIndex
:
keyboard
.
currentLayout
onCurrentIndexChanged
:
keyboard
.
currentLayout
=
currentIndex
text
:
i18nd
(
"
plasma_lookandfeel_org.kde.lookandfeel
"
,
"
Keyboard Layout: %1
"
,
instantiator
.
objectAt
(
currentIndex
).
shortName
)
implicitWidth
:
minimumWidth
visible
:
menu
.
items
.
length
>
1
visible
:
menu
.
count
>
1
Component.onCompleted
:
{
currentIndex
=
Qt
.
binding
(()
=>
keyboard
.
currentLayout
);
}
checkable
:
true
checked
:
menu
.
opened
onToggled
:
{
if
(
checked
)
{
menu
.
popup
(
root
,
0
,
0
)
}
else
{
menu
.
dismiss
()
}
}
PlasmaComponents.Menu
{
id
:
menu
PlasmaCore.ColorScope.colorGroup
:
PlasmaCore
.
Theme
.
NormalColorGroup
PlasmaCore.ColorScope.inherit
:
false
menu
:
QQC.Menu
{
id
:
keyboardMenu
style
:
BreezeMenuStyle
{}
Instantiator
{
id
:
instantiator
model
:
keyboard
.
layouts
onObjectAdded
:
keyboardM
enu
.
insertItem
(
index
,
object
)
onObjectRemoved
:
keyboardM
enu
.
removeItem
(
object
)
delegate
:
QQC
.MenuItem
{
onObjectAdded
:
m
enu
.
insertItem
(
index
,
object
)
onObjectRemoved
:
m
enu
.
removeItem
(
object
)
delegate
:
PlasmaComponents
.MenuItem
{
text
:
modelData
.
longName
property
string
shortName
:
modelData
.
shortName
onTriggered
:
{
...
...
sddm-theme/Main.qml
View file @
5bf0e705
...
...
@@ -6,7 +6,6 @@
import
QtQuick
2.15
import
QtQuick
.
Layouts
1.15
import
QtQuick
.
Controls
1.6
// Don't bump it any further, this is the latest.
import
QtQuick
.
Controls
2.15
as
QQC2
import
QtGraphicalEffects
1.15
...
...
sddm-theme/SessionButton.qml
View file @
5bf0e705
/*
SPDX-FileCopyrightText: 2016 David Edmundson <davidedmundson@kde.org>
SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
import
QtQuick
2.15
import
QtQuick
.
Controls
1.6
as
QQC
// Don't bump it any further, this is the latest.
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2
.0
as
PlasmaComponents
// Because PC3 ToolButton can't take a menu
import
org
.
kde
.
plasma
.
components
3
.0
as
PlasmaComponents
PlasmaComponents.ToolButton
{
id
:
root
property
int
currentIndex
:
-
1
implicitWidth
:
minimumWidth
visible
:
menu
.
items
.
length
>
1
visible
:
menu
.
count
>
1
text
:
i18nd
(
"
plasma_lookandfeel_org.kde.lookandfeel
"
,
"
Desktop Session: %1
"
,
instantiator
.
objectAt
(
currentIndex
).
text
||
""
)
Component.onCompleted
:
{
currentIndex
=
sessionModel
.
lastIndex
}
checkable
:
true
checked
:
menu
.
opened
onToggled
:
{
if
(
checked
)
{
menu
.
popup
(
root
,
0
,
0
)
}
else
{
menu
.
dismiss
()
}
}
PlasmaComponents.Menu
{
PlasmaCore.ColorScope.colorGroup
:
PlasmaCore
.
Theme
.
NormalColorGroup
PlasmaCore.ColorScope.inherit
:
false
menu
:
QQC.Menu
{
id
:
menu
style
:
BreezeMenuStyle
{}
Instantiator
{
id
:
instantiator
model
:
sessionModel
onObjectAdded
:
menu
.
insertItem
(
index
,
object
)
onObjectRemoved
:
menu
.
removeItem
(
object
)
delegate
:
QQC
.MenuItem
{
delegate
:
PlasmaComponents
.MenuItem
{
text
:
model
.
name
onTriggered
:
{
root
.
currentIndex
=
model
.
index
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment