Commit graph

382 commits

Author SHA1 Message Date
Micah Stanley
8065a98113 ActionDrawer/BrightnessItem: Brightness Slider Animation Adjustments
Brightness slider animation adjustments.
2025-03-22 20:36:31 +00:00
Micah Stanley
d9495bc714 actiondrawer: fix swipearea references 2025-03-22 19:13:27 +00:00
Micah Stanley
e4323f4ef0 notification list: fix notification scrolling within action drawer and lockscreen
This merge request fixes an issue with notification list scrolling and also adds a few general improvements.

To accomplish this, the notification widget was moved outside of the action drawer swipe area and lock screen swipe area, separating them from the parent-child relationship. Instead, the notification widget is now layered separately on top. This change seems to fix the conflict when both areas are accepting swipes from the same direction.

Additionally, changes were made to the notification list widget for the action drawer to make it behave similarly to the folio home screen app library. Specifically, when at the top of the list, one can swipe down over the notification area to expand the action drawer. In landscape mode, the media widget, clock, and date were also added to the notification list to provide more room for viewing notifications when scrolling.

Closes https://invent.kde.org/plasma/plasma-mobile/-/issues/318
2025-03-20 02:06:33 +00:00
Micah Stanley
5d443aa679 Status Bar: Battery Percentage Toggle/Limit to Internal Batteries
Adds a setting to toggle displaying the battery percentage and also limits it to only display the internal batteries.

Battery percentage on

![Screenshot_20250319_112119](/uploads/2585d843d9fd21c368dcbb1742f036f4/Screenshot_20250319_112119.png)

Battery percentage off

![Screenshot_20250319_112137](/uploads/26d0d1ab4170d097e8b2e6893d48788c/Screenshot_20250319_112137.png)
2025-03-19 20:09:33 +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
Micah Stanley
c6e0591977 popupnotifications: a bit of cleanup and bugfixes
This fixes an issue where if a notification is delivered while the action drawer is opened, it won't dismiss properly. Causing an issue where if a new notification comes through any time afterwards, the top touch area will get stuck and prevent touch inputs.
This also finishes connecting the do not disturb popup whitelist to the notification model.
2024-11-22 01:55:50 +00:00
Micah Stanley
7245080b22 actiondrawer: hide action drawer while adjusting screen brightness
This change hides the action drawer while adjusting the screen brightness so that one can see the content behind it.
2024-11-14 03:34:01 +00:00
Micah Stanley
e4d57d19bc actiondrawer: use action drawer window as the open surface area
Change to use the action drawer window as the open surface area so that we can open the drawer within fullscreen applications.
2024-11-14 03:31:10 +00:00
Devin Lin
238cf4948b actioncenter: Allow expanded mode to be opened as soon as minimized offset crossed
Currently the user can only expand to the expanded state after the initial minimized animation finishes. This animation gets reset as soon as a finger is pressed down, causing the user to have to wait until the animation completely finishes before being able to go to the expanded state.

Bypass the need to wait for the animation to finish by setting the open state immediately if the offset already is past the minimized threshold.
2024-11-12 00:25:33 -08:00
Devin Lin
c396555509 widgets/krunner: Modernize design to match app drawer, and add section headers
This MR:
- Caps the maximum width of delegates and centers them
- Makes the search widget style match the app drawer search bar
- Adds section headers
- Uses rounded delegates
2024-11-10 23:44:23 -08:00
Devin Lin
abfe419b3b screenbrightnessplugin: Fix behaviour if dbus service is not initialized
If the dbus service gets initialized later, ensure that the latest values are being fetched.
2024-11-10 21:57:17 -08:00
Devin Lin
3d9ddbde15 navigationpanel: Add manual screen rotation button
When the device is rotated and autorotate is off, a button will appear
on the navigation panel to manually rotate.

This is specific to the navigation panel, perhaps we can have a floating
button in gesture-only mode similar to Android?

