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
3406db0c
Commit
3406db0c
authored
Sep 27, 2022
by
Yari Polla
Committed by
Devin Lin
Oct 01, 2022
Browse files
homescreens: only close search widget and action drawer without opening the menu
parent
c660d4c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
containments/homescreens/folio/package/contents/ui/main.qml
View file @
3406db0c
...
...
@@ -40,22 +40,25 @@ MobileShell.HomeScreen {
forceActiveFocus
();
}
Plasmoid.onActivated
:
{
// Always close action drawer
if
(
MobileShell
.
TopPanelControls
.
actionDrawerVisible
)
{
MobileShell
.
TopPanelControls
.
closeActionDrawer
();
}
// Always close the search widget as well
if
(
searchWidget
.
isOpen
)
{
searchWidget
.
close
();
}
Plasmoid.onActivated
:
{
// there's a couple of steps:
// - minimize windows (only if we are in an app)
// - open app drawer
// - close app drawer and, if necessary, restore windows
if
(
!
plasmoid
.
nativeInterface
.
showingDesktop
&&
!
MobileShell
.
HomeScreenControls
.
homeScreenVisible
)
{
if
(
!
plasmoid
.
nativeInterface
.
showingDesktop
&&
!
MobileShell
.
HomeScreenControls
.
homeScreenVisible
||
MobileShell
.
TopPanelControls
.
actionDrawerVisible
||
searchWidget
.
isOpen
)
{
// Always close action drawer
if
(
MobileShell
.
TopPanelControls
.
actionDrawerVisible
)
{
MobileShell
.
TopPanelControls
.
closeActionDrawer
();
}
// Always close the search widget as well
if
(
searchWidget
.
isOpen
)
{
searchWidget
.
close
();
}
plasmoid
.
nativeInterface
.
showingDesktop
=
true
;
}
else
if
(
homescreen
.
homeScreenState
.
currentView
===
HomeScreenState
.
PageView
)
{
homescreen
.
homeScreenState
.
openAppDrawer
();
...
...
containments/homescreens/halcyon/package/contents/ui/main.qml
View file @
3406db0c
...
...
@@ -39,22 +39,25 @@ MobileShell.HomeScreen {
}
}
Plasmoid.onActivated
:
{
// Always close action drawer
if
(
MobileShell
.
TopPanelControls
.
actionDrawerVisible
)
{
MobileShell
.
TopPanelControls
.
closeActionDrawer
();
}
// Always close the search widget as well
if
(
search
.
isOpen
)
{
search
.
close
();
}
Plasmoid.onActivated
:
{
// there's a couple of steps:
// - minimize windows (only if we are in an app)
// - open app drawer
// - close app drawer and, if necessary, restore windows
if
(
!
plasmoid
.
nativeInterface
.
showingDesktop
&&
!
MobileShell
.
HomeScreenControls
.
homeScreenVisible
)
{
if
(
!
plasmoid
.
nativeInterface
.
showingDesktop
&&
!
MobileShell
.
HomeScreenControls
.
homeScreenVisible
||
MobileShell
.
TopPanelControls
.
actionDrawerVisible
||
search
.
isOpen
)
{
// Always close action drawer
if
(
MobileShell
.
TopPanelControls
.
actionDrawerVisible
)
{
MobileShell
.
TopPanelControls
.
closeActionDrawer
();
}
// Always close the search widget as well
if
(
search
.
isOpen
)
{
search
.
close
();
}
plasmoid
.
nativeInterface
.
showingDesktop
=
true
;
}
else
if
(
homescreen
.
page
==
0
)
{
homescreen
.
page
=
1
;
...
...
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