Commit graph

1095 commits

Author SHA1 Message Date
Devin Lin
46578fde73 singletons: Initialize singletons in shell desktop, not panel
We have some singletons (ex. for notification popups, volume, dbus) that
need to be initialized somewhere in plasmashell. Currently they are done
from the panel containment, which is a bit of a strange location. There isn't really
any offical way it seems to do this, so move it to the shell package
which feels more central.
2025-06-25 19:33:00 -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
Florian RICHER (aka MrDev023)
43672a5ec5 homescreens/folio: Block propagation if edit mode is active to avoid widget to trigger event
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/387 and https://invent.kde.org/plasma/plasma-mobile/-/issues/353

I can't only block the touch events because it blocks also MouseEvent.
> I think because it's used to convert it by QT into Mouse Event with source == MouseEventSynthesizedByQt or MouseEventSynthesizedBySystem.

So the solution, it's to check if mouse event is a synthetized event and if edit mode has been triggered to block or not the event propagation

Test:

- On VM with kwin_wayland command
- On mobile
2025-06-18 05:53:15 -04:00
Micah Stanley
8e3e05ddea Folio: Add Haptic Feedback
This merge request adds haptic feedback to the folio home screen when:
- Pressing and holding on an app icon
- Pressing and holding on an widget
- Pressing and holding for opening the settings component
2025-05-01 05:04:38 -04:00
l10n daemon script
efb518c817 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-04-27 01:31:31 +00:00
Micah Stanley
5fade2d5eb Folio: Search Widget View State Bugfix
Fixes a bug where if one swipes up from the app drawer and immediately swipes up again to the search widget, then lets the widget fully appear, then after that at any point swipes down to dismiss it, it will cause the swipe action to reveal the app drawer instead of the home screen. This was resolved by making sure when `closeAppDrawerAnim` is active, to only set the view state to `PageView` if the view state equals `AppDrawerView`. This prevents `closeAppDrawerAnim` from overwriting the `SearchWidgetView` state and making it seem to think we are still on the home screen when swiping down.

Here is a video of the bug in question.

![Screencast_20250424_225241__online-video-cutter.com_](/uploads/f5d03324850688028628ef8fc18f6c28/Screencast_20250424_225241__online-video-cutter.com_.mp4)
2025-04-25 12:39:05 +00:00
Micah Stanley
06e5a89ca7 Folio: Make SettingsComponent Buttons Match FavoritesBar Location
This merge request makes the SettingsComponent buttons match the FavoritesBar location. This helps better utilize the available screen space as before the buttons would exclusively remain at the bottom and could cause them to overlap with the HomeScreenPage or navbar.

Before:

![Screenshot_20250424_093156](/uploads/be3b3ef255333052a8f2b74b8645a906/Screenshot_20250424_093156.png)

After:

![Screenshot_20250423_181926](/uploads/7823b8e2d1ba41c376bc83b80ea56136/Screenshot_20250423_181926.png)
2025-04-25 01:23:48 +00:00
Micah Stanley
a452bc3030 Folio: Settings Component Bugfix
Fixes a bug where if one presses and holds the home screen to bring up the settings component, then swipes up to access the application drawer while the settings component open animation is playing, both the drawer and settings component will be visible on screen at the same time. Fixing this was achieved by setting swipe state back to none whenever the settings component is opening and a onSwipeMove event happens.

Video of the bug.

![Screencast_20250423_151033](/uploads/7f4f04617c42d5898322a8fa5ef306b8/Screencast_20250423_151033.webm)
2025-04-24 13:42:16 +00:00
Micah Stanley
9bd4f0b747 GestureNavigation: Screen Rotation Popup Button
Implementation of a popup button to rotate the screen while using gesture navigation.