TODO: PoC, I haven't yet actually tested this on device. I also need to
make sure that I check for whether autorotation is enabled on the
output.
2024-11-09 17:24:23 +00:00
Devin Lin
f3dc108602 actiondrawer: Use layershell to avoid taking focus from current window
We can use layershell to avoid taking focus from the current window,
which avoids any unnecessary behavior from an unfocus event.
2024-11-07 20:06:22 -08:00
Micah Stanley
eba6074161 notifications: Implement popup notifications
This merge request implements a more mobile optimized solution for popup notification.
- 

The current controls are:
- Swipe up to move the notification to the notification center.
- Swipe left/right to dismiss the notification entirely.
- If multiple popup notifications are grouped together, tap on the bottom area to view them in a expanded view.

What still needs to be done:
- ~~For notification without a default action, tapping on them should probably open up the associated app.~~ Note: I think I will add this in a separate merge request as it probably should be the case regardless if the notification is a popup
- ~~Swiping down on a notification currently does nothing. Maybe we should map this to a notification action?~~ Note: I have some ideas I will try later, though for now, I will leave this action blank
- ~~The expanded view of notifications should be able to be dismissed by swiping up/down on the top/bottom of the list.~~ Note: Added
- Investigate further into how to remove the current desktop popup notifications.
- ~~Code clean up.~~ Note: The code is at least a bit better

Single popup notification:

![notification_1](/uploads/63d12be6da1dd2676de17940dcadbdfa/notification_1.gif)

Multiple popup notifications:

![notification_2](/uploads/907a14b772f66f46040c28342f4dcf02/notification_2.gif)

Multiple popup notifications in the expanded view:

![notification_3](/uploads/9a7cd09a6bb8a0f7ee70e5bcf7c29c6b/notification_3.gif)

Any feedback would be greatly appreciated.
2024-11-07 16:13:06 +00:00
Devin Lin
4a86ad8c06 actiondrawer: Cleanup and simplify
Make sure that the view colorset is correct, remove unnecessary layer
(clip is enabled), and remove unnecessary visibility hack for the
notifications widget.
2024-11-05 03:42:25 +00:00
Devin Lin
76882f5b5d actiondrawer: Share components between portrait and landscape
This avoids having to completely load the quicksettings, status bar,
media widget, and notifications list from scratch when the view changes.
We now have a single instance of each component which is reparented to
the new view (portrait/landscape).

Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/406
2024-10-31 15:27:00 +00:00
Nicolas Fella
6da6f3fd55 Port to KStandardActions 2024-10-31 08:41:01 +00:00
Nicolas Fella
d49143456e Drop unused link libraries 2024-10-31 08:41:01 +00:00
Devin Lin
35b1128d1d actioncenter: Reduce usage of transforms and cleanup
Simplify positioning of some components by avoiding transforms and using
simple anchors to improve performance. Also cleanup unused properties.
2024-10-31 00:48:36 +00:00
Micah Stanley
f9630ba178 VolumeOSD: Increase animation duration and bugfix for audio applet page 2024-10-28 06:36:16 +00:00
Micah Stanley
205edd485c VolumeOSD: Prevent Stealing Focus from Applications
Before:

![Screenshot_20241025_051928](/uploads/9b41d77b5c673bfeccfe2518ccd40985/Screenshot_20241025_051928.png)

After:

![Screenshot_20241025_051550](/uploads/a357dd3271aba056f667410286cfed95/Screenshot_20241025_051550.png)
2024-10-26 18:50:40 +00:00
Sebastian Kügler
2b822e8c6a [mobileshell]: apply scale factor to status bar
This change allows scaling of the statusbar (the top panel).

As we have to accommodate for a wide variety of devices with different
physical pixel sizes, we need a way to scale the top panel / status bar.
This change introduces a config value (in plasmamobilerc, such as other
shell settings) that controls this size.

For example (plasmamobilerc):

[General]
statusBarScaleFactor=1.5

(Config UI in kcm mobileshell in separate patch)

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2024-10-25 17:53:25 +00:00
User8395
889c085c21 quicksettings: fix landscape not being scrollable
Currently, Quick Settings in landscape mode is not scrollable, due to issues with `scrollViewComponent`. This causes some buttons to become unseen in landscape mode but not portrait. This has been solved by deleting `scrollViewComponent` and replacing it with `swipeViewComponent`, to allow swiping to access other buttons in Quick Settings.

