rectSaveTimer is used to event compress the save and sync of the
configuration file that is used as a cache of the rectangles of
svg items (in order to avoid svg renderers creation when possible)
there is exactly one situation where it seems to not work: during
creation of svgitems/framesvgitems, insertintorectcache ends up
being called by another thread than the Theme's qobject thread,
and that is not allowed.
with invokeMethod the timer will be started by the correct thread
REVIEW:122915
Change-Id: I3ff4a4ebd1dfdba4b9b830fe6c08feece19b903e
when QT_DEVICE_PIXELRATIO is something different from 1,
the pixmaps generated by Svg will be scaled up to give a proper texture.
This is complementary but not replacing our current approach:
the pixelratio that can be accessed by units is now in relation to the qt pixel ratio,
spacings are also adjusted accordingly (therefore, spaces and sizes won't
need an integer value like pixelratio)
svg introduces also a scaleFactor property (that is pretty much like its old pixelRatio)
basically, scalefactor, will scale both the textures and all the reported sizes,
(old method) pixelratio just scales textures without altering measures
(like qt pixelratio likes)
Change-Id: I304aa0d80abf76abafac239be185dd3b2ab741b7
REVIEW:122673
The active property is usualy set in response to a hover event.
Loading the new pixmap right away, starting the fade animation immediately, provides
a more responsive user experience.
REVIEW: 122857
Currently units is based on font metrics except icon size and some SVG
parts which use DPI directly.
Instead of taking the physical DPI we take the logical DPI which is used
for working out font point -> pixel sizes.
We can rely on this being correct as otherwise every other app would
appear broken.
REVIEW: 122799
BUG: 338308
Change-Id: I22f668ccea7d6d15ff475e1368c82964bdde1e60
This patch ports the default tooltip away from custom spacing,
positioning and Row/Column to QtQuick.Layouts. It makes the sizing more
predictable, and the code more modern and readable. Tooltips feel to
behave a bit smoother with this patch.
In the process, this...
- fixes spacing when no icon or image is set
- limits the maximum height of the subtext to 8 lines (this prevents the
klipper tooltip for example from growing super-high)
- Makes the icon on the LHS proportional to the text
- Limits the width a bit more to prevent super-wide tooltips
- makes it use units.gridUnit throughout
Changelog: Improve tooltip layout
REVIEW:122717
Adds a X-Plasma-Requires property for the plasmoid metadata files that will
specify the features.
Furthermore, adds a feature called ExternalScripts so that a plasmoid can
request to load files that are outside of the import directories.
REVIEW: 122595
This reverts commit fa2109ccb6.
Turns out the plan to raise the version with every framework
release is not as simple as raising the version numbers as
this breaks pretty much everything.
It might not have caught up yet when we decide to nuke the cache, resulting in
the translucent graphics staying when disabling blur or switching to XRender.
Changelog: Fix Plasma popups being hard to read tue to translucent background
REVIEW: 122676
BUG: 344179
Filtering only by regexps is not enough because as soon as filtering by
special characters is needed, they can get interpreted as regexp special
characters and stuff will break.
Change-Id: Ic5cd0309e1e77d790faeecedbe87fdaaeceffc33
REVIEW: 122695
This patch cuts down animation time quite considerably. We've discussed
this during the sprint. The default long animation is now 120ms instead
of 250. We have played around with different values, and this seemed to
hit sweet spot between the interface feeling really snappy, but the
animations still visible, so no sudden transitions in the UI.
We should consider doing something similar for kwin animations.
Reviewed-by: Kai Uwe & Marco
CCMAIL:plasma-devel@kde.org
CCMAIL:kwin@kde.org
fallback to empty Applet/containment if an inexisting library
was specified in the metadata file.
this fixes old applets with incorrect metadata
BUG:344281
Change-Id: I0efc9dc32dee0e6fe4f3757065004a19f6e01844
We're comparing all package type arguments against translated and
untranslated strings. For the simple "package" type packages, this was
actually forgotten, so the english version would not work on non-English
systems.
CHANGELOG:Fix plasmapkg2 for translated systems
Reviewed-by: notmart
forcing the current item to ungrab the mouse before showinf a modal
menu ensures the scene mouse state will be coherent and an even won't
be lost
Change-Id: Icc0a89c437184ea0b87348358827f898ad342f72
This makes them significantly less annoying by having them close more reliably when
leaving the ToolTipArea and more importantly fixes the tooltip interrupting the
applet resize operation.
REVIEW: 122624
It causes binding loops causing all sorts of weird behavior, like the buttons
in Klipper not always having a background.
Changelog: Fix rendering glitches with ToolButtons that don't have a label
REVIEW: 122609
BUG: 339303
BUG: 340588
make possible for an applet to be implemented in c++ but still
have the qml package with the usual api, this was supposed to
be supported from the beginning.
if a c++ applet has been loaded, make available the property
plasmoid.nativeInterface to the qml part, exposing the subclasses
Applet instance with all eventual extra propertiels/slots.
if no c++ plugin is present, appletInterface will be dummy/not available
this (besides limiting a bit the qml import rabbit procreation)
makes available some things not available to normal private imports:
* access to applet config() to save more complex things compared to what kconfigxt allows
or save/load stuff from the c++ part
* access to containment()/corona(), may be useful for containment implementations
* easier port for old very big applets such as comics/weather
Change-Id: I65117660043de3a60ad58c77b086f686683d4d8c
This allows being able to change just the alignment, which can happen, since
the order of QML bindings being re-evaluated is non-deterministic
REVIEW: 122593
- Use QQmlParserStatus to provide event compression for setupDate() method
- Re-introduce interval alignment
- Cache sources and emit change signal only when it has actually changed
Changelog: DataSource can now align polling to full minutes
REVIEW: 122470
I was getting the m_pixmapIcon cleared some times, instead of the
m_iconPixmap. This made it forget about my image.
m_iconPixmap should be renamed to something else.
Reviewed and done in collaboration with David Edmindson
if X-Plasma-RootPath is set, use that instead of the plugin name as
default translation domain.
if an applet uses the package of another one, of course it has to use its
translation catalog as well
Change-Id: Ia23b261f449a560c3da19bc074e521139ae942c8
reviewed-by:Eike Hein <hein@kde.org>
A new tooltip would only be shown if it had content to show.
However in the old code if the tooltip was already visible we would keep
the tooltip alive and sync with empty contents regardless of whether we
had anything to show.
This seems to clear up the system tray where we have nested tooltip
areas for the tray applet and the icon itself and things would flicker
Change-Id: I7d9ded9edb70672c572e008c8d6f1ffe2d76b773
Changelog: Avoid showing an empty tooltip
Installing the Plasma directory (which contains the CamelCase forwarding
headers) breaks on case-insensitive filesystems (eg: Windows) because it
is that directory also contains the lowercase build-time-only forwarding
headers (they are put in the plasma directory). These then overwrite the
real lowercase headers with ones that forward to the source directory.
However, the first argument to ecm_generate_headers is a variable name
containing exactly the CamelCase headers that should be installed,
avoiding this issue rather neatly.
Reviewed-by: Patrick von Reth
to minimize dialog repositions, try to put it at the proper position before showing.
besides making things a bit snappier,
showing at 0,0 for an instant has some interesting sideeffects:
MouseArea has a rather strange way to manage hoverevents:
at window show, it will check if the item is under the absolute mouse position,
if so, will emit an entered() signal. This causes the Kickoff menu to
automatically select the last tab on first show, because for an instant
(that never gets drawn on the screen) all the tabs will actually be under the mouse cursor
Change-Id: Ie9fc45f2a5076c3f49b42e8a7cee109b04db46b9
The mechanism should have deleted the old key from the config if it was
invalid and then try again in order to get the default. As we were
deleting the wrong key (actually the value of the shell package key),
this was turning into a recursive loop. Deleting the correct key
obviously fixes this.
Thanks Bille for reporting!
Reviewed-by: Marco Martin
BUG:343510
make hint-apply-color-scheme work (kiconeffect based coloring),
and make sure the kcolorschemes are reloaded when app palette changes
and the theme follows system colors
BUG:343389
Change-Id: I0a7a7eb0f89ed0948e618f1d608521f235aa1959
make hint-apply-color-scheme work (kiconeffect based coloring),
and make sure the kcolorschemes are reloaded when app palette changes
and the theme follows system colors
BUG:343389
Change-Id: I0a7a7eb0f89ed0948e618f1d608521f235aa1959
if a tooltip has only text, expecially only title or only subtitle, make
it as small as possible
BUG:343390
Change-Id: I5eff081613c9c64c78b8c5741bac67409a112c98
in some cases richtext in the tooltip is not desired, like
in the case of klipper. export a property to set
the text format
Change-Id: Ib4e8e913e060b868188b4f0b46db2162f33d8bb1
QAction keyboard shortcuts cannot work with QML2 (and probably newver will
since in Qt qtquick and qwidgets cannot depend from each other in any way)
so do a simple keyboard shortcut matching here
BUG:336203
Change-Id: I2d7ada7dfcb0e326e63ce7f1e39573709f6fe560
when an applet or cont is deleted, when invisible has systemimmutable as
its immutability (then restored to mutable if restored)
notify correctly the change
BUG:342704
Change-Id: Iea37fd287d6b120e161f5ac7ad4a17a078fec9bb
when a deleted applet of a deleted panel
gets undeleted, undetele before the panel itself
that's the safest and most "expected" outcome
BUG:343096
Change-Id: Iece7710028052b2118f590377fd39e3c78279b11
make sure the animation is disabled when the tooltip appears
for the first time.
since the correct implicitsizes can be calculated only when the
tooltip window is visible, we need to show the tooltip window
then calculate the final size and position, and last move it
*without animations*
Change-Id: I2d0f653e860104f17a62203565d5002a16d0dfae
reviewed-by: David Edmundson <kde@davidedmundson.co.uk>
BUG:341933
in cases screen resolution is quite low, and font size is enormous, popups
tend to become bigger than the screen
BUG:337041
Change-Id: I840868dbd7db665a3953687977d30dd6c3b4a386
Plasma::Package internally uses KPackage, being a pure wrapper.
old client code and old packagestructures still work using the wrapper.
old workspace code that is not directly using kpackage continues to work correctly
Change-Id: I05f95e8d05e3b67759973c4009e3753c61b1dcce
Otherwise we can have an invisible dialog in which the items think they
are visible.
QtQuick is smart enough to not redraw anything if the window isn't
visible, but a lot of bits of our code check the visibility flag to
enable/disable animations. These animation timers do still trigger when
the window isn't visible which wastes CPU cycles.
We are already meddling with the visibility flag so this shouldn't have
too much impact.
Change-Id: I92b969e60b4fdbe4ff2c70f9cce6e3408482a862
This makes the IconItem load the icon immediately after component creation and not
wait 150ms there for no reason which prevents eg. flickering in the OSD when it shows up.
REVIEW: 121219
Making transition between two different size doesn't make much sense,
since repainting is usually happens at that time and it could take some
time to finish. And the animation need to be stopped if m_animValue is set
manually.
Change-Id: I240c19f46d4d13eb0e54b4e7b3fa3b6c31cfc6d8
REVIEW: 121411
Unit now takes all fonts from the default system font, which we monitor
for with an eventFilter on the application object.
Change-Id: Ib17c01e2811c0c672be18a930d625d84ecd154a4
Given comboboxes use the same background as buttons they should use the
same text colour too.
This prevents a situation in Breeze where a ComboBox could get white
text on a white background when using a colourscope with complementary
colours.
Change-Id: I21502186178a32ce480cd3e838335451bf644c3e
different themes between QtControl themes in applets
and in config dialogs: this allows QtQuickControls
to be freely usable in applets without worrying how they
will integrate
Change-Id: I696bdcbd78eb2e4df708367ac0d70d13c5d6cf12
A single Plasma theme will be represented by one ThemePrivate object,
which is exported in multiple Theme objects.
We want to save the cache when that theme stops being used, not each
time an item stops using the theme.
saveSvgElementsCache calls sync() which involves a lot of parsing and
IO. This makes everything a lot faster at no cost.
Change-Id: Ica6ba0273bc99fb8ad8733a1c90db8f1e87c49ea
KConfig->reparseConfiguration is expensive. It throws away our cached
values.
The Units constructor was calling this every single time. Units is
created a _lot_; once per applet and once per FrameSVGItem.
This meant we were reloading the same config ~100 times on startup for
no reason.
Perf showed this as being ~5% of the total startup time.
- 7.47% 0.00% plasmashell libKF5ConfigCore.so.5.5.0
[.] KConfig::reparseConfiguration()
- KConfig::reparseConfiguration()
+ 66.51% Units::settingsFileChanged(QString const&)
+ 25.95% KConfig::KConfig(QString const&,
QFlags<KConfig::OpenFlag>, QStandardPaths::StandardLocation)
+ 3.93% KDesktopFile::KDesktopFile(QString const&)
+ 3.61% Units::settingsFileChanged(QString const&)
Change-Id: Ia70b7001ba473c8063e6c999b8e4233ea5b206f5
If an invalid icon size is passed to roundToIconSize we should return an
invalid icon size.
This can cause IconItem to load a small pixmap which will never be
shown.
Change-Id: Ia678f2e879b83317e2971069acf8f00d9ce2e052
The module .desktop file has a typo in the X-KDE-DBus-ModuleName which
results in the KCM not being able to see the status of the module.
Plus it renames the .desktop file to not contain the kded_ prefix, now
it matches every other kded .desktop file we ship (and also matches the
library and dbus module names).
Change-Id: I5006672ca041d9820b4388ba4e99b7899f36be18
updateMinimumWidth and updateMaximumWidth wrongly set the updated
value to height instead of width.
Change-Id: Ie24ef194d9bf02e53b92aa6802b0fbded68b896d
* Adapt the existing controls to be generic enough to work on stock QtQuickControls
* Add missing styles needed for the set to be complete (and applications actually work)
The full list of controls styles is now:
ApplicationWindowStyle
BusyIndicatorStyle
ButtonStyle
CalendarStyle
CheckBoxStyle
ComboBoxStyle
MenuBarStyle
MenuStyle
ProgressBarStyle
RadioButtonStyle
ScrollViewStyle
SliderStyle
SpinBoxStyle
StatusBarStyle
SwitchStyle
TabViewStyle
TableViewStyle
TextAreaStyle
TextFieldStyle
ToolBarStyle
ToolButtonStyle
GroupBoxStyle
Change-Id: Ic5d33bc20c7456d1478c07aca33bda63378d5c05
some of the behavior of the theme has changed.
this makes some of the old themes to not work correctly
(like black text on black)
read a version number of the "plasma version this theme has been intended for"
and use it to change the behavior for retrocompatibility
(all themes that don't export this are assumed to be from KDE4)
Change-Id: I4bc20a0c10de9f9a6c3facd63b6c5b6da210039a
in order to minimize resizes, redraws and eventual reloading of images,
try to initialize the wallpaper with the correct size already.
reviewed by: Kai Uwe Broulik <kde@privat.broulik.de>
Change-Id: I8489744cb845213195f1916bfb9328c53ec0798d
DialogStatus, as in other Dialog variants, can only be accessed through
the PlasmaComponents namespace.
Fixes 3 ReferenceErrors in SelectionDialog and makes it actually work.