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
SDK
Kirigami Gallery
Commits
5800f946
Verified
Commit
5800f946
authored
Sep 13, 2022
by
ivan tkachenko
Browse files
SelectionControlsGallery: Fix `TypeError: Cannot read property 'width' of null`
parent
a2b91d95
Pipeline
#231133
passed with stage
in 2 minutes and 36 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/data/contents/ui/gallery/SelectionControlsGallery.qml
View file @
5800f946
/*
* Copyright 2015 Marco Martin <mart@kde.org>
* Copyright 2022 ivan tkachenko <me@ratijas.tk>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
...
...
@@ -67,11 +68,11 @@ Kirigami.ScrollablePage {
ListView
{
model
:
20
delegate
:
Controls.CheckDelegate
{
width
:
parent
.
width
text
:
qsTr
(
"
Delegate
"
)
+
"
"
+
(
modelData
+
1
)
width
:
ListView
.
view
.
width
-
ListView
.
view
.
leftMargin
-
ListView
.
view
.
rightMargin
text
:
qsTr
(
"
Delegate
%1
"
).
arg
(
modelData
+
1
)
}
}
Component.onCompleted
:
background
.
visible
=
true
Component.onCompleted
:
background
.
visible
=
true
;
}
}
...
...
@@ -90,11 +91,11 @@ Kirigami.ScrollablePage {
ListView
{
model
:
20
delegate
:
Controls.RadioDelegate
{
width
:
parent
.
width
text
:
qsTr
(
"
Delegate
"
)
+
"
"
+
(
modelData
+
1
)
width
:
ListView
.
view
.
width
-
ListView
.
view
.
leftMargin
-
ListView
.
view
.
rightMargin
text
:
qsTr
(
"
Delegate
%1
"
).
arg
(
modelData
+
1
)
}
}
Component.onCompleted
:
background
.
visible
=
true
Component.onCompleted
:
background
.
visible
=
true
;
}
}
...
...
@@ -113,11 +114,11 @@ Kirigami.ScrollablePage {
ListView
{
model
:
20
delegate
:
Controls.SwitchDelegate
{
width
:
parent
.
width
text
:
qsTr
(
"
Delegate
"
)
+
"
"
+
(
modelData
+
1
)
width
:
ListView
.
view
.
width
-
ListView
.
view
.
leftMargin
-
ListView
.
view
.
rightMargin
text
:
qsTr
(
"
Delegate
%1
"
).
arg
(
modelData
+
1
)
}
}
Component.onCompleted
:
background
.
visible
=
true
Component.onCompleted
:
background
.
visible
=
true
;
}
}
...
...
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