Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Phone Components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Plasma
Plasma Phone Components
Commits
3f32a18b
Commit
3f32a18b
authored
Jul 22, 2020
by
Marco Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make use of HomeScreenControls
parent
7e6f6b06
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
6 deletions
+44
-6
components/HomeScreenControls.qml
components/HomeScreenControls.qml
+2
-2
containments/homescreen/package/contents/ui/main.qml
containments/homescreen/package/contents/ui/main.qml
+27
-0
containments/panel/package/contents/ui/main.qml
containments/panel/package/contents/ui/main.qml
+3
-1
containments/taskpanel/package/contents/ui/main.qml
containments/taskpanel/package/contents/ui/main.qml
+12
-3
No files found.
components/HomeScreenControls.qml
View file @
3f32a18b
...
...
@@ -26,6 +26,6 @@ QtObject {
signal
resetHomeScreenPosition
()
property
Item
homeScreen
property
Window
homeScreenWindow
property
bool
homeScreenVisible
property
QtObject
homeScreenWindow
property
bool
homeScreenVisible
:
true
}
containments/homescreen/package/contents/ui/main.qml
View file @
3f32a18b
...
...
@@ -18,6 +18,7 @@
*/
import
QtQuick
2.12
import
QtQuick
.
Window
2.12
import
QtQuick
.
Layouts
1.1
import
QtGraphicalEffects
1.0
...
...
@@ -32,6 +33,8 @@ import org.kde.plasma.private.containmentlayoutmanager 1.0 as ContainmentLayoutM
import
org
.
kde
.
phone
.
homescreen
1.0
import
org
.
kde
.
plasma
.
private
.
mobileshell
1.0
as
MobileShell
Item
{
id
:
root
width
:
640
...
...
@@ -74,10 +77,34 @@ Item {
onWidthChanged
:
recalculateMaxFavoriteCount
()
onHeightChanged
:
recalculateMaxFavoriteCount
()
Component.onCompleted
:
{
if
(
plasmoid
.
screen
==
0
)
{
MobileShell
.
HomeScreenControls
.
homeScreen
=
root
MobileShell
.
HomeScreenControls
.
homeScreenWindow
=
root
.
Window
.
window
}
componentComplete
=
true
;
recalculateMaxFavoriteCount
()
}
Plasmoid.onScreenChanged
:
{
if
(
plasmoid
.
screen
==
0
)
{
MobileShell
.
HomeScreenControls
.
homeScreen
=
root
MobileShell
.
HomeScreenControls
.
homeScreenWindow
=
root
.
Window
.
window
}
}
Window.onWindowChanged
:
{
if
(
plasmoid
.
screen
==
0
)
{
MobileShell
.
HomeScreenControls
.
homeScreenWindow
=
root
.
Window
.
window
}
}
Connections
{
target
:
MobileShell
.
HomeScreenControls
function
onResetHomeScreenPosition
()
{
scrollAnim
.
to
=
0
;
scrollAnim
.
restart
();
}
}
Timer
{
id
:
autoScrollTimer
property
bool
scrollDown
:
true
...
...
containments/panel/package/contents/ui/main.qml
View file @
3f32a18b
...
...
@@ -29,12 +29,14 @@ import org.kde.plasma.workspace.components 2.0 as PlasmaWorkspace
import
org
.
kde
.
taskmanager
0.1
as
TaskManager
import
org
.
kde
.
plasma
.
private
.
nanoshell
2.0
as
NanoShell
import
org
.
kde
.
plasma
.
private
.
mobileshell
1.0
as
MobileShell
import
"
LayoutManager.js
"
as
LayoutManager
import
"
quicksettings
"
import
"
indicators
"
as
Indicators
Item
{
id
:
root
width
:
480
...
...
@@ -47,7 +49,7 @@ Item {
property
bool
reorderingApps
:
false
property
var
layoutManager
:
LayoutManager
readonly
property
bool
showingApp
:
!
plasmoid
.
nativeInterface
.
showDesktop
&&
(
hasTasks
||
NanoShell
.
StartupFeedback
.
visible
)
readonly
property
bool
showingApp
:
!
MobileShell
.
HomeScreenControls
.
homeScreenVisible
//!
plasmoid.nativeInterface.showDesktop && (hasTasks || NanoShell.StartupFeedback.visible)
readonly
property
bool
hasTasks
:
tasksModel
.
count
>
0
...
...
containments/taskpanel/package/contents/ui/main.qml
View file @
3f32a18b
...
...
@@ -29,6 +29,8 @@ import org.kde.kquickcontrolsaddons 2.0
import
org
.
kde
.
plasma
.
private
.
nanoshell
2.0
as
NanoShell
import
org
.
kde
.
plasma
.
private
.
mobileshell
1.0
as
MobileShell
PlasmaCore.ColorScope
{
id
:
root
width
:
600
...
...
@@ -37,7 +39,7 @@ PlasmaCore.ColorScope {
Plasmoid.backgroundHints
:
PlasmaCore
.
Types
.
NoBackground
readonly
property
bool
showingApp
:
!
plasmoid
.
nativeInterface
.
showDesktop
&&
(
hasTasks
||
NanoShell
.
StartupFeedback
.
visible
)
readonly
property
bool
showingApp
:
plasmoid
.
nativeInterface
.
hasCloseableActiveWindow
//
!plasmoid.nativeInterface.showDesktop && (hasTasks || NanoShell.StartupFeedback.visible)
readonly
property
bool
hasTasks
:
tasksModel
.
count
>
0
...
...
@@ -46,6 +48,12 @@ PlasmaCore.ColorScope {
id
:
taskSwitcherLoader
}
//FIXME: why it crashes on startup if TaskSwitcher is loaded immediately?
Connections
{
target
:
plasmoid
.
nativeInterface
function
onHasCloseableActiveWindowChanged
()
{
MobileShell
.
HomeScreenControls
.
homeScreenVisible
=
!
plasmoid
.
nativeInterface
.
hasCloseableActiveWindow
}
}
Timer
{
running
:
true
interval
:
200
...
...
@@ -204,10 +212,11 @@ PlasmaCore.ColorScope {
anchors.horizontalCenter
:
parent
.
horizontalCenter
iconSource
:
"
start-here-kde
"
enabled
:
taskSwitcher
&&
taskSwitcher
.
tasksCount
>
0
checkable
:
true
onC
heckedChang
ed
:
{
//
checkable: true
onC
lick
ed
:
{
taskSwitcher
.
hide
();
root
.
minimizeAll
();
MobileShell
.
HomeScreenControls
.
resetHomeScreenPosition
()
//plasmoid.nativeInterface.showDesktop = checked;
}
onPressed
:
mainMouseArea
.
managePressed
(
mouse
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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