The button is set to appear when the device rotates while auto rotation is off. Then the button will be visible for a short period of time before disappearing.
2025-04-21 22:09:14 +00:00
Micah Stanley
842354bd70 Shell: Add Setting to Auto Hide Panels so Applications Can Fill the Entire Device Screen Space
This merge request adds a new setting to auto hide the status and navigation panels so applications will be able to fill out the entire device screen area. Also, this adds a new quick settings toggle to quickly change this property.
2025-04-21 15:56:33 +00:00
Micah Stanley
036cc8502b Folio: Add ability to lock layout
Adds a new setting to lock the layout of the home screen so one will not accidentally modify it.

Closes https://invent.kde.org/plasma/plasma-mobile/-/issues/459
2025-04-21 14:01:54 +00:00
l10n daemon script
9d284e4aa1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-04-15 01:29:59 +00:00
Micah Stanley
9707f503a2 GestureNavigation: Fix Action Drawer State being out of Sync on First Start 2025-04-13 12:55:25 +00:00
Devin Lin
049eaf7df1 taskpanel: Fix rotate button showing with autorotate
AutoRotatePolicy has another option "InTabletMode" which is still
autorotate since we are always in tablet mode on mobile. Ensure that it
is skipped when determining whether to show the manual rotation button.
2025-04-08 16:12:56 +00:00
Micah Stanley
a3cfa885ee Mobileshell: Reorganize File Structure of Popup Items
Consolidate the popup items into a single folder for better organization.
2025-03-23 03:55:04 +00:00
Devin Lin
d621b23eb0 folio: Delete delegates if the application is removed
When an application is detected to be removed from the system, remove the delegate from the homescreen layout as well.
2025-03-19 23:40:11 -04: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
Devin Lin
df6fb87ac8 folio: Add visual placeholder for favourites bar
This adds a visual placeholder when dropping applications on the
favourites bar, making it consistent with dropping applications on a
page.
2025-03-19 21:50:27 +00:00
Devin Lin
3afdafd8c2 folio: Use dynamic list insert/delete for changes
Should help reduce the effect of https://invent.kde.org/plasma/plasma-mobile/-/issues/440

Instead of fully resetting the application list when the ksycoca db
changes, calculate which items are removed and added based on the
storageId and emit targeted signals for them.
2025-03-19 21:45:06 +00:00
Devin Lin
c5f0d15b14 folio: Fix AppDelegate null errors
Sometimes due to model changes the application will be null, which
causes a lot of errors in the console. Add null checks to avoid this.
2025-03-19 18:23:35 +00:00
Devin Lin
bd895574ff shell: Remove nonexistent tabbar property in Panel
tabbar doesn't seem to exist, so it causes errors in the console.
Removing setting this nonexistent property.
2025-03-19 15:52:50 +00:00
Devin Lin
3550caa580 folio: Use smart pointers to manage delegate lifetimes
Currently delegates do not get deleted when removed from models. Due to
the complexity of drag state and other objects, we can't simply delete
the delegate when removed from the model because they might still be
involved in animations or other state at the time of removal. Use smart
pointers to have the delegate objects deleted instead.

QML unfortunately doesn't support QSharedPointer, so we need to expose raw pointers to it.
2025-02-21 18:06:24 +00:00
Devin Lin
7d9054f74e applicationlistmodel: Space out application list refreshes
Use the same behavior as kickoff on desktop, to limit application list
refreshes to once every 100ms.