Before (docked mode and hotspot are missing):

![screen-recording__1_](/uploads/e0c4eaf22a2ec401c66e9e513e8ce7e1/screen-recording__1_.webm)

After (docked mode and hotspot are there):

![screen-recording](/uploads/404ebbecc87e1b60b2501b81b8ab83ee/screen-recording.webm)

However, with this setup, `resetSwipeView()` doesn't work, and Quick Settings remains at the page it was left at.
2024-10-25 17:02:30 +00:00
Micah Stanley
681d1683f5 VolumeOSD: Improve design, and prevent touch events from being taken from outside the osd
Fixes: https://invent.kde.org/plasma/plasma-mobile/-/issues/274

Any feedback on these changes would be much appreciated.

![Screenshot_20241024_093458-1](/uploads/7b4f89ace1a53c559737d1c05d591329/Screenshot_20241024_093458-1.png)
![Screenshot_20241023_070919](/uploads/c7b9a8de7c9bba2de01d734408e02b2b/Screenshot_20241023_070919.png)

Change Log:
- NanoShell FullScreenOverlay was changed to a LayerShellQt Window to keep it on the top layer and to prevent the popup from obsorbing all touch inputs.
- New animations were added to the volume popup.
- User can now change the volume by touching and dragging on the popup
- The mute button on the popup was fixed
- Mute buttons were added next to the volume sliders in the AudioApplet page
- Volume icons now dynamically update to the volume level
- Visual design adjustments
2024-10-25 15:52:49 +00:00
Sebastian Kügler
f21c55953c [battery]: support multiple batteries in shell's top panel
This change make Plasma Mobile show multiple batteries in the top panel
in case the system has more than one.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2024-10-22 17:03:53 +02:00
Sebastian Kügler
ab957a84f9 [battery]: port battery info to new model
This change ports BatteryInfo away from dataengines to the new battery
model that is also used for Plasma Desktop.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2024-10-22 17:03:53 +02:00
Devin Lin
6885dc4ae9 statusbar: Fix clock not updating immediately when timezones are changed
We should be polling by the second in order to always be up-to-date of
any system time changes.

Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/403
2024-10-11 00:17:52 +00:00
Devin Lin
c7e5003596 screenbrightnessplugin: Extract from initialstart and use in shell
This is partially an emergency fix also for
https://invent.kde.org/plasma/plasma-mobile/-/issues/404, which was
potentially introduced by https://invent.kde.org/plasma/plasma-mobile/-/merge_requests/582

This MR extracts the screen brightness implementation from initialstart
to a QML plugin, and also ports the action drawer brightness slider
implementation to it. This avoids importing the powerdevil screen
brightness plugin on the lockscreen, which apparently has a race
condition that causes it to sometimes segfault.
2024-10-08 22:47:30 -07:00
Devin Lin
050ce9e5b8 navigationpanel: Fix disabled buttons from having grey icons 2024-10-09 01:54:55 +00:00
Florian RICHER
a6a16507c3 quicksettings: Fix brightness slider
Status:

- Tested on my OP6 with PostmarketOS edge. (Pmbootstrap build + sideload)

Fix issue https://invent.kde.org/teams/plasma-mobile/issues/-/issues/306
2024-09-29 22:24:58 +00:00
Marco Mattiolo
ac91c9fe11 Drop semicolon after Q_UNUSED() for consistency through the repo 2024-09-28 06:31:00 +00:00
Micah Stanley
90ae13e5b6 Polished the media controls expanded view animation. 2024-08-01 21:26:18 +00:00
Devin Lin
3adcd1d51c swipearea: Add support for touchpad
This adds support for touchpad scrolling in various shell components, such as the lockscreen, homescreen and action drawer.

Currently TODO because it appears to be very buggy when there is a control underneath that also accepts touchpad input (ex. flickable). The touchpad scroll start appears to get called by Qt, but not the end event, so I am unable to "let go" of the flick. Not sure if it's a wayland issue.

