Commit graph

34 commits

Author SHA1 Message Date
Devin Lin
088c0d985b kscreen: Retry fetching config if kscreen gives nullptr
Apparently GetConfigOperation can retrieve a nullptr config, in which
case we just need to retry until kscreen gives us something.
2025-12-05 09:09:25 -05:00
Micah Stanley
6ba95df13d shelldbusclient: check if reply is valid 2025-11-13 15:49:23 +00:00
Devin Lin
839d5e2bff panels: Add support for defining device specific panel tweaks
This adds support for specifying options needed to deal with phone
display panel pecularities (ex. screen curves, notches, punch holes)

This is implemented as settings in ~/.config/plasmamobilerc, which can
set panel heights, paddings, and center spacings to duck display
cutouts. The pixel values are scaling independent, and so are not
affected when the display scaling is changed.

This is then exposed over DBus, so that components from outside of
plasmashell (ex. KWin) can access it easily without needing to connect to
kscreen themselves. Each screen is exposed as a single object.

Currently support is only added in the status bar and the navigation
panel.

Currently all screens have the settings applied. In the future, we may
want to limit this just to the internal screen (?)

---

This also adds a "devices" folder (in `devices/configs`) where per-device configs can be set.

This is installed to `/usr/share/plasma-mobile-device-configs`.
In `plasmamobilerc` (installed to `/etc/xdg/plasmamobilerc`, or
`~/.config/plasmamobilerc`), envmanager will read:

```toml
[Device]
device=oneplus-enchilada
```

for the device config to use and write its settings to
`~/.config/plasma-mobile/plasmamobilerc`.
2025-11-04 23:08:18 -05:00
Devin Lin
921345bc2d lockscreenstate: Make lock screen call async
This avoids blocking the shell when lock screen is requested
2025-10-31 09:25:54 -04:00
Devin Lin
447049d570 volumeosd: Listen to osd service for opening the popup
Fixes: https://invent.kde.org/plasma/plasma-mobile/-/issues/423

We currently listen to when the volume changes, which wouldn't happen if
the user reaches 0% or 100% and continues trying to press the volume
button. Instead, listen to OSD events for determining when to open the
popup.
2025-09-13 08:54:11 -04:00
Florian RICHER
2ba1eeb8d4 mobileshellstate: Fix memory leak 2025-08-19 18:42:23 +02:00
Devin Lin
749c0de5d5 mobileshellstate: Fetch initial state properly, and check property
Ensure that all of the variables have their initial state fetched at the
start with the shell DBus client. Also ensure that they only emit
property changes when they actually happen.
2025-08-10 14:55:42 -04:00
Devin Lin
3b6951bf1e panel: Overlay over lockscreen
Overlay the shell's status panel and quicksettings panel over the lockscreen, instead of rendering a second copy in the lockscreen theme. This will allow us to improve the lockscreen loading speed.

Key changes:
- Overlay quicksettings window and the status bar over the lockscreen when it is shown
- Refactor the top panel's showing logic to be cleaner (as it supports various overlay modes over fullscreen apps already)
- Implement lockscreen support to the status bar and quicksettings panel in the to panel
- Forward quicksettings panel requests for "unlock" over DBus to the lockscreen
- Add "raiselockscreen" QML plugin to easily request a window to be raised over the lockscreen

Notes:
- Now that we are sharing the quicksettings panel from the shell, notifications that are already there will be shown on the lockscreen (compared to right now, where only new notifications would be shown)

Depends on: 
- https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2339
- https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/283
- https://invent.kde.org/plasma/kwin/-/merge_requests/7839

Implements: https://invent.kde.org/plasma/plasma-mobile/-/issues/199

![Screencast_20250612_013325](/uploads/49e9981cb863056b4c0c46a144e5ee7d/Screencast_20250612_013325.webm)
2025-07-02 10:27:33 -04:00
Florian RICHER
2b51e0c30c homescreens/folio: Add options to turn off and lock the phone after a double tap on screen
Linked to issue: https://invent.kde.org/teams/plasma-mobile/issues/-/issues/318
2025-06-25 16:39:36 -04:00
Micah Stanley
9707f503a2 GestureNavigation: Fix Action Drawer State being out of Sync on First Start 2025-04-13 12:55:25 +00:00
Micah Stanley
013d034516 Gesture Navigation: Disable Gestures When Action Drawer, Notification Popup Drawer, or VolumeOSD are Visible
Disables gesture navigation when Action Drawer, Notification Popup Drawer, or VolumeOSD are visible as activating the task switcher in these situation can feel a bit weird.

Note:
~~Draft for in till I can get side loading working again so I can test it on device.~~

Still can't seem to get side loading working quite yet. Though, I did run the test I could from my laptop and it does seems to be working fine, so I will be removing this from draft.
2025-03-19 01:21:46 +00:00
Micah Stanley
48dedcd546 taskpanel/panel: make navbar and statusbar accessible from within fullscreen windows
These changes make the navigation and status bar accessible from within fullscreen applications by allowing the user to tap on the top or tap or drag on the bottom of the screen.