https://invent.kde.org/plasma/plasma-mobile/-/issues/440
2025-02-17 15:22:38 +00:00
l10n daemon script
b993b510a4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-15 01:40:00 +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
3a6a2f78da homescreen/folio: fix icon drop position misalignment within folder and outside folder view check not accounting for size differences
This fixes an issue with folder app icon drop positions being misaligned. Noticeably causing issues when placing apps within folders when using gesture only mode.
Also, this fixes an issue with the outsideView calculation not accounting for folder icon size differences. Causing an issues with some apps still being interactive when outside the current page.
2024-11-20 03:20:01 +00:00
Micah Stanley
65c2be29e7 mobileshellstate: update isActionDrawerOpen to use intendedToBeVisible
The drawer was recently updated where it is now technically always is visible. So we need to update the binding for MobileShellState to use drawer.intendedToBeVisible so that it works properly.
2024-11-15 01:19:57 +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
b9d4ff6455 Revert "homescreens: Use WheelHandler on app list"
This reverts commit 11a45f94d2.
2024-11-10 21:01:28 -08:00
Devin Lin
a8068ff2bb homescreen/folio: Fix favourites bar reordering when full
Fix the favourites bar reordering when it is already full, currently it
prevents any changes on a full bar, requiring users to move the delegate
out and back in again.
2024-11-10 19:22:32 +00:00
Micah Stanley
ca7b79e0b7 homescreen/folio: Fix folder apps still being Interactable when outside current page
This fixes an issue where apps in the folder can still be interacted with when outside the current page.
2024-11-10 00:05:10 +00:00
Micah Stanley
f52bf0bd71 homescreens/folio: Homescreen folder page snapping position bugfix
This fixes an issue where if the device is rotated in a folder, the page would not snap immediately back to the right position, but would instead animate icon position changes.

To achieve this, the following changes were made.
- changes were made to how the folder gird size is calculated to prevent an issue with the grid size changing for a brief period of time during screen rotation, causing problems with snapping to the correct page.
- icons position animations are now done by a animated index value to prevent it from animating when the device rotates
- when the device screen size changes (ex: device rotation), it now snaps to the current folder page, as before it would just stay in between the two pages.
2024-11-09 19:04:24 +00:00
Devin Lin
c2731f650e homescreens/folio: Fix goToPage call not updated with new parameter 2024-11-09 09:34:57 -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
aa3e42f65a homescreens/folio: Fix favourites bar ghost position when drag out
Fix the scenario where the favourites bar ghost position is not removed
when the user drags the delegate out of the bar area.
2024-11-09 17:12:04 +00: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
Micah Stanley
2a5dec9cf0 homescreens/folio: FavouritesBar: Icon position animation bugfix
This fixes in issue where the favorites bar icons would previously animate based off of position changes. This was causing unwanted animations in situations like screen rotation and login.
2024-11-07 05:17:57 +00:00
Micah Stanley
f5728e1a21 homescreens/folio: Homescreen page snapping position Bugfix
This fixes an issue where if the device is rotated on the 2nd or further page, the page would not snap immediately back to the right position, but would instead animate.
2024-11-07 05:12:47 +00:00
Devin Lin
3fd81679ed homescreens/folio: Remove icon on one of the settings delegates
None of the other settings delegates have icons, it makes it look
strange.
2024-10-31 03:15:22 +00:00
Devin Lin
57caf24504 homescreens/folio: Never open both search and app drawer
This ensures that the search widget and app drawer never simultaneously
both get opened.
2024-10-31 02:55:24 +00:00
Devin Lin
11a45f94d2 homescreens: Use WheelHandler on app list
Use Kirigami.WheelHandler on the app list to give a native feeling
scrolling experience with the mouse wheel.
2024-10-31 00:49:41 +00:00
Devin Lin
159e3bb3a6 homescreens/folio: Fix app icons being rounded to predefined sizes
This fixes the app icon size setting, which used to round to predefined
sizes regardless of the actual size setting.
2024-10-29 19:23:25 -07:00
Marco Mattiolo
4371c95194 Flag unused parameters with Q_UNUSED() 2024-09-28 06:31:00 +00:00
l10n daemon script
62a2633f72 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-28 01:30:06 +00:00
Laurent Montel
8c2faecb96 Remove virtual keyword when we use override 2024-08-19 07:39:01 +02: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
Devin Lin
d4b6309f47 homescreens/folio: Fix settings saving for certain options
Fixes #397

The save and load keys were spelled slightly differently which caused setting savings to not work for toggling text labels and the favourites bar background.
2024-07-31 14:11:34 +00:00
Devin Lin
5153ff0123 homescreens/folio: Fix incorrect folio reference 2024-07-30 21:07:43 -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