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`.
Don't block plasmashell when doing kscreen calls (make them async). Also
add a nullptr check to rotationplugin, which potentially could be a fix
for crashes on the PinePhone.
Currently with a light theme, often colors calculated from icons are incredible bright and vivid. This can cause the user to be flashed all of a sudden with a bright color when launching an app. This commit adopt the dark background blending scheme for all usecases.
When plasmashell is started and the user had set docked mode, it may get
reset. This patch makes sure that we don't change the user's choice
after hotplugging/unplugging a display. The initial setting of
convergendeMode (if true) is now remembered.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit changes the action drawer colorsets to be contextually correct. The panel background would use the window background colors (instead of the view ones), and quicksettings delegates would use colors from the Button color set (rather than the view).
This also changes the background scrim to always be dark even in light mode. I think this is important to do because we have two views (notifications, and quick settings), which currently don't have much in the way of colours to distinguish the two.
This commit also makes some changes to the notifications widget in order for its card foreground to be the standard theme colors.
{width=200}
{width=200}
{width=300}
{width=200}
{width=200}
{width=300}
This ensures that all elements in the volume OSD get the window
visibility and can turn off any listeners. This avoids excessive
bindings being triggered when the osd is closed and audio is played.
This changeset makes the shell respect the quickSettingsColumns mobile
shell setting. It renders the number of columns correctly and makes the
drawer wider, as needed.
As a side-effect, the width is now more dpi-independant since it
switches from raw pixel values to gridUnit.
Another side effect is that we make the individual quicksettings buttons
ever so slightly wider (5.333 gridUnits before, gridUnits now).
Signed-off-by: Sebastian Kügler <sebas@kde.org>
This change adds a property to the shellsettings plugin to allow
changing the number of columns in the QuickSettings drawer in the top
panel. It defaults to the current value, 3.
This will allow us to accommodate for wider displays where the current
drawer unnecessarily paginates (and thus hides some of) the
quicksettings.
Minimum is still 3 since that it computes in the drawer code (and
currently not necessary to change), maximum is somewhat arbitrarily, 7.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/422
This commit simplifies the AudioInfo data provider to fetch the volume
directly, rather than relying on a series of complicated connections. It
also does some cleanup of AudioInfo, removing unused functions.
This avoids the following error for haptic events when used from QML:
```
QVariant: Provided metatype for 'QCoro::Task<void>' does not support destruction and copy construction
```
This commit makes a much needed cleanup and overhaul of the volume OSD.
Changes:
- Fix context menus for app streams
- Remove dedicated mute button in cards (simplifies the UI for touch
devices)
- Add selection background for card delegates
- Sync audio models with plasma-pa
- Simplify implementation of cards
- Sync volume slider implementation with plasma-pa
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.
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.
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.
Fixes typos in various source comments.
Found via `codespell -S "*.po,*.svg,*.pgm,*.xml,./po,*.desktop,*.json,*.actions" -L aline,aparent,childs,distroname,indexin,indx,logicaly,lokal,nd,splitted,te`
This popupprovider takes care of automatically enabling and disabling
convergence / docked mode when a monitor is plugged in or unplugged.
It uses the plugin that is provided with the kscreenosd quicksetting,
which essentially notifies of outputs being added and removed.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
When a quicksetting is changed to not available, it should be removed
from the model. The proper API call to beginRemoveRows() has the index
of the last removed element as last parameter and will fail with null.
This patch makes dynamically removing a quicksetting by changing the
available property to false.
Signed-off-by: Sebastian Kügler <sebas@kde.org>
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.
Change the "toggleDoNotDisturbMode" function to "setDoNotDisturbMode"
and add a parameter so that we actually set the mode to the intended
value, not just flip it.