Documentation says "Children are stored internally as a linked list, so iterating over the children via the index is suboptimal."
Differential Revision: https://phabricator.kde.org/D8046
Summary:
Software rendering (at time of writing Qt5.10) doesn't seem to like our
tiling/stretching in the 9-tiles.
Also when using QPainter it's arguably faster to create and cache
pixmaps of the whole frame, which is what the slow path of FrameSVGItem
does.
Test Plan: Ran FrameSVG test then plasma shell with scene device set
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D8013
Summary:
IconItem uses a gorgeous shader to fade between two states. This doesn't
work with software rendering.
Given software rendering is a second class citizen, just skip the
animation.
Test Plan:
Hovered over kickoff.
Went from one to the other, without temporarily disappearing
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D8014
We'll eventually delete the Plasma::Svg anyway if we failed to find an appropriate icon.
Just need to make sure we don't use isValid with the old source set but this is only done with
m_usesPlasmaTheme, hence the new check there, also optimizes the non-themed case.
Differential Revision: https://phabricator.kde.org/D7584
On my machine I end up creating 490 margins and 490 fixed margin objects.
After this change I only create 171 margin objects and 20 fixed margin objects.
Differential Revision: https://phabricator.kde.org/D7582
Summary:
By default, Qt is built without accessibility there, which is what
would indirectly include the needed QColor with a "normal" Qt build
here.
Reviewers: #frameworks, broulik
Reviewed By: broulik
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D7117
Summary:
* make sure after a showevent the size is final and the
dialog can be safely repositioned.
* set mainItem visible in :setVisible() so that is executed before showEvent:
resizing windows in their show event is definitely not enough, causes events to arrive to
reset to the old geometry in race with the setgeometry done there, don't know yet
if it's the qpa, qwindow, or the windowmanager
* make synctomaintem and updatelayoutparameters working even if
the dialog is not visible as we need to resize beforehand
* move the plasmasurface window also in the show event as if there was no moveevent
after an hide/show, its position would be resetted to 0,0
Test Plan:
current dialog users behave the same (like pre-D6216 notifications applet), tests still pass
notifications applet reworked to use this works as expected
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: sebas, hein, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6215
Summary:
Don't construct a QUrl for every source strings. Check it's a file url
first (which is the only kind of url we support at the moment)
When extracting the path, use toLocalFile, so it works on platforms where
path!=toLocalPath (e.g. windows)
Don't split a string and get a chunk, but just extract the chunk we need
with section. Reduces allocations that are automatically discarded.
Narrow iconPath scope
Test Plan: Tests still pass, plasmashell still works
Reviewers: #frameworks, #plasma, mart
Reviewed By: #plasma, mart
Subscribers: plasma-devel
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D6014
Summary:
take into account size hints also when adjusting with synctomainitemsize
which sometimes has to be executed right before adjusting from the layout
hints, giving one wrong resize
introduce geometryUpdatesBlocked, which stops the dialog
from syncing which is useful when both visual parent and item
contents gets updated in one go (the tooltip) it is not
yet exported to qml and it shouldn't as is dangerous, but
kicker may make use of it between changing the submenu model and
the visualparent
alternative implementations may be:
* a method that takes both main item and visual parent
* delaying with a timer setGeometry (ouch)
this part can also be left behind for now and see if the rest is good enough
Test Plan:
no visual glitches visible anymore in wayland when moving the tooltip
in the taskbar, x11 ok too
Reviewers: #plasma, hein, davidedmundson
Reviewed By: #plasma, hein, davidedmundson
Subscribers: broulik, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5912
Summary:
every time the window gets shown the wayland surfaces
get created, when hidden, they get destroyed
showevent is too early for it as they aren't there yet,
use :Exposed instead, but only the first time when the surface
isn't there yet
Test Plan:
popup applets always have correct blur in a wayland
session
Reviewers: #plasma, #plasma_on_wayland, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, plasma-devel, #frameworks
Tags: #frameworks, #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5745
Summary:
when usesPlasmaTheme gets changed, make sure to
invalidate the svg icon if there, to reload the
icon from the proper source, being either from
the plasma theme or the system icon theme.
Test Plan:
cuttlefish now reloads dynamically the proper icons
when the monochrome checkbox is ticked
Reviewers: #plasma, sebas
Reviewed By: #plasma, sebas
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5721
Summary:
In effect this is meant to resurrect the "Panel" icon size setting from
the Icons -> Advanced KCM in System Settings, for use as a ceiling on
panel icons to avoid them taking up too much space, especially in wide
vertical panels.
Previously, the actually-unused "Desktop" size hint was added to the
iconSizes map. I believe this was in error, as the size hints are
semantically different from the size classes. This patch marks the
"desktop" iconSizes map entry as deprecated and makes it available
under iconSizeHints instead.
The soon-to-be-updated D5592 will demonstrate this API in use.
CCBUG:378443
Reviewers: #plasma, mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5593
now with fallback is common to have prefixes that are not present and fail.
this generates a lot of debug that is not really useful, as is an OK
thing.
Summary:
if the user code did something like
IconItem {
implicitWidth: 32
implicitHeight: 32
}
then never automatically update implicitWidth or height.
this favors compatibility and fixes the desktop
toolbox appearance
Test Plan:
textbox works, other icon items in plasmashell seems properly sized.
applet alternatives fix is still needed
Reviewers: #plasma, hein
Reviewed By: #plasma, hein
Subscribers: hein, davidedmundson, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5243
We had m_smooth but never actually used it in the texture node.
With Plasma SVG icons this shouldn't be used but when passing custom pixmaps
or raster graphics (e.g. custom icon in Kicker, thumbnails in Folder View)
Differential Revision: https://phabricator.kde.org/D5214
We overwrite implicit size based on the icon loaded nowadays which breaks this.
Also, while at it, added an explicit "valid" check for the icon.
Differential Revision: https://phabricator.kde.org/D5202
Summary:
This allows users of IconItem to know the aspect ratio of the
source document, which can be used to size the item or set
applet size hints to accomodate non-square images better.
This will be used in a patch to Kicker/Dashboard that ports
a use of Image in its CompactRepresentation to IconItem to
get the hover highlight effect even for a custom button image.
Reviewers: #plasma, mart, davidedmundson
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5160
Summary:
When setting an empty QStringList as prefix, it can lead to unexpected results, such as the prefix not changing.
BUG: 377441
Reviewers: #plasma
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D5000
Test Plan: Ran
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4857
Summary:
Like all the inbuilt shaders this now has a separate GLS source file which
works with a newer version without requiring compatibility.
Was https://git.reviewboard.kde.org/r/128426/
Test Plan:
Ran plasmashell with ForceGlCoreProfile set in the config
Hovered an icon in the task manager and it animated to the correct one
correctly.
Ran glslangValidator on both files. No warnings.
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4851
Summary:
This matches what Qt does internally, it's easier to read and gives us
syntax highlighting on the shader files, but more importantly in future
we will get Qt's automatic loading of core profile shaders.
Test Plan:
Opened QML with IconItem, made the icon switch.
Still looks the same
Reviewers: #plasma, mart
Reviewed By: mart
Subscribers: mart, broulik, plasma-devel, #frameworks
Tags: #plasma, #frameworks
Differential Revision: https://phabricator.kde.org/D4848
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
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
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
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:
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
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