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 Mobile
Commits
166460f4
Commit
166460f4
authored
May 07, 2022
by
Yari Polla
Committed by
Devin Lin
May 17, 2022
Browse files
quicksettings: almost graphics fixes
parent
0f7dc0cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
components/mobileshell/qml/actiondrawer/quicksettings/QuickSettings.qml
View file @
166460f4
...
...
@@ -39,12 +39,14 @@ Item {
property
real
minimizedViewProgress
:
0
property
real
fullViewProgress
:
1
readonly
property
int
settingsPerPage
:
Math
.
max
(
6
,
Math
.
floor
(
width
/
columnWidth
)
*
2
)
readonly
property
real
quickSettingsHeight
:
2
*
rowHeight
readonly
property
MobileShell.QuickSettingsModel
quickSettingsModel
:
MobileShell.QuickSettingsModel
{}
readonly
property
int
rowCount
:
Math
.
floor
((
Window
.
height
*
60
/
100
)
/
rowHeight
)
readonly
property
int
columnCount
:
Math
.
floor
(
width
/
columnWidth
)
readonly
property
int
pageSize
:
rowCount
*
columnCount
readonly
property
int
quickSettingsCount
:
quickSettingsModel
.
count
function
resetSwipeView
()
{
swipeView
.
currentIndex
=
0
;
...
...
@@ -77,10 +79,10 @@ Item {
id
:
swipeView
Layout.fillWidth
:
true
Layout.
preferredHeight
:
quickSettingsHeight
Layout.
minimumHeight
:
Math
.
min
(
quickSettingsCount
/
columnCount
*
rowHeight
,
rowCount
*
rowHeight
)
Repeater
{
model
:
Math
.
ceil
(
quickSettings
Model
.
count
/
settingsPerPag
e
)
model
:
Math
.
ceil
(
quickSettings
Count
/
pageSiz
e
)
delegate
:
Flow
{
id
:
flow
spacing
:
0
...
...
@@ -90,8 +92,8 @@ Item {
Repeater
{
model
:
MobileShell.PaginateModel
{
sourceModel
:
quickSettingsModel
pageSize
:
settingsPerPag
e
firstItem
:
settingsPerPag
e
*
flow
.
index
pageSize
:
root
.
pageSiz
e
firstItem
:
pageSiz
e
*
flow
.
index
}
delegate
:
Components.BaseItem
{
...
...
@@ -120,27 +122,24 @@ Item {
}
}
}
PageIndicator
{
id
:
indicator
count
:
swipeView
.
count
currentIndex
:
swipeView
.
currentIndex
Loader
{
id
:
indicatorLoader
active
:
swipeView
.
count
>
1
Layout.alignment
:
Qt
.
AlignHCenter
delegate
:
Rectangle
{
implicitWidth
:
8
implicitHeight
:
8
radius
:
width
/
2
color
:
PlasmaCore
.
Theme
.
buttonFocusColor
sourceComponent
:
PageIndicator
{
count
:
swipeView
.
count
currentIndex
:
swipeView
.
currentIndex
delegate
:
Rectangle
{
implicitWidth
:
8
implicitHeight
:
8
opacity
:
index
===
indicator
.
currentIndex
?
0.95
:
0.45
radius
:
width
/
2
color
:
PlasmaCore
.
Theme
.
disabledTextColor
Behavior
on
opacity
{
OpacityAnimator
{
duration
:
MobileShell
.
MobileShellSettings
.
animationsEnabled
?
100
:
0
}
opacity
:
index
===
currentIndex
?
0.95
:
0.45
}
}
}
...
...
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