Also, since the top panel is now over top of all fullscreen applications, this moves the action drawer swipe area back into the status bar.

![navandstatusbar](/uploads/29bce14baf957059669689345c909896/navandstatusbar.gif)
2024-11-25 17:30:47 +00:00
Devin Lin
5207c06a12 startupfeedback: Fix multi-screen behaviour
Fix the model screen filtering not working properly, and account for case when opened window is already active.
2024-07-15 20:53:42 +00:00
Devin Lin
2d2b7407a6 startupfeedback: Change to be window based and controlled by a model
This makes the startup feedback more robust, by having instances be controlled by a model which can listen to window changes. Being window based also allows for the close button and gestures to work properly with it, since it will show up in the task switcher as well.

Fixes:
* https://invent.kde.org/plasma/plasma-mobile/-/issues/357
* https://invent.kde.org/plasma/plasma-mobile/-/issues/338
* https://invent.kde.org/plasma/plasma-mobile/-/issues/335 (dark themes now tint the background color)
* https://invent.kde.org/plasma/plasma-mobile/-/issues/330
* https://invent.kde.org/plasma/plasma-mobile/-/issues/30
2024-07-13 16:30:07 +00:00
Devin Lin
e2e6590222 startupfeedback: Add support for multiple screens
Addresses https://invent.kde.org/plasma/plasma-mobile/-/issues/175
2024-06-23 16:48:32 +00:00
Nicolas Fella
0f99a3c8c1 Adapt to plasma-framework targets being renamed 2023-11-23 23:42:47 +01:00
Yari Polla
4f45654af6 Port mobileshell plugins to ecm_add_qml_module 2023-11-02 11:08:17 +00:00
Devin Lin
fe8537c618 kwin/convergentwindows: Update to latest KWin changes, and remove KWin maximize mode
Disabled per-screen window decorations for now, since it seems KWin removed the screen property: 83c38b0907
2023-03-26 11:48:37 -07:00
Devin Lin
e16bdea17e mobileshellstate: Make sure DBus calls are async 2023-03-26 10:18:06 -07:00
Devin Lin
cadc5db962 mobileshellstate: Make lockscreen state DBus calls async 2023-03-26 10:03:11 -07:00
Devin Lin
083481d971 taskswitcher: Expose visible state to DBus and hookup to homescreen anim 2023-03-24 23:29:40 -07:00
Devin Lin
5f93d0198e homescreen: Activate animation after screen unlock 2023-03-24 21:27:52 -07:00
Devin Lin
0e4b1da9a1 volumeosd: Extract out singleton so that it's only loaded once in plasmashell 2023-03-19 21:10:49 -07:00
Devin Lin
f25840bfc2 mobileshellstate: Move to DBus API instead of trying to use shared QML context
This also allows us to trigger behaviour from other processes that import mobileshell
2023-03-19 18:32:52 -07:00
Devin Lin
2d1610aaa2 mobileshell: Add constants singleton to reduce dependency on mobileshellstate 2023-03-18 22:06:48 -07:00
Devin Lin
158af43fd4 audio: Refactor applet and extract singleton to MobileShellState
The eventual goal is to have as few singletons with state as possible in the mobileshell component when it is imported into components such as the lockscreen.

This doesn't fully accomplish it, but moves the audio provider singleton to MobileShellState, which will eventually need to be prevented from importing into non plasmashell processes.

This also disables the sound feedback when changing volume, since it can be a source of lag when showing the applet.
2023-03-16 07:21:01 +00:00
Devin Lin
8d311ed97b windowplugin: Fix remaining references to old plugin 2023-03-15 08:20:15 -07:00
Devin Lin
eb03fe8c94 taskswitcher: Port to kwin effect 2023-03-13 22:07:32 -07:00
Devin Lin
1dbb1c78f6 Port to Qt6/KF6 2023-03-03 06:01:23 +00:00
David Redondo
750d5581ef Revert "Show all headers in qtc6"
There was no consensus for this in Plasma.
This reverts commit c79ca828f3.
2023-01-24 08:51:18 +01:00
Laurent Montel
c79ca828f3 Show all headers in qtc6 2023-01-22 18:30:45 +00:00
Devin Lin
bdcbe4d6f7 mobileshellstate: Heavily refactor to remove global shell margins to fix window binding loops
Having a global set margins and orientation (that were calculated from the panel containment) caused a lot of issues with the way bindings were evaluated across panels, and with high coupling.

Now use properties from within containments to determine shell margins instead, which removes the dependency on other containments for measurements. This allows us to get rid of TaskPanelControls as well!

Fixes: https://invent.kde.org/teams/plasma-mobile/issues/-/issues/198
2022-12-10 21:05:13 -05:00
Devin Lin
c6802da477 mobileshellstate: Ensure default value for notificationsWidget 2022-11-12 11:15:36 -05:00
Devin Lin
7d3bf39750 mobileshell: Refactor and extract state to mobileshellstate plugin
This avoids mixing plasmashell state with our MobileShell component library (which really shouldn't have state at all).
2022-11-12 11:15:36 -05:00