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
KScreen
Commits
032898c0
Verified
Commit
032898c0
authored
May 19, 2022
by
ivan tkachenko
Browse files
plasmoid: Port away from unit context property to PlasmaCore.Units
parent
ac315a80
Changes
3
Hide whitespace changes
Inline
Side-by-side
plasmoid/package/contents/ui/PresentationModeItem.qml
View file @
032898c0
...
...
@@ -13,7 +13,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
ColumnLayout
{
spacing
:
u
nits
.
smallSpacing
spacing
:
PlasmaCore
.
U
nits
.
smallSpacing
PlasmaComponents.CheckBox
{
id
:
checkBox
...
...
@@ -71,18 +71,18 @@ ColumnLayout {
RowLayout
{
Layout.fillWidth
:
true
Layout.leftMargin
:
checkBoxMetrics
.
width
spacing
:
u
nits
.
smallSpacing
spacing
:
PlasmaCore
.
U
nits
.
smallSpacing
PlasmaCore.IconItem
{
Layout.preferredWidth
:
u
nits
.
iconSizes
.
medium
Layout.preferredHeight
:
u
nits
.
iconSizes
.
medium
Layout.preferredWidth
:
PlasmaCore
.
U
nits
.
iconSizes
.
medium
Layout.preferredHeight
:
PlasmaCore
.
U
nits
.
iconSizes
.
medium
source
:
pmSource
.
inhibitions
[
0
]
?
pmSource
.
inhibitions
[
0
].
Icon
||
""
:
""
visible
:
valid
}
PlasmaComponents.Label
{
Layout.fillWidth
:
true
Layout.maximumWidth
:
Math
.
min
(
u
nits
.
gridUnit
*
20
,
implicitWidth
)
Layout.maximumWidth
:
Math
.
min
(
PlasmaCore
.
U
nits
.
gridUnit
*
20
,
implicitWidth
)
font.pointSize
:
theme
.
smallestFont
.
pointSize
wrapMode
:
Text
.
WordWrap
elide
:
Text
.
ElideRight
...
...
plasmoid/package/contents/ui/ScreenLayoutSelection.qml
View file @
032898c0
...
...
@@ -14,7 +14,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
ColumnLayout
{
spacing
:
0
spacing
:
PlasmaCore
.
Units
.
smallSpacing
*
2
states
:
[
State
{
...
...
@@ -43,7 +43,7 @@ ColumnLayout {
id
:
screenLayoutRow
readonly
property
int
buttonSize
:
Math
.
floor
((
width
-
spacing
*
(
screenLayoutRepeater
.
count
-
1
))
/
screenLayoutRepeater
.
count
)
Layout.fillWidth
:
true
spacing
:
u
nits
.
smallSpacing
spacing
:
PlasmaCore
.
U
nits
.
smallSpacing
Repeater
{
id
:
screenLayoutRepeater
...
...
@@ -61,7 +61,7 @@ ColumnLayout {
anchors.centerIn
:
parent
width
:
height
// FIXME use proper FrameSvg margins and stuff
height
:
parent
.
height
-
u
nits
.
smallSpacing
height
:
parent
.
height
-
PlasmaCore
.
U
nits
.
smallSpacing
source
:
modelData
.
iconName
active
:
parent
.
hovered
}
...
...
@@ -72,7 +72,7 @@ ColumnLayout {
PlasmaExtras.DescriptiveLabel
{
id
:
noScreenLabel
Layout.fillWidth
:
true
Layout.maximumWidth
:
Math
.
min
(
u
nits
.
gridUnit
*
20
,
implicitWidth
)
Layout.maximumWidth
:
Math
.
min
(
PlasmaCore
.
U
nits
.
gridUnit
*
20
,
implicitWidth
)
wrapMode
:
Text
.
Wrap
text
:
i18n
(
"
You can only apply a different screen layout when there is more than one display device plugged in.
"
)
font.pointSize
:
theme
.
smallestFont
.
pointSize
...
...
plasmoid/package/contents/ui/main.qml
View file @
032898c0
...
...
@@ -88,17 +88,17 @@ Item {
Plasmoid.fullRepresentation
:
ColumnLayout
{
spacing
:
0
Layout.preferredWidth
:
u
nits
.
gridUnit
*
15
Layout.preferredWidth
:
PlasmaCore
.
U
nits
.
gridUnit
*
15
ScreenLayoutSelection
{
Layout.leftMargin
:
u
nits
.
smallSpacing
Layout.leftMargin
:
PlasmaCore
.
U
nits
.
smallSpacing
Layout.fillWidth
:
true
}
PresentationModeItem
{
Layout.fillWidth
:
true
Layout.topMargin
:
units
.
large
Spacing
Layout.leftMargin
:
u
nits
.
smallSpacing
Layout.topMargin
:
PlasmaCore
.
Units
.
small
Spacing
*
2
Layout.leftMargin
:
PlasmaCore
.
U
nits
.
smallSpacing
}
// compact the layout
...
...
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