This also appears to not work in the nested KWin session, not sure if it's because of libinput or something
2024-08-01 01:53:52 +00:00
Micah Stanley
e0dd65fa26 Notifications and Media Control Design Adjustments
Adjusted the colors of the notifications and media controls to help them fit in better together.

![Screenshot_20240729_045620](/uploads/4190227795db932ebead005c67510b45/Screenshot_20240729_045620.png)

![Screenshot_20240729_045637](/uploads/feb63760194ccc671d80c4279ab7b526/Screenshot_20240729_045637.png)
2024-08-01 01:18:33 +00:00
Micah Stanley
d42d36129d widgets/mediacontrols: Fix usage in action drawer and height animation
Fixes an issue where if the media controls were active and the action drawer was flicked opened, sometimes it would not fully open.

Changes include:
1. Media controls will now no longer animate its height if `implicitHeight` is 0
2. The action drawer animation code was reworked to allow its height to change dynamically.
2024-07-31 14:16:13 +00:00
Devin Lin
20efd102f3 actioncenter: Ensure window gets raised over status bar
Potential fix for #358, haven't yet verified on device
2024-07-29 21:08:54 +00:00
Devin Lin
8f79654989 widgets/notifications: Remove accidental dependency on being an applet
Followup to https://invent.kde.org/plasma/plasma-mobile/-/merge_requests/558 and removes the dependency on being an applet, as it causes the notifications to break on the lockscreen
2024-07-28 14:54:14 -04:00
Devin Lin
8ca80841d2 actiondrawer: Share quick settings model between landscape and portrait
Don't recreate the quick settings model when switching between landscape
and portrait. This should improve the performance of screen rotation.
2024-07-27 11:02:48 -04:00
Devin Lin
1702354d3f Use Kirigami.Units.cornerRadius in most radius values
This takes the place of using smallSpacing for the most part.
2024-07-27 00:02:05 -04:00
Devin Lin
eb9509ce68 Remove trailing whitespace 2024-07-26 23:47:44 -04:00
Devin Lin
5d84e6e47d widgets/notifications: Cleanup, fix some visual issues, and add jobs
Note: There was a lot of whitespace that my IDE is now removing.

Fixes job notifications not being dismissable (#208), and imports an
implementation from workspace for the progress bar and actions.

Fixes notification contents not being clipped when being dragged
(https://invent.kde.org/teams/plasma-mobile/issues/-/issues/287)

Also fixes notification text being spread over multiple lines
unnecessarily
(https://invent.kde.org/teams/plasma-mobile/issues/-/issues/302).
2024-07-26 23:21:14 -04:00
Florian RICHER
b1d75495e2 widgets/mediacontrols: Add expanded mode to change song position
![Enregistrement_d_écran_20240725_000229](/uploads/ffd7a7edf2b079627913d033857ce3fe/Enregistrement_d_écran_20240725_000229.webm)
2024-07-26 01:22:04 +00:00
Devin Lin
7f011e92ed quicksettings: Use standard corner radius 2024-07-15 18:45:33 -04: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
0ce95a604a homescreens/folio: Halve the needed swipe distance for swipe detection
SwipeArea requires 10px to differentiate between taps and swipes. HomeScreenState uses a further 10px to differentiate between vertical and horizontal swipes. This MR combines the swipe detection together so that we only need 10px rather than 20px for gesture detection.
2024-07-08 21:51:18 +00:00
Devin Lin
56ca0db5c6 homescreen: Add button to wallpaper selector to go to advanced settings
Currently you need to go from Settings -> "Switch between homescreens and more wallpaper options" to access the advanced wallpaper settings. Add a button directly into the wallpaper selector for this.
2024-07-05 02:53:26 +00:00
Devin Lin
29f014ad04 homescreen: Don't animate after unlock
KWin appears to freeze frames prior to locking, and so this animation looks very glitchy and jittery. It also causes problems if apps are already activated. Remove it for now so that it's smoother.
2024-07-03 17:54:00 +00:00
Mr. Athozus
49a3579c55 Use marquee label for quicksettings titles 2024-06-29 20:35:42 +00:00