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
6830370b
Commit
6830370b
authored
Apr 06, 2022
by
Devin Lin
🎨
Browse files
quicksettings: Scale animation on delegate tap
parent
37b0e709
Pipeline
#160573
passed with stages
in 1 minute and 2 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsDelegate.qml
View file @
6830370b
...
...
@@ -40,6 +40,22 @@ Components.BaseItem {
readonly
property
color
disabledButtonColor
:
PlasmaCore
.
Theme
.
backgroundColor
readonly
property
color
disabledButtonPressedColor
:
Qt
.
darker
(
disabledButtonColor
,
1.1
)
// scale animation on press
property
real
zoomScale
:
1
Behavior
on
zoomScale
{
NumberAnimation
{
duration
:
200
easing.type
:
Easing
.
OutExpo
}
}
transform
:
Scale
{
origin.x
:
root
.
width
/
2
;
origin.y
:
root
.
height
/
2
;
xScale
:
root
.
zoomScale
yScale
:
root
.
zoomScale
}
function
delegateClick
()
{
if
(
root
.
toggle
)
{
root
.
toggle
();
...
...
components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsFullDelegate.qml
View file @
6830370b
...
...
@@ -22,8 +22,13 @@ QuickSettingsDelegate {
padding
:
PlasmaCore
.
Units
.
smallSpacing
*
2
iconItem
:
icon
// scale animation on press
zoomScale
:
mouseArea
.
pressed
?
0.9
:
1
background
:
Rectangle
{
anchors.fill
:
parent
radius
:
PlasmaCore
.
Units
.
smallSpacing
border.width
:
1
border.color
:
root
.
enabled
?
root
.
enabledButtonBorderColor
:
root
.
disabledButtonBorderColor
color
:
{
if
(
root
.
enabled
)
{
...
...
@@ -38,6 +43,7 @@ QuickSettingsDelegate {
id
:
mouseArea
onClicked
:
root
.
delegateClick
()
onPressAndHold
:
root
.
delegatePressAndHold
()
cursorShape
:
Qt
.
PointingHandCursor
PlasmaCore.IconItem
{
id
:
icon
...
...
components/mobileshell/qml/actiondrawer/quicksettings/QuickSettingsMinimizedDelegate.qml
View file @
6830370b
...
...
@@ -20,6 +20,9 @@ QuickSettingsDelegate {
iconItem
:
icon
// scale animation on press
zoomScale
:
mouseArea
.
pressed
?
0.9
:
1
background
:
Rectangle
{
radius
:
PlasmaCore
.
Units
.
smallSpacing
border.color
:
root
.
enabled
?
root
.
enabledButtonBorderColor
:
root
.
disabledButtonBorderColor
...
...
components/mobileshell/qml/taskswitcher/Task.qml
View file @
6830370b
...
...
@@ -75,6 +75,7 @@ Item {
DragHandler
{
id
:
dragHandler
target
:
parent
cursorShape
:
Qt
.
PointingHandCursor
yAxis.enabled
:
true
xAxis.enabled
:
false
...
...
@@ -233,7 +234,6 @@ Item {
TapHandler
{
id
:
tapHandler
cursorShape
:
Qt
.
PointingHandCursor
onTapped
:
delegate
.
activateApp
()
}
}
...
...
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