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
c6b90fd6
Commit
c6b90fd6
authored
Sep 24, 2020
by
Jan Blackquill
🌈
Browse files
Port from context properties to singletons
This ports from units.* to PlasmaCore.Units.* and theme.* to PlasmaCore.Theme.*
parent
99475b09
Changes
17
Hide whitespace changes
Inline
Side-by-side
applets/clipboard/contents/ui/ClipboardItemDelegate.qml
View file @
c6b90fd6
...
...
@@ -21,6 +21,7 @@ import QtQuick 2.0
import
QtQuick
.
Layouts
1.1
import
QtGraphicalEffects
1.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaExtras
import
org
.
kde
.
kquickcontrolsaddons
2.0
as
KQuickControlsAddons
...
...
@@ -28,7 +29,7 @@ PlasmaExtras.ListItem {
id
:
menuItem
property
bool
supportsBarcodes
property
int
maximumNumberOfPreviews
:
Math
.
floor
(
width
/
(
u
nits
.
gridUnit
*
4
+
u
nits
.
smallSpacing
))
property
int
maximumNumberOfPreviews
:
Math
.
floor
(
width
/
(
PlasmaCore
.
U
nits
.
gridUnit
*
4
+
PlasmaCore
.
U
nits
.
smallSpacing
))
readonly
property
real
gradientThreshold
:
(
label
.
width
-
toolButtonsLoader
.
width
)
/
label
.
width
signal
itemSelected
(
string
uuid
)
...
...
@@ -38,7 +39,7 @@ PlasmaExtras.ListItem {
signal
action
(
string
uuid
)
// the 1.6 comes from ToolButton's default height
height
:
Math
.
max
(
label
.
height
,
Math
.
round
(
u
nits
.
gridUnit
*
1.6
))
+
2
*
u
nits
.
smallSpacing
height
:
Math
.
max
(
label
.
height
,
Math
.
round
(
PlasmaCore
.
U
nits
.
gridUnit
*
1.6
))
+
2
*
PlasmaCore
.
U
nits
.
smallSpacing
enabled
:
true
...
...
@@ -96,7 +97,7 @@ PlasmaExtras.ListItem {
visible
:
!
menuItem
.
ListView
.
isCurrentItem
anchors
{
left
:
parent
.
left
leftMargin
:
u
nits
.
gridUnit
/
2
-
listMargins
.
left
leftMargin
:
PlasmaCore
.
U
nits
.
gridUnit
/
2
-
listMargins
.
left
right
:
parent
.
right
verticalCenter
:
parent
.
verticalCenter
}
...
...
applets/clipboard/contents/ui/ImageItemDelegate.qml
View file @
c6b90fd6
...
...
@@ -21,11 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import
QtQuick
2.0
import
org
.
kde
.
kquickcontrolsaddons
2.0
as
KQuickControlsAddons
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
KQuickControlsAddons.QPixmapItem
{
id
:
previewPixmap
width
:
Math
.
min
(
nativeWidth
,
width
)
height
:
Math
.
min
(
nativeHeight
,
Math
.
round
(
width
*
(
nativeHeight
/
nativeWidth
)
+
u
nits
.
smallSpacing
*
2
))
height
:
Math
.
min
(
nativeHeight
,
Math
.
round
(
width
*
(
nativeHeight
/
nativeWidth
)
+
PlasmaCore
.
U
nits
.
smallSpacing
*
2
))
pixmap
:
DecorationRole
fillMode
:
KQuickControlsAddons
.
QPixmapItem
.
PreserveAspectFit
}
applets/clipboard/contents/ui/Menu.qml
View file @
c6b90fd6
...
...
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
import
QtQuick
2.0
import
org
.
kde
.
plasma
.
extras
2.0
as
PlasmaExtras
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
2.0
as
PlasmaComponents
// For Highlight
import
org
.
kde
.
kirigami
2.12
as
Kirigami
...
...
@@ -59,7 +60,7 @@ PlasmaExtras.ScrollArea {
id
:
emptyHint
anchors.centerIn
:
parent
width
:
parent
.
width
-
(
u
nits
.
largeSpacing
*
4
)
width
:
parent
.
width
-
(
PlasmaCore
.
U
nits
.
largeSpacing
*
4
)
visible
:
menuListView
.
count
===
0
text
:
i18n
(
"
Clipboard is empty
"
)
...
...
applets/clipboard/contents/ui/TextItemDelegate.qml
View file @
c6b90fd6
...
...
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import
QtQuick
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents3
PlasmaComponents3.Label
{
...
...
@@ -27,7 +28,7 @@ PlasmaComponents3.Label {
verticalAlignment
:
Text
.
AlignVCenter
text
:
{
var
highlightFontTag
=
"
<font color='
"
+
t
heme
.
highlightColor
+
"
'>%1</font>
"
var
highlightFontTag
=
"
<font color='
"
+
PlasmaCore
.
T
heme
.
highlightColor
+
"
'>%1</font>
"
var
text
=
DisplayRole
.
slice
(
0
,
100
)
...
...
applets/clipboard/contents/ui/UrlItemDelegate.qml
View file @
c6b90fd6
...
...
@@ -20,21 +20,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import
QtQuick
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents3
import
org
.
kde
.
kquickcontrolsaddons
2.0
as
KQuickControlsAddons
Item
{
id
:
previewItem
height
:
u
nits
.
gridUnit
*
4
+
u
nits
.
smallSpacing
*
2
height
:
PlasmaCore
.
U
nits
.
gridUnit
*
4
+
PlasmaCore
.
U
nits
.
smallSpacing
*
2
ListView
{
id
:
previewList
model
:
DisplayRole
.
split
(
"
"
,
maximumNumberOfPreviews
)
property
int
itemWidth
:
u
nits
.
gridUnit
*
4
property
int
itemHeight
:
u
nits
.
gridUnit
*
4
property
int
itemWidth
:
PlasmaCore
.
U
nits
.
gridUnit
*
4
property
int
itemHeight
:
PlasmaCore
.
U
nits
.
gridUnit
*
4
interactive
:
false
spacing
:
u
nits
.
smallSpacing
spacing
:
PlasmaCore
.
U
nits
.
smallSpacing
orientation
:
Qt
.
Horizontal
width
:
(
itemWidth
+
spacing
)
*
model
.
length
anchors
{
...
...
@@ -77,7 +78,7 @@ Item {
id
:
overlay
color
:
theme
.
textColor
opacity
:
0.6
height
:
u
nits
.
gridUnit
height
:
PlasmaCore
.
U
nits
.
gridUnit
anchors
{
left
:
parent
.
left
right
:
parent
.
right
...
...
@@ -92,8 +93,8 @@ Item {
verticalCenter
:
overlay
.
verticalCenter
left
:
overlay
.
left
right
:
overlay
.
right
leftMargin
:
u
nits
.
smallSpacing
rightMargin
:
u
nits
.
smallSpacing
leftMargin
:
PlasmaCore
.
U
nits
.
smallSpacing
rightMargin
:
PlasmaCore
.
U
nits
.
smallSpacing
}
elide
:
Text
.
ElideRight
horizontalAlignment
:
Text
.
AlignHCenter
...
...
@@ -113,7 +114,7 @@ Item {
left
:
previewList
.
right
right
:
parent
.
right
bottom
:
parent
.
bottom
margins
:
u
nits
.
smallSpacing
margins
:
PlasmaCore
.
U
nits
.
smallSpacing
}
verticalAlignment
:
Text
.
AlignBottom
...
...
applets/digital-clock/package/contents/ui/configAppearance.qml
View file @
c6b90fd6
...
...
@@ -201,7 +201,7 @@ QtLayouts.ColumnLayout {
visible
:
cfg_dateFormat
==
"
custom
"
wrapMode
:
Text
.
Wrap
QtLayouts.Layout.preferredWidth
:
QtLayouts
.
Layout
.
maximumWidth
QtLayouts.Layout.maximumWidth
:
u
nits
.
gridUnit
*
16
QtLayouts.Layout.maximumWidth
:
Kirigami
.
U
nits
.
gridUnit
*
16
onLinkActivated
:
Qt
.
openUrlExternally
(
link
)
MouseArea
{
...
...
@@ -225,7 +225,7 @@ QtLayouts.ColumnLayout {
QtLayouts.Layout.fillWidth
:
true
currentIndex
:
0
// ComboBox's sizing is just utterly broken
QtLayouts.Layout.minimumWidth
:
u
nits
.
gridUnit
*
10
QtLayouts.Layout.minimumWidth
:
Kirigami
.
U
nits
.
gridUnit
*
10
model
:
fontsModel
// doesn't autodeduce from model because we manually populate it
textRole
:
"
text
"
...
...
applets/notifications/package/contents/ui/DraggableDelegate.qml
View file @
c6b90fd6
...
...
@@ -50,6 +50,6 @@ MouseArea {
target
:
delegate
property
:
"
x
"
to
:
0
duration
:
u
nits
.
longDuration
duration
:
PlasmaCore
.
U
nits
.
longDuration
}
}
applets/notifications/package/contents/ui/NotificationReplyField.qml
View file @
c6b90fd6
...
...
@@ -21,6 +21,7 @@
import
QtQuick
2.8
import
QtQuick
.
Layouts
1.1
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents3
RowLayout
{
...
...
@@ -36,7 +37,7 @@ RowLayout {
property
string
buttonIconName
property
string
buttonText
spacing
:
u
nits
.
smallSpacing
spacing
:
PlasmaCore
.
U
nits
.
smallSpacing
function
activate
()
{
replyTextField
.
forceActiveFocus
();
...
...
applets/systemtray/package/contents/ui/ConfigEntries.qml
View file @
c6b90fd6
...
...
@@ -72,8 +72,8 @@ ColumnLayout {
ListView
{
id
:
itemsList
property
var
visibilityColumnWidth
:
u
nits
.
gridUnit
property
var
keySequenceColumnWidth
:
u
nits
.
gridUnit
property
var
visibilityColumnWidth
:
PlasmaCore
.
U
nits
.
gridUnit
property
var
keySequenceColumnWidth
:
PlasmaCore
.
U
nits
.
gridUnit
clip
:
true
...
...
@@ -123,7 +123,7 @@ ColumnLayout {
Layout.fillWidth
:
true
Kirigami.Icon
{
width
:
u
nits
.
iconSizes
.
small
width
:
PlasmaCore
.
U
nits
.
iconSizes
.
small
height
:
width
source
:
model
.
decoration
}
...
...
applets/systemtray/package/contents/ui/main.qml
View file @
c6b90fd6
...
...
@@ -30,20 +30,20 @@ import "items"
MouseArea
{
id
:
root
Layout.minimumWidth
:
vertical
?
u
nits
.
iconSizes
.
small
:
tasksGrid
.
implicitWidth
+
(
expander
.
visible
?
expander
.
implicitWidth
:
0
)
+
u
nits
.
smallSpacing
Layout.minimumWidth
:
vertical
?
PlasmaCore
.
U
nits
.
iconSizes
.
small
:
tasksGrid
.
implicitWidth
+
(
expander
.
visible
?
expander
.
implicitWidth
:
0
)
+
PlasmaCore
.
U
nits
.
smallSpacing
Layout.minimumHeight
:
vertical
?
tasksGrid
.
implicitHeight
+
(
expander
.
visible
?
expander
.
implicitHeight
:
0
)
+
u
nits
.
smallSpacing
:
u
nits
.
smallSpacing
Layout.minimumHeight
:
vertical
?
tasksGrid
.
implicitHeight
+
(
expander
.
visible
?
expander
.
implicitHeight
:
0
)
+
PlasmaCore
.
U
nits
.
smallSpacing
:
PlasmaCore
.
U
nits
.
smallSpacing
Layout.preferredHeight
:
Layout
.
minimumHeight
LayoutMirroring.enabled
:
!
vertical
&&
Qt
.
application
.
layoutDirection
===
Qt
.
RightToLeft
LayoutMirroring.childrenInherit
:
true
// The icon size to display when not using the auto-scaling setting
readonly
property
int
smallIconSize
:
u
nits
.
iconSizes
.
smallMedium
readonly
property
int
smallIconSize
:
PlasmaCore
.
U
nits
.
iconSizes
.
smallMedium
// Used only by AbstractItem, but it's easiest to keep it here since it
// uses dimensions from this item to calculate the final value
readonly
property
int
itemSize
:
autoSize
?
u
nits
.
roundToIconSize
(
Math
.
min
(
Math
.
min
(
width
/
rowsOrColumns
,
height
/
rowsOrColumns
),
u
nits
.
iconSizes
.
enormous
))
:
smallIconSize
readonly
property
int
itemSize
:
autoSize
?
PlasmaCore
.
U
nits
.
roundToIconSize
(
Math
.
min
(
Math
.
min
(
width
/
rowsOrColumns
,
height
/
rowsOrColumns
),
PlasmaCore
.
U
nits
.
iconSizes
.
enormous
))
:
smallIconSize
// The rest are derived properties; do not modify
readonly
property
bool
vertical
:
plasmoid
.
formFactor
===
PlasmaCore
.
Types
.
Vertical
...
...
@@ -147,7 +147,7 @@ MouseArea {
GridView
{
id
:
tasksGrid
readonly
property
int
smallSizeCellLength
:
root
.
cellThickness
>
root
.
smallIconSize
?
root
.
smallIconSize
+
u
nits
.
smallSpacing
*
2
readonly
property
int
smallSizeCellLength
:
root
.
cellThickness
>
root
.
smallIconSize
?
root
.
smallIconSize
+
PlasmaCore
.
U
nits
.
smallSpacing
*
2
:
root
.
smallIconSize
readonly
property
int
autoSizeCellLength
:
root
.
cellThickness
/
root
.
rowsOrColumns
readonly
property
int
totalLength
:
root
.
vertical
?
cellHeight
*
Math
.
round
(
count
/
root
.
rowsOrColumns
)
...
...
@@ -182,7 +182,7 @@ MouseArea {
from
:
0
to
:
1
easing.type
:
Easing
.
InOutQuad
duration
:
u
nits
.
longDuration
duration
:
PlasmaCore
.
U
nits
.
longDuration
}
}
...
...
@@ -193,7 +193,7 @@ MouseArea {
property
:
"
scale
"
to
:
1
easing.type
:
Easing
.
InOutQuad
duration
:
u
nits
.
longDuration
duration
:
PlasmaCore
.
U
nits
.
longDuration
}
}
...
...
@@ -201,7 +201,7 @@ MouseArea {
NumberAnimation
{
properties
:
"
x,y
"
easing.type
:
Easing
.
InOutQuad
duration
:
u
nits
.
longDuration
duration
:
PlasmaCore
.
U
nits
.
longDuration
}
}
}
...
...
components/containmentlayoutmanager/qml/private/BasicResizeHandle.qml
View file @
c6b90fd6
...
...
@@ -20,14 +20,14 @@
import
QtQuick
2.12
import
org
.
kde
.
plasma
.
private
.
containmentlayoutmanager
1.0
as
ContainmentLayoutManager
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
ContainmentLayoutManager.ResizeHandle
{
width
:
overlay
.
touchInteraction
?
u
nits
.
gridUnit
*
2
:
u
nits
.
gridUnit
width
:
overlay
.
touchInteraction
?
PlasmaCore
.
U
nits
.
gridUnit
*
2
:
PlasmaCore
.
U
nits
.
gridUnit
height
:
width
z
:
999
Rectangle
{
color
:
resizeBlocked
?
t
heme
.
negativeTextColor
:
t
heme
.
backgroundColor
color
:
resizeBlocked
?
PlasmaCore
.
T
heme
.
negativeTextColor
:
PlasmaCore
.
T
heme
.
backgroundColor
anchors.fill
:
parent
radius
:
width
opacity
:
0.6
...
...
@@ -35,7 +35,7 @@ ContainmentLayoutManager.ResizeHandle {
scale
:
overlay
.
open
?
1
:
0
Behavior
on
scale
{
NumberAnimation
{
duration
:
u
nits
.
longDuration
duration
:
PlasmaCore
.
U
nits
.
longDuration
easing.type
:
Easing
.
InOutQuad
}
}
...
...
lookandfeel/contents/splash/Splash.qml
View file @
c6b90fd6
...
...
@@ -19,6 +19,7 @@
import
QtQuick
2.5
import
QtQuick
.
Window
2.2
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
Rectangle
{
id
:
root
...
...
@@ -45,14 +46,14 @@ Rectangle {
id
:
units
text
:
"
M
"
property
int
gridUnit
:
boundingRect
.
height
property
int
largeSpacing
:
u
nits
.
gridUnit
property
int
largeSpacing
:
PlasmaCore
.
U
nits
.
gridUnit
property
int
smallSpacing
:
Math
.
max
(
2
,
gridUnit
/
4
)
}
Image
{
id
:
logo
//match SDDM/lockscreen avatar positioning
property
real
size
:
u
nits
.
gridUnit
*
8
property
real
size
:
PlasmaCore
.
U
nits
.
gridUnit
*
8
anchors.centerIn
:
parent
...
...
@@ -68,8 +69,8 @@ Rectangle {
y
:
parent
.
height
-
(
parent
.
height
-
logo
.
y
)
/
2
-
height
/
2
anchors.horizontalCenter
:
parent
.
horizontalCenter
source
:
"
images/busywidget.svgz
"
sourceSize.height
:
u
nits
.
gridUnit
*
2
sourceSize.width
:
u
nits
.
gridUnit
*
2
sourceSize.height
:
PlasmaCore
.
U
nits
.
gridUnit
*
2
sourceSize.width
:
PlasmaCore
.
U
nits
.
gridUnit
*
2
RotationAnimator
on
rotation
{
id
:
rotationAnimator
from
:
0
...
...
@@ -79,11 +80,11 @@ Rectangle {
}
}
Row
{
spacing
:
u
nits
.
smallSpacing
*
2
spacing
:
PlasmaCore
.
U
nits
.
smallSpacing
*
2
anchors
{
bottom
:
parent
.
bottom
right
:
parent
.
right
margins
:
u
nits
.
gridUnit
margins
:
PlasmaCore
.
U
nits
.
gridUnit
}
Text
{
color
:
"
#eff0f1
"
...
...
@@ -95,8 +96,8 @@ Rectangle {
}
Image
{
source
:
"
images/kde.svgz
"
sourceSize.height
:
u
nits
.
gridUnit
*
2
sourceSize.width
:
u
nits
.
gridUnit
*
2
sourceSize.height
:
PlasmaCore
.
U
nits
.
gridUnit
*
2
sourceSize.width
:
PlasmaCore
.
U
nits
.
gridUnit
*
2
}
}
}
...
...
wallpapers/image/imagepackage/contents/ui/WallpaperDelegate.qml
View file @
c6b90fd6
...
...
@@ -69,7 +69,7 @@ KCM.GridDelegate {
QIconItem
{
anchors.centerIn
:
parent
width
:
u
nits
.
iconSizes
.
large
width
:
PlasmaCore
.
U
nits
.
iconSizes
.
large
height
:
width
icon
:
"
view-preview
"
visible
:
!
walliePreview
.
visible
...
...
wallpapers/image/imagepackage/platformcontents/phone/ui/WallpaperDelegate.qml
View file @
c6b90fd6
...
...
@@ -20,6 +20,7 @@
import
QtQuick
2.0
import
QtQuick
.
Controls
.
Private
1.0
import
org
.
kde
.
kquickcontrolsaddons
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
components
3.0
as
PlasmaComponents3
MouseArea
{
...
...
@@ -40,18 +41,18 @@ MouseArea {
color
:
"
white
"
anchors
{
fill
:
parent
margins
:
u
nits
.
smallSpacing
margins
:
PlasmaCore
.
U
nits
.
smallSpacing
}
opacity
:
0.8
Rectangle
{
color
:
cfg_Color
anchors
{
fill
:
parent
margins
:
u
nits
.
smallSpacing
*
2
margins
:
PlasmaCore
.
U
nits
.
smallSpacing
*
2
}
QIconItem
{
anchors.centerIn
:
parent
width
:
u
nits
.
iconSizes
.
large
width
:
PlasmaCore
.
U
nits
.
iconSizes
.
large
height
:
width
icon
:
"
view-preview
"
visible
:
!
walliePreview
.
visible
...
...
@@ -83,7 +84,7 @@ MouseArea {
anchors
{
top
:
parent
.
top
right
:
parent
.
right
margins
:
u
nits
.
smallSpacing
margins
:
PlasmaCore
.
U
nits
.
smallSpacing
}
icon.name
:
"
list-remove
"
flat
:
false
...
...
@@ -100,12 +101,12 @@ MouseArea {
Rectangle
{
opacity
:
selected
?
1.0
:
0
anchors.fill
:
background
border.width
:
u
nits
.
smallSpacing
*
2
border.width
:
PlasmaCore
.
U
nits
.
smallSpacing
*
2
border.color
:
syspal
.
highlight
color
:
"
transparent
"
Behavior
on
opacity
{
PropertyAnimation
{
duration
:
u
nits
.
longDuration
duration
:
PlasmaCore
.
U
nits
.
longDuration
easing.type
:
Easing
.
OutQuad
}
}
...
...
wallpapers/image/imagepackage/platformcontents/phone/ui/config.qml
View file @
c6b90fd6
...
...
@@ -19,7 +19,7 @@
import
QtQuick
2.0
//We need units from it
import
org
.
kde
.
plasma
.
core
2.0
as
Plasma
c
ore
import
org
.
kde
.
plasma
.
core
2.0
as
Plasma
C
ore
import
org
.
kde
.
plasma
.
wallpapers
.
image
2.0
as
Wallpaper
import
org
.
kde
.
kquickcontrolsaddons
2.0
import
QtQuick
.
Controls
2.8
as
QQC2
...
...
@@ -51,7 +51,7 @@ Item {
model
:
imageWallpaper
.
wallpaperModel
currentIndex
:
-
1
cellWidth
:
Math
.
floor
(
wallpapersGrid
.
width
/
Math
.
max
(
Math
.
floor
(
wallpapersGrid
.
width
/
(
u
nits
.
gridUnit
*
12
)),
3
))
cellWidth
:
Math
.
floor
(
wallpapersGrid
.
width
/
Math
.
max
(
Math
.
floor
(
wallpapersGrid
.
width
/
(
PlasmaCore
.
U
nits
.
gridUnit
*
12
)),
3
))
cellHeight
:
cellWidth
/
(
plasmoid
.
width
/
plasmoid
.
height
)
anchors.margins
:
4
...
...
wallpapers/image/imagepackage/platformcontents/phone/ui/customwallpaper.qml
View file @
c6b90fd6
...
...
@@ -19,7 +19,7 @@
import
QtQuick
2.0
import
Qt
.
labs
.
folderlistmodel
2.1
//We need units from it
import
org
.
kde
.
plasma
.
core
2.0
as
Plasma
c
ore
import
org
.
kde
.
plasma
.
core
2.0
as
Plasma
C
ore
import
org
.
kde
.
plasma
.
wallpapers
.
image
2.0
as
Wallpaper
import
org
.
kde
.
kquickcontrolsaddons
2.0
import
QtQuick
.
Controls
2.8
as
QQC2
...
...
@@ -45,7 +45,7 @@ Rectangle {
}
currentIndex
:
-
1
cellWidth
:
Math
.
floor
(
customGrid
.
width
/
Math
.
max
(
Math
.
floor
(
customGrid
.
width
/
(
u
nits
.
gridUnit
*
12
)),
3
))
cellWidth
:
Math
.
floor
(
customGrid
.
width
/
Math
.
max
(
Math
.
floor
(
customGrid
.
width
/
(
PlasmaCore
.
U
nits
.
gridUnit
*
12
)),
3
))
cellHeight
:
cellWidth
/
(
imageWallpaper
.
width
/
imageWallpaper
.
height
)
anchors.margins
:
4
...
...
@@ -63,12 +63,12 @@ Rectangle {
color
:
"
white
"
anchors
{
fill
:
parent
margins
:
u
nits
.
smallSpacing
margins
:
PlasmaCore
.
U
nits
.
smallSpacing
}
Image
{
anchors
{
fill
:
parent
margins
:
u
nits
.
smallSpacing
*
2
margins
:
PlasmaCore
.
U
nits
.
smallSpacing
*
2
}
source
:
model
.
fileURL
}
...
...
wallpapers/image/imagepackage/platformcontents/touch/ui/config.qml
View file @
c6b90fd6
...
...
@@ -22,6 +22,7 @@ import QtQuick 2.0
import
org
.
kde
.
plasma
.
core
2.0
as
Plasmacore
import
org
.
kde
.
plasma
.
wallpapers
.
image
2.0
as
Wallpaper
import
org
.
kde
.
kquickcontrolsaddons
2.0
import
org
.
kde
.
plasma
.
core
2.0
as
PlasmaCore
import
org
.
kde
.
plasma
.
mobilecomponents
0.2
as
MobileComponets
Item
{
...
...
@@ -58,7 +59,7 @@ Item {
right
:
parent
.
right
}
delegateWidth
:
Math
.
floor
(
wallpapersGrid
.
width
/
Math
.
max
(
Math
.
floor
(
wallpapersGrid
.
width
/
(
u
nits
.
gridUnit
*
12
)),
3
))
delegateWidth
:
Math
.
floor
(
wallpapersGrid
.
width
/
Math
.
max
(
Math
.
floor
(
wallpapersGrid
.
width
/
(
PlasmaCore
.
U
nits
.
gridUnit
*
12
)),
3
))
delegateHeight
:
delegateWidth
/
1.6
delegate
:
WallpaperDelegate
{}
...
...
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