Allow the Panel to get active keyboard focus via a kwyboard shortcut which will cycle between all panels.
When a panel has focus, the active focus can be navigated around either with tab/backtab or arrow keys.
Simple popup applets which only display an icon will work automatically,
Complex applets like the System tray or the taskbar will have focus that can navigate on all their sub-elements, to activate a particular systray applet or activate a particular window
Co-authored with Benjamin Port<benjamin.port@enioka.com>
CCBUG: 352476
Applets in PlasmoidItem were blocking events from reaching the
ToolTipArea, so I moved the on hover logic to the AbstractItem's
MouseArea and put the MouseArea over the iconContainer. The
iconContainer is the parent of applets. Presses tend to hit the center,
which is where the applet is, preventing ToolTipArea::containsMouse from
being true and preventing the highlight from moving to the pressed item.
Hopefully this doesn't cause duplicate actions when events reach the
applet. I tested the patch on the nightcolor applet and all the other
default applets and didn't see anything wrong. I think this may be
because the signals are sending QML MouseEvents to the applets, causing
them to be accepted if the applet can accept them. Then when the signal
handlers are done, since the events are already accepted, they should
not move beyond the MouseArea and cause another round of event handling.
This empty mousearea serves for the sole purpose of refusing touch events
which otherwise are eaten by Control stealing the event from any of its parents
this fixes applet dragging in editmode for all systemmonitor plasmoids
Over the years we've changed icon spacing many times. And every time we
do, we get bug reports about it from people who were happier with the
previous value. Typically we close these bug reports as RESOLVED
INTENTIONAL, but it always leaves a sour taste in the mouth. People's
preferences for spacings and paddings are legitimate.
In addition, a larger spacing can be quite useful in Tablet Mode, to
increase the size of the touch targets to be closer to the size of the
user's finger.
This commit adds a simple UI to switch the spacings of the visible items
between three values, with the middle one that matches the current
spacing being the default. While Tablet Mode is activated, the spacing is
automatically set to its highest value and made non-user-adjustable,
just like we already do this for the icon size setting.
Applets were apparently blindly converted to use JSON metadata without
checking the usage. At least KPackage now has a direct getter for the
package metadata, so use that to get the plugin ID instead of manually
loading the package metadata.
BUG: 448529
This was removed in 88e9433e19 but probaly
should not have been, as doing so causes a binring loop on the width
property, even though there is no visual effect from the change.
An input type agnostic way to activate systray items was needed. This
signal will be used for keyboard, mouse and touch navigation.
There was an activated() function that just started an animation which
has been renamed to startActivatedAnimation().
This makes it not be too wide due to the contentItem's margins, which
was an issue that went unnoticed because it was masked by always
disabling the horizontal scrollbar. Should we ever remove that override,
there won't be any regressions now.
For these delegates, the width is computed automatically and correctly
from the parent ListView's width, taking into accounts margins and
scrollbar visibility.
The original condition will turn the text in the search field into an
unknown character. Move the logic to switch-case to fix the condition.
BUG: 448819
ListView will absorb the key events, so `Keys.onPressed` in
ClipboardPage will not receive the event. Instead we should connect
those key events to `arrowKeyPressed()`.
BUG: 448811
The behavior may cause unexpected results when the user spam press Del
in order to delete all characters in the search field, and find that
all items in the list are deleted.
It also causes pressing Del in the search field not deleting the fully
selected text.
BUG: 448738
BUG: 448739
PlasmoidPopupsContainer.qml has special code to handle merging headers
from applets if those applets use a PlasmaComponents3.Page instance as
their FullRepresentation. However this breaks for any applets that use
PlasmaExtras.Representation, which is a subclass of it that we have been
porting applets to over time, because it offers more features in a
single location. This caused the detection to break, so such applets
woudl have their headers improperly merged.
Explicitly detecting the use of PlasmaExtras.Representation as well
fixes it.
BUG: 438178
FIXED-IN: 5.24
No more one/many hints discrimination. They can all live happy together,
under single Repeater, using model directly. When the model will
migrate to a real Qt AbstractModel subclass (e.g. QML ListModel),
delegate's properties code will need to be adjusted again though.
Pass down laptop's lid action inhibition all the way from the top-level
file to reduce dependency on sketchy context properties and make
components more self-contained.
"Fix" as in "repair and make it right". This commit actually makes
header dynamic as it was always supposed to be. Wrongly fixed height
with dummy empty padding at the bottom was the result of incorrectly
applied anchors within Container[1]'s contentChildren.
[1]: PlasmoidHeading is a TabBar which inherits from Container and Control.
Technically it doesn't matter, since they are mutually exclusive anyway.
But for the upcoming refactoring it will be a bit easier to see what's
going on if they'll be close to each other.
Typically we have properties on top, then functions, then signal
handlers, then child items, then the onCompleted: block. The Battery
Monitor didn't conform to that, so this commit makes it do so. There are
no actual code changes; stuff is simply moved around for greater clarity
and style standardization.
f9e39815d ("applets/batterymonitor: Improve for desktop systems") changed the
plasmoid to use a plain icon instead of the CompactRepresentation if there are
no batteries.
While 471cc3745 ("applets/batterymonitor: fix CompactRepresentation") brought
the use of the CompactRepresentation back, the plain icon is still used.
For the case that there are no batteries and brightness controls available,
it fell back to "battery", which has no symbolic variant. Change that to use
the symbolic "video-display-brightness" as well.
BUG: 448520
When you unmount a device using the UI, the device shows a message
saying, "Removing..." This message remains visible as long as the device
is still processing file move or copy operations due to the use of async
file IO. The device is not yet safe to unplug as long as the message is
visible, but this is not obvious from the UI. As a result, it is
possible for people to think it's stuck and unplug it anyway, causing
data loss.
This commit attempts to address that by showing a different message when
the unmount takes more than one second, which tells the user what is
actually happening and explicitly asks them not to unplug it yet.
This reverts commit 354f7da871.
Somehow it prevents inhibitions from being visible in the UI. Since the
reason is not yet understood, let's revert for now to prevent releasing
a regression while we investigate.
CCMAIL: me@ratijas.tk
In the process, the onWheel handler is moved up to the main file so that
it gains write access to the screenBrightness property. This is how
other scrollable applets handle the same situation.