Commit graph

52 commits

Author SHA1 Message Date
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
a95598d5e4 panels: Fix panels having partial opacity and convoluted vkbd colors
A custom 0.95 opacity was added to the panels in
https://invent.kde.org/plasma/plasma-mobile/-/merge_requests/642 for
overlaying applications. This
required some complicated logic and layering to mix with other modes of
operation. Since this broke at some point, simplify the logic completely
so that it's just a flat colour. This also fixes the navigation panel
not having a colour when the keyboard is shown over the homescreen.
2025-09-13 22:18:32 -04:00
Devin Lin
674c5034ae animations: Use Kirigami units and speed up several of them
This converts many of the animation durations to Kirigami units so that
they can be controlled system wide. It also speeds up several of the
animation durations (ex. in folio) from 800ms to 400ms to improve the
feel and responsiveness of the shell.
2025-09-12 05:41:20 -04:00
Devin Lin
ee1a311af7 components/mobileshell: Introduce singleton for plasma-nm lib
We currently create several instances of the plasma-nm objects over the shell. Use a single singleton to avoid having to load it multiple times.
2025-04-25 14:58:18 -04:00
Devin Lin
23797660ac statusbar: Don't show internet icon and loading indicator at same time
Ensure that the internet icon and the loading indicator do not show at the same time.
2025-04-07 00:03:06 +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
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
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
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
eb9509ce68 Remove trailing whitespace 2024-07-26 23:47:44 -04:00
Mr. Athozus
8f9db42e8f Add setting for showing date in status bar
As the title said.

Requested in plasma-mobile/plasma-settings#17

I marked it as a draft because there is a small regression which removes vertical alignment of right icons.
2024-06-28 02:05:42 +00:00
Mr. Athozus
a889968e25 Use activated icon in status bar when Bluetooth is connected 2024-05-04 22:05:59 +00:00
Mr. Athozus
5b1f00d4ca
Load WirelessStatus in Internet indicator 2024-05-03 19:58:36 +02:00
Mr. Athozus
f6e34a4f84
Show hotspot and strength when it is activated 2024-04-27 21:48:46 +02:00
Fushan Wen
d375914a8c StatusBar: remove excessive space 2024-01-22 10:52:02 +00:00
Fushan Wen
843977059b StatusBar: port away from statusnotifieritem dataengine
Task: https://phabricator.kde.org/T13319
2024-01-22 10:52:02 +00:00
Yari Polla
4f45654af6 Port mobileshell plugins to ecm_add_qml_module 2023-11-02 11:08:17 +00:00
Yari Polla
184b663903 dataproviders: declare SignalStrengthInfo as singleton 2023-10-21 11:32:41 +02:00
Yari Polla
3ca9dab083 dataproviders: declare BluetoothInfo as Singleton 2023-10-21 11:32:41 +02:00
Yari Polla
72657628b6 dataproviders: declare BatteryInfo as singleton 2023-10-21 11:32:41 +02:00
Yari Polla
73e020e448 dataproviders: declare AudioInfo as singleton 2023-10-21 11:32:41 +02:00
Devin Lin
58faa0362c statusbar: Fix polish loop 2023-09-28 20:41:18 -07:00
Devin Lin
7e012fc49a porting: Port away from PlasmaCore colors 2023-09-26 21:21:06 -07:00
Nicolas Fella
a75c95237e Remove import versions from networkmanager imports 2023-09-24 20:47:29 +00:00
Carl Schwan
d8f3146de5
initialstart: Port to FormCard 2023-09-21 21:02:47 +02:00
Nate Graham
cc50aee72d Remove versioning from PlasmaCore module imports
It's unneeded in Qt6 and can cause subtle issues.
2023-09-05 09:34:49 -06:00
Marco Martin
908029d4a6 Port to KSortFilterProxyModel
port away from the PlasmaCore version

see https://invent.kde.org/frameworks/plasma-framework/-/issues/19
2023-08-29 14:30:12 +00:00
Devin Lin
1963340d4f Switch some uses of IconItem to Kirigami.Icon, and fix some theme porting 2023-07-24 22:24:23 -04:00
Alexey Andreyev
127bbdf653 Port away from PlasmaCore and PlasmaExtras to Kirigami
See also:

https://pointieststick.com/2023/06/14/call-to-action-easy-porting-opportunity-in-plasma/
2023-07-25 01:13:52 +00:00
Devin Lin
dffa0a9581 components: Port to MultiEffect 2023-05-12 22:07:48 -04:00
Devin Lin
3f74522241 statusbar: Fix loading
Seems Qt 6.5 has some behaviour changes regarding required properties, which prevented the status bar from loading.

Fixes https://invent.kde.org/teams/plasma-mobile/issues/-/issues/231
2023-05-12 19:05:00 -04:00
Devin Lin
372626b786 taskswitcher: Restore status bar and navigation panel 2023-03-31 22:10:02 -07:00
Devin Lin
2d1610aaa2 mobileshell: Add constants singleton to reduce dependency on mobileshellstate 2023-03-18 22:06:48 -07:00
Devin Lin
b0d45d8409 statusbar: Cleanup and fix audio indicator not showing 2023-03-18 19:52:35 -07:00
Devin Lin
79e99a9cfe shellsettingsplugin: Extract out from mobileshell component 2023-03-18 12:28:28 -07:00
Devin Lin
462d99b83f quicksettings: Extract out from mobileshell into separate plugin 2023-03-16 19:44:36 -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
0775c56153 windowplugin: Extract out windowutil from mobileshell to separate plugin
This allows us in the future to use mobileshell without having the WindowUtil singleton loaded (which does a bunch of wayland calls that aren't necessary for most applications).
2023-03-15 15:12:23 +00:00
Yari Polla
91bec04d9d use IntervalAlignment from P5Support 2023-03-09 16:45:30 +01:00
Yari Polla
44f6d5e6d8 port one remaining datamodel to P5Support 2023-03-09 16:09:24 +01:00
Marco Martin
acd8605a4f Port dataengine usage to plasma5support
DataEngines are deprecated and are being splitted in a (temporary lived)
compat library called plasma5support
2023-03-08 14:26:36 +01:00
Devin Lin
f0c756214a Port QtGraphicalEffects 2023-03-03 06:01:23 +00: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
Devin Lin
06de6e416e statusbar: Don't use fractional font sizes 2022-10-27 20:01:16 -04:00
Devin Lin
867dc32df2 mmplugin: Flesh out update signals and behaviour 2022-10-23 12:12:40 -04:00
Devin Lin
7385ca9dca components/mobileshell: Add mechanism to keep track of and stop launched apps 2022-10-12 17:00:21 -04:00
Devin Lin
1830b9dd2a quicksettings/donotdisturb: Move do not disturb button to quick setting 2022-09-10 12:41:08 -04:00
Devin Lin
58afb6be1b statusbar: Don't show SignalStrengthIndicator if mobile data is being used
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/142
2022-08-14 11:42:11 -04:00
Devin Lin
0bc1607893 statusbar: Rename WifiIndicator to InternetIndicator, and consolidate 2022-08-14 11:34:46 -04:00
Devin Lin
210042a6bf libmobileshell: Move back to QML plugin
Move from a C++ library + QML plugin to a QML plugin only for simplicity, since the homescreen switching architecture will be done from Plasma, and so use of the shell library only needs to be from QML.
2022-03-21 10:00:09 -04:00