There was already some kind of detection and adjustment if there is not enough
space for the popup available. Do some more work by placing the popup according
to its PopupPlacement enum. Do this also if the popup breaks the top or left
boundary of the screen.
Also fixes some minor problems:
* TopPosedRightAlignedPopup was the same as RightPosedTopAlignedPopup, but in
the first case the menu should be on top of parentItem
* LeftPosedTopAlignedPopup was above parentItem and not left of it
* Small documentation error
Reviewers: #plasma, hein
Subscribers: plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D4867
Summary:
make sure the framedata creation/destruction is
completely in updateFrameData, makes easier to track
and possible to use the repaintsblocked logic.
now only one framedata instance should be created at startup.
CCBUG:376754
Test Plan:
* autotests pass, plasma runs ok, crash on 376754 not reproducible anymore
* possible to have a plasmashell session start without the creation of a single svg renderer (startups after the first when the cache is generated)
* on qml profiler, framesvgitem creation is ~12 msecs the first one created, ~2-300 musecs the subsequent ones, seems to be a bit better than before the whole refactor started
* tried against the latest patches that remove the binding loops, still correct rendering and no binding loop
* tried with both empty and existing cache in place
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #frameworks, #plasma
Differential Revision: https://phabricator.kde.org/D4707
This hints the actual size of the handle, excluding any padding and shadows
and allows for the handle to touch the outermost border of the rail underneath.
Differential Revision: https://phabricator.kde.org/D4762
Summary:
if a framesvgitem has an array as prefix, like
FrameSvg {
prefix: ["toolbutton-hover", "hover"]
}
it will use the first available prefix, so on themes that
have toolbutton-hover, that one will be used, old themes will
continue to use "hover" as prefix
Test Plan:
tested the calendar with breeze theme has breeze-widget style
toolbuttons, with olt themes as air, the old behavior is still
there, switching on the fly works
Reviewers: davidedmundson, #plasma
Subscribers: davidedmundson, broulik, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4827
It can and does happen that in case of two clocks, one with seconds and one without, the one without gets 1s behind. That's because the alignment is not corrected when the difference is 1s, however in case of the clock this 1s is cruicial.
REVIEW: 123300
Summary:
Otherwise if anyone used setAction it would be missing a very important
connect.
Test Plan: Compiled
Reviewers: #plasma
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4758
Summary:
Unlike the visible property, the opacity does not inherit parent values
and refers to the relative opacity of that item.
The current style code is checking that an item we can't control
externally has an opacity > 0, this doesn't really acheive anything.
This was a breakage from when we ported *to* QtQuickControls 1.
Test Plan:
I was running a plasmoid I had written years ago (my RSS tutorial)
and had abnormally high CPU usage in an animation that I didn't have then.
Code was:
BusyIndicator {
opacity: 0
running: true
}
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4729
Summary:
d8a1a9eb08 introduces an unintended code
change, resizeFrame() updates the margins and in turns calls
repaintNeeded. This isn't needed and is a binding loop if we ever have a
frameSVGItem whose size depends on it's own margins.
resizeFrame is different from setEnabledBorders / setElementPrefix /
theme changes because even though we need to create a new FrameData we
know any hints and margins won't change. FrameSvgItem::updateSizes
doesn't depend on the size in any way, so always gives the same result
as before. We still, however, need to call updateSizes to populate our
FrameData structure even if the results will be the same as the previous
FrameData.
This patch that introduces a flag to updateFrameData to determine if we
should emit that size hints may have changed or not.
Test Plan:
GDB showed where the loop was.
Read the old code, and looked for differences
Ran plasmashell, checked I had no binding loop, frames including button
which have
composeOverBorder which need the new FrameData all rendered correctly.
Reviewers: #plasma, #frameworks, mart
Subscribers: mart, broulik, plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4713
Summary:
add an optional menu parameter to processMimeData to mnually pass
an existing qmenu. folderview can use that to pass its own
filecopyjob drop qmenu to be populated with extra entries
Test Plan:
dropping a file on folderview will show a menu with
entries from both.
works both with folderview and desktop containments
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4576
Change-Id: Iae911d4e692f2e591358959758ca6ddd131379c0
Also clean them up a bit and drop the "smooth" dance as it doesn't make a difference with QtQuick 2.
Differential Revision: https://phabricator.kde.org/D4572
since the vertical size hints of the button depend from the
labe size hints, it cannot have Layout.fillHeight as it
breaks its Layout.*Height and implicitHeight
use a vertical anchor instead as buttons always have a single line
reviewed-by:d_ed
ScrollArea has a property for en/disabling the frame provided by its style.
Until now the property wasn't evaluated, which besides making it impossible
to deactivate the frame leads to visual artifacts (observed in Simple Menu:
Flashing frame at the bottom of the page list).
In order to not change the current implementations we additionally set the
value in ScrollArea to true.
Reviewed By: mart
Subscribers: broulik, hein, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4473
Summary:
give frameSvg the concept of repaintBlocked(), that enables and
disables the regeneration of the frame data when a property is set.
the use case is when often, a lot of properties are set one after
the other (such as prefix, enabled borders, size)
collapse the formely similar, but a bit different logic of frame
regeneration is a single function for better maintanability.
QML FrameSvgItem sets repaintblocked when it starts and releases it just on oncomponentCompleted
Test Plan:
plasmashell still starts, autotests still work, all frames are rendered correctly
the destruction of old frames is cutted by 50%. in the qml profiler
the creation time of a framesvgitem slightly improved, on this machine from around 26 msecs to around 21, can still be improved, but at least the code is a bit simpler
Reviewers: #plasma
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4414
This fixes the label not being vertically centered if the button is smaller than its implicit height.
This can happen with the global menu applet in a narrow panel.
BUG: 375911
Differential Revision: https://phabricator.kde.org/D4436
Summary:
Otherwise toBool doesn't work.
I didn't see it called anywhere as property("NoDisplay") == "true", so it
shouldn't be a problem like similar cases before
Test Plan: See upcoming patches
Reviewers: #plasma, #frameworks, davidedmundson, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4396
Instead use iterators. Could be changed to using keyBegin or something like that potentially.
The destructor is called 400 times on plasmashell startup for me.
Before: 250,000ns
After: 110,000ns
Differential Revision: https://phabricator.kde.org/D4350
Avoids creating a temporary list for no reason.
Also use value() which is always const compared to operator[]
Differential Revision: https://phabricator.kde.org/D4348
Summary:
Icon's are generally small, they may as well go in the existing shared
texture atlas, save some memory and it means more items can be batched
whilst rendering.
The textures used during animation are unchanged for now as it also
requires changing FadingNode's shader.
Test Plan:
Ran plasma.
We use atlas's in frame/SVGItem already so it should be fine.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4342
This allows to limit the maximum width of a menu. It can be useful for instance
in task manager where long file names for recent documents will result in gigantic menus.
The property has a RESET method (which is called if you assign "undefined") which will
set it back to QWIDGETSIZE_MAX to remove the size restriction.
Differential Revision: https://phabricator.kde.org/D4257
Summary:
I just realized there was a weird workaround in plasma-nm where it gets
checked so it's shown.
Properly use the declarative API instead of listening to a ton of signals.
Test Plan: Tested with plasma-nm and org.kde.plasma.notifications plasmoids
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4214
the layout engine has a bug
https://bugreports.qt.io/browse/QTBUG-58307
that if some items have an odd height, some an even height,
the smallest items are resized by half pixel to try to
really center it, breaking rendering
BUG:375318
Reviewed-by:David Edmundson
Summary:
Means long main texts don't get truncated. One of the main uses
for tooltips is to show full text for things that are truncated
in the usual UI, so this is a bad default.
BUG:375141
Reviewers: #plasma, mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4189
Summary:
unfortunately hiddenvisibility is the "biggest" status
that makes computing the proper status tricky.
if an applet in the containment is hidden, we must not mark as
hidden the whole containment, because it's as if hidden was
(as it should be) the smallest in the enum
BUG:372062
Test Plan: touchpad plasmoid no longer hides the systray
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4174
Using KPlugin allows for the plugin metadata to be localized. Contains
also fallback code to be able to load the pre-KPlugin plugins so that
the plugins are not broken until next Plasma/KDE Applications release.
Differential Revision: https://phabricator.kde.org/D3811
Summary:
Though we can make the property constant, some applications still use the
signal (for example FolderView.qml) to know that one of the icons has
changed sizes and do some processing.
Whilst it would be possible to fix folderview, we should avoid public
API changes.
Reviewers: #plasma, #frameworks
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4092
QML sizes can be fractional. In case we're asked to load a 31.5 px pixmap it would truncate
it to 31 and then round down to 22 causing a blurry result. Instead, round the size.
Differential Revision: https://phabricator.kde.org/D4040
There's no point in going on.
I already fixed that in Applet a while ago but forgot that in Dialog and ConfigView.
Differential Revision: https://phabricator.kde.org/D4017
To use isMobile one need to import the QtQuickControls as well in
addition to QtQuickControls.Private
This fixes the warning flood at runtime
CCMAIL: faure@kde.org
I think p-f 5.30.0 tars need to be re-done with this.
I think it's wrong to set the flags for *every* event() but at least avoid the
string comparison Qt does internally in QX11Info::isPlatformX11()
Also, removes the need for an ifdef.
Differential Revision: https://phabricator.kde.org/D4019
The old code was connecting the KIconLoader signal to implicitWidth/HeightChanged
but never actually set a new implicit size.
Also, while at it use "setImplicitSize" - it's also marked internal but public
like setSize and uses qreal instead of QSizeF.
Differential Revision: https://phabricator.kde.org/D4011
It's not the property that changes (we don't assign a new QQmlPropertyMap) but
the properties within and it's already smart enough to signal this.
Differential Revision: https://phabricator.kde.org/D4013
Every single (Frame)SvgItem would creates its own Units instance which in turn would
create a property map for icon sizes and lots of other stuff. Avoid this.
CHANGELOG: There is now a global "Units" instance reducing memory consumption and creation time of SVG items
Differential Revision: https://phabricator.kde.org/D4012
Summary:
replace the last remaining place in pluginloader
where a string list was read as a normal string
Change-Id: I66e7f563745466e31cfb23492fdb081806b1e406
Test Plan:
related to D3902
dropping of files on containment still works
Reviewers: broulik, #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D3936
there is a single difference between command line
parameters of plasmapkg2 and kpackagetool5: plasmapkg2
had some hardcoded names like "theme", "plasmoid" etc.
kpackagetool5 requires the servicetype name to be
passed instead. in order to stay compatible convert
those parameter with the proper servicetype name.
it's parsing parameters by hand in order to just
pass anything else without further parsing
BUG:374463
REVIEW:129753
Change-Id: I6adece9b3dd351331d747505c455e0f79cd0ecf7
They are supposed to be lists. This fixes dropping folders on desktops to create a FolderView.
Dropping trash:/ also offers to create a trash applet again.
BUG: 374418
Differential Revision: https://phabricator.kde.org/D3902
This makes it consistent with the Breeze widget style.
The other themes (Air and Oxygen) didn't even have a scroll bar background.
Differential Revision: https://phabricator.kde.org/D3828
--the dialogs shown from dock type windows when
the dock uses masking are placed far from the
the element that triggered them. This patch
fixes this bug and provide also an auto test.
They're supposed to do the same, completely different codebases. Also some
things had to be ported.
I'd recommend everything to be ported to use kpackagetool (knsrc files!)
but still it's better to at least make sure we stick to one set of features.
REVIEW: 129704
Summary:
As Plasma::Package is deprecated API using Plasma::Package should also
be deprecated.
Reviewers: #plasma, #frameworks
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3812
Summary:
Appmenu quite neatly has a config option for which should be the
preferred representation, which is needed as both things are quite
viable in a panel and can't be done automatically.
AppletQuickItem needs to update which representation to use when this is
set at runtime. We already check on every single geometry change, so
one extra check won't have a huge impact.
Test Plan:
Appmenu changes dynamically
All other applets (both compact and normal) still seem fine
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3794
Summary: Ref T4947
Test Plan: works on desktop at least, haven't tested on phone yet
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Maniphest Tasks: T4947
Differential Revision: https://phabricator.kde.org/D3789
if a panel doesn't ahve applets, it can't have a "currently
loading" as the status of its applets.
this fixes panels sometimes not showing up when reconnecting screens
CCBUG:373836
Summary:
The fallback for toolTipMainText is showing the applet title.
When the applet title changes, it may result in a change of
toolTipMainText.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3760
This introduces a new lineedit_reveal_password restriction (similar to lineedit_text_completion)
that disables the reveal password button on Plasma text fields, like the lock screen and WiFi password inputs.
Differential Revision: https://phabricator.kde.org/D3654
Now that we can have C++ applet we can make use of setLaunchErrorMessage
to communicate a fatal error in the applet initialization.
Differential Revision: https://phabricator.kde.org/D3725
Test Plan: less warnings when compiling plasma-workspace
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3679
settingsFileChanged is called if the plugin metadata file changes, and
reloads the theme if the version changes.
However, if the metadata file now doesn't exist we need to check before
calling .version() otherwise it will assert.
If it doesn't exist, we want to reload the theme so that it will load
the correct thing.
BUG: 372651
REVIEW: 129436
when the tabbar is vertical, on rtl layout the tabs order should
stay as is, as is rtl, not bottom-to-top
Change-Id: Ia5f1722d5e327207cf584a997dc8073c595c905b
REVIEW:129521
When closing the launcher using Meta key, it pulls focus away and when
clicking the button to expand the applet, it won't get focus again.
BUG: 372476
REVIEW: 129404
Summary: Depends on D3299.
Test Plan: plasma still starts with all plasmoids
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D3311
As https://bugs.kde.org/show_bug.cgi?id=369622#c5 mentioned,
if icon has both 22px and 32px sizes, the 22px one should
have prefix of 22-22- in object ID while the 32px one shouldn't.
Checked all existing icons and to correct wrong IDs.
patch by Yunhe Guo <guoyunhebrave@gmail.com>
CCMAIL:guoyunhebrave@gmail.com
BUG:369622
Change-Id: I9d8728cfa9ce47aaaaa3b0e5042ed616f142c19a
REVIEW:129329
an OSD can't be a Dialog, as qt xcb would attempt to set a
transient parent for it, same as panels, which in turn will
make for invisible osd on autohide panels
Change-Id: I5afea6d4bfa0bfee8b3453e78a1c214a3a0894ec
reviewed-by: Martin Graesslin <mgraesslin@kde.org>
CCMAIL:distributions@kde.org
BUG:370433
doing setSource then immediately after rootContext()->setContextProperty
makes the property binding evaluated right at startup to be broken,
also fail any access to said contextproperty until the point of
Conponent.onCompleted
BUG:371763
Change-Id: Ie10afcf3c5b1693db49b5c240c9d2a4f3c47db21
And only enable it in the contextMenuAboutToShow connection.
We currently enable/disable the menu in this slot, but we default to it
on. This meant other users of actions() that can't correctly emit
contextMenuAboutToShow gain an extra entry which might not be relevant.
REVIEW: 129263
The launcher applets couldn't be closed with Meta alone and on Wayland
in general by any global shortcut, since we used for that the focusOutEvent
triggered only on X and only on global shortcuts (on default Alt+F1).
This patch introduces the new bool activationTogglesExpanded, which allowes
QML applets to decide if they wish to use the activated signal also to end
their expanded state.
The default value is false, in order to not break any legacy applets.
REVIEW: 129204
BUG: 367685
This reverts commit acd7ab7815.
This broke the build for me and on CI:
/home/jenkins/sources/plasma-framework/kf5-qt5/src/declarativeimports/core/datamodel.cpp:214:9:
error: 'LOG_PLASMACORE' was not declared in this scope
CCMAIL:notmart@gmail.com
port every terminal output to appropriate QCdebug/QCwarning,
each different binary has its own logging category now, so
it's possible to enable/disable them selectively.
this should also make plasmashell a bit more quiet on
terminal by default
Change-Id: Ic0b26364f988935e990c6988f8f9375b7c9bf838
REVIEW:129210
When appending a list to an existing list using append or operator<< each item in the list
is added individually whereas with initializer list it just adds the entire list as one entry.
This caused the applet args to never be empty usually and resulted in externalData being
emitted in init() with a QVariantList as argument.
While this didn't do much for most applets it did break FolderView (and potentially others)
which updates its URL in response to this signal and stored the "data" it got in
plasmoid.configuration.url. FolderView's model did not accept this broken data [1] so the
folder would still work initially. On next startup, however, it loaded said value from
config and just went blank.
[1] "file:///usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/FolderViewLayer.qml:202:14: Unable to assign QJSValue to QString"
REVIEW: 129158
use plasmashell interface for moving the dialog,
use kwayland as well for shadows.
this is supposed to replace the waylanddialogfilter
hack in plasmashell.
REVIEW:129148
This reverts commit 2ed819f37d.
panel loading was completely broken, the patch idea was fine,
but has to be redone and tested better.
CCMAIL:aleixpol@kde.org
We were not looking into the plugin directory when figuring out the applet
path when it's load from an absolute path.
Fixes configmodeltest
REVIEW: 129101
Makes it possible to use plugins that offer a metadata.json file.
Define the service type when falling back to the desktop file parser, so
the type system is proper.
Don't destroy a KPluginMetadata tuple to instanciate it right away.
REVIEW: 129102
Commit 752626ad55 left a code path through
the switch statement where defaultActionsCfg would be an invalid group.
This is semantically correct as there is no relevant actions config for
this type of containment, however we then call methods on it which leads
to an assert in kconfig - and a failing unit test.
REVIEW: 129096
It's reasnoble to expect people to download an applet just before trying
to change an existing applet using the alternatives system.
Therefore doing the check at applet initialisation time is semantically
wrong. Especially as it doesn't just disable the action but also skips
creating it.
Finally this gives a startup performance boost; loading all the applets
metadata takes a small amount of time (~20 milliseconds) not really
noticable when you're doing it once, but it adds up if you're doing it
over multiple applets sequentially.
Show times where 0 is the beginning of the process
Use QDebug to get QVariant's values
Delay constructor print so that we know which class is being constructed
Use QJsonObject instead of going back and forth with QVariantMap
Reviewed by David Edmundson