QtQuick.Layouts are easier to manage, and more flexible.
In case of fillWidth+preferredWidth, preferredWidth defines a ratio
rather than an absolute value, so it was replaced with a singleton `1`
instead of a magic number `50`. Since size of this applet propagates
top-down only, it should not affect any calculations, especially
because `50` is too narrow to fit any reasonable text label, except
maybe Chinese.
Rename ids to make them easier to read. They are intentionally named
differently from their aliases to reduce potential confusion, e.g.
* icon -> image
* slider -> control
Having an "Add Panel" item in the panel context menu communicates to the
user that the new panel will be placed on the existing panel somehow, or
at least will bear some relationship to it. However this is false; the
new panel is added to the desktop containment, not the panel
containment. Therefore it is inappropriate to have this item in the
panel context menu since it has nothing to do with the panel that has
been right-clicked on.
This action is the "Open in Dolphin" menu item in the context menu. This
menu item is not very useful; there is little reason to open the entire
desktop view in Dolphin because it's already visible on the desktop!
Disabling this item by default makes the context menu a tiny bit more
approachable by removing a fairly useless item from it.
With a multi-screen setup, it's possible to get into a situation where
all of your means to launch apps have gone missing because a screen
forgot its containmewt or moved the only panel onto a disabled output,
or any number of other issues that unfortunately have not yet been
resolved. In such a situation, it is common for people to try to fix it
by visiting the KScreen KCM to switch around their primary screens,
enable disabled outputs, turn it off and on again, etc.
However if your only visible means to launch apps has gone missing, you
may have a hard time accessing the KScreen KCM. In such a circumstance,
it can be helpful to have the action in the desktop context menu so that
people can right-click on the wallpaper of any screen that *is* working
and make System Settings launch with the KScreen KCM on that screen.
Co-authored-by: Nate Graham <nate@kde.org>
BUG: 355679
FIXED-IN: 5.24
With https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/91
all ScrollView KCMs are frameless by default. This does not work with
the Users KCM due to its somewhat unusual arrangement of displaying two
pages at once, adjacent to one another. This commit opts it back into
the framed style, which looks better, until such time as the layout can
be adjusted to look good with a frameless style, should this be deemed
desirable.
For KCMs we have .desktop files in <share>/applications but with NoDisplay=true.
We still want an appId of kcm_foo to match to the service in <share>/applications/kcm_foo.desktop.
The current code however explicitly excludes those, so stop doing that.
This also allows to simplify the code from KServiceTypeTrader to KService::serviceByDesktopName
This fixes the LauncherUrl for the autostart KCM from file:kcmshell to applications:kcm_autostart.desktop
m_proxies does not always contain all players, and a player is added to
m_proxies only when it has a valid proxyPid. But the container is
ensured to be added to one of m_playing, m_paused and m_stopped.
So we need to ensure m_playing, m_paused and m_stopped are all empty
before emitting `playerListEmptied()`.
BUG: 447169
FIXED-IN: 5.24
when we disconnect all real outputs, we only have a single fake QScreen in this case consider corona to not have screens and remove all desktops and panels. makes easier for a coherent reconstruction when real screens get back and won't save in screen mapping the :0.0 connector name
Pass remainingTime property explicitly instead of looking up the
top-most item via implicit scoping / context. It doesn't work well
especially in ListView delegates. Besides, there already was such
property in the PopupDialog, although it was unused until now.
Amends 7d0f1a014c, this time for real
ScrollView+ListView duo gained a small padding between its delegates and
a scrollbar, but only when the scrollbar is visible. It solves the
problem of content 'sticking' to the scrollbar, and keeps right side
aligned when there is no scroll.
It also behaves as intended under RTL layout mirroring, out of the box.
No visually observable changes, again. But it replaces most of the
anchors tweaking with a simple QtQuick.Layout interface.
You might've noticed how
topMargin: PlasmaCore.Units.gridUnit
got replaced with a different-looking
Layout.topMargin: PlasmaCore.Units.smallSpacing * 2
but that's all according to the plan, since this ScrollView is now
inside a ColumnLayout which has its own spacing that adds up.
Also, settingsColumn id is removed because it became unused.
Would you ever polish something before dividing it by zero?
Well, at least this is somehow justifiable. Anchors were too horrible to
deal with, even for a rewriting. Now they are all in one place, sorted
out, and no more manual width setting.
Replaces Math.round(PlasmaCore.Units.gridUnit / 2) with smallSpacing * 2
for better performance. This is not equal to largeSpacing, which is
deprecated for this very same reason anyway.
This change may result in slightly more dense layout on your system,
because the wrong formula was used before.
- This patch enables LookNFeel KCM to load and
unload latte layouts on demand when a looknfeel package
is applied from the user. Designers can include
in their package a `layouts/looknfeel.layout.latte` textfile
if they want a specific layout from Latte. In such case
Latte is also enabling its autostart.
- In case the looknfeel package does not contain
the previous mentioned latte layout file then we
can safely assume that the user does not want Latte
at all and in such case Latte quits and is removed
from autostart.
- In order to apply or not the latte layout the user must
have chosen to update the desktop layout from the relevant
ui checkbox.
- This patch to work needs at least `Latte Dock >= 0.10.5`
- If the Latte requirement is not met then the user
will not observe any changes.
It looks like commit 8b297dbbb0 (spotted by Albert Astals Cid), broke
this, the KAboutData object used KFI_NAME (which is "kfontinst"), which made
KxmlGui pick kfontviewpart.rc from ${KDE_INSTALL_KXMLGUI5DIR}/kfontinst.
Change the location to ${KDE_INSTALL_KXMLGUI5DIR}/kfontview, which is where
kfontviewui.rc is installed already.
Apparently, `plasmoid` context property can turn into /dev/null before
its action does. Fixes the following error:
plasmoids/org.kde.plasma.battery/contents/ui/main.qml:166:
TypeError: Cannot read property 'configuration' of null
We define it as an array, however we had split it with a semicolon as a separator in KService.
With this change we can correctly read it as a QJsonArray
Fixes the following error:
plasmoids/org.kde.plasma.battery/contents/ui/PowerProfileItem.qml:137:
TypeError: Cannot read property 'label' of undefined
Profile data was moved to the root component where it makes most sense.
Other chunks of code were aggregated into read-only properties nearby.
It greatly simplified the rest of code in the file.
Took a while to figure out actual structure of the data that comes from
plasma data engine, so now it's somehow documented for future reference.
Moved aforementioned component's source code directly to the only place
of its instantiation left.
Boolean property `inListView` which was responsible exclusively for the
font size selection, got totally abolished and replaced with font
bindings themselves.
Other boolean properties of the grid were marked as `readonly` which
they should've been from the beginning; and {Left,Right}Labels' binding
to them had to be qualified with property access by id, which --
again -- was just an oversight, and worked only because it was a
top-level(even though an 'inline') component.
Renamed GridLayout's `id` to simply "details" for better readability.
It remained always hidden ever since
df2469e7d2, and there were no plans to
revive it anyway. I did some cleanup and layout refactoring before
dropping it though, just in case, so this removed code pretty much
worked and looked good.
It was necessary to drop the `required` qualifier from inListView
property due to a bug in Qt/QML compiler which somehow considers
`required` properties of inline components for named roles resolution,
but only when they are also directly instantiated somewhere in the file
as opposed to deferred instantiation via `Loader::sourceComponent`.
ToolTipArea::active is now bound to just false, which was the case ever
since df2469e7d2. It's going to be removed
completely soon.
The code is not consistent on how do we access properties (role names)
of rows/models of Plasma Data Engine's Data Source. This is obviously
due to the fact that some properties (role names) contain literal
spaces, and thus -- as explained in previous commit -- are currently
inexpressible in terms of QML properties.
However, even at the cost of inconsistency, `battery.State` reads better
than `battery["State"]`; while `battery["Is Power Supply"]` reads the
way it is, just because there's literally no other way around it.
(Actually, we could create a ECMAScript class, and deserialize data
source's row into sanely named fields. But that's a good proposal for
another patch.)