Commit Graph

13704 Commits

Author SHA1 Message Date
Marco Martin
148e0022f6 Make Svg,FrameSvg work qith QT_DEVICE_PIXELRATIO
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
2015-03-10 18:02:15 +01:00
Kai Uwe Broulik
c9fd8fc1e5 When changing "active" load pixmap right away
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
2015-03-08 19:57:25 +01:00
Sebastian Kügler
afc3cf2f34 Use semantically more correct units.largeSpacing
Also saves an evaluation of an expression, so should be slightly faster.

Suggested by Martin Klapetek.

REVIEW:122717
2015-03-05 23:40:25 +01:00
Sebastian Kügler
a2dd646a17 fix tooltip's horizontal sizing
This is Martin Klapetek's version of the fix, it also works nicely on my
machine, and seems otherwise logical.

CCMAIL:mklapetek@kde.org
REVIEW:122717
2015-03-05 23:40:25 +01:00
Martin Klapetek
9a41afb29b Add another tooltip test mimicking the notifications applet
Change-Id: I3900c02c16c8c4c0a98f058e55681ec05006a360
2015-03-05 15:09:29 +01:00
David Edmundson
1ce575cf5a Simple fix for huge icon sizes
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
2015-03-04 11:25:59 +01:00
Marco Martin
993301c80b add missing K_EXPORT_PLASMA_APPLET_WITH_JSON
both old and new notation for compatibility:
same as DataEngine

Change-Id: I96af8f2255a94e1c0bc86e55ebb420de721444eb
2015-03-03 16:35:15 +01:00
Eike Hein
e090c77b10 Add a KF6 TODO note. 2015-02-27 19:05:06 +01:00
Eike Hein
6cc17ea25e Add a 'visible' property/role to ConfigCategory/ConfigModel.
This gives users a bit to conditionally hide categories in
combination with a filter model.
2015-02-27 19:00:32 +01:00
Eike Hein
80c32e6d51 Add a 'filterCallback' property to SortFilterModel.
Allows setting a callback function from QML to replace the
default filter implementation.
2015-02-27 19:00:32 +01:00
Martin Klapetek
54899c56ba Make the import 2.1 work
Change-Id: I12b6557a7a0e64dc4d55410da143d3d8d278bc94
Reviewed-by: Marco Martin
2015-02-27 18:37:41 +01:00
l10n daemon script
e44eb9edec SVN_SILENT made messages (.desktop file) 2015-02-27 11:41:25 +00:00
Sebastian Kügler
d285b818f6 Improve tooltip layouting
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
2015-02-26 16:25:52 +01:00
Marco Martin
adfc3a7752 shadow frames with center element
so they can be loaded as a full framesvg too

Change-Id: I7a16da765a530420ad050401a5b8215403b8ace0
2015-02-26 15:44:30 +01:00
Aleix Pol
e9bddef8ee Make it possible to let plasmoids to load scripts outside the plasma package
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
2015-02-25 16:26:23 +01:00
l10n daemon script
f752138302 Upgrade ECM and KF5 version requirements for 5.8.0 release. 2015-02-25 14:23:39 +00:00
David Edmundson
8022adb399 Add icons and images to the tooltip test
Change-Id: Idbcac97bb3e5b8e2349d384c94734a312f177954
2015-02-25 11:24:18 +01:00
Martin Klapetek
ba9f6ff03c Store the filter string in the member variable
Doh.

Change-Id: I529e79e947614545a7bc9f1d4e4a2191e238feaa
2015-02-24 16:01:35 +01:00
Martin Klapetek
404ed07fb0 Revert "Raise the QML imports version to 2.1"
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.
2015-02-24 15:31:41 +01:00
Martin Klapetek
fa2109ccb6 Raise the QML imports version to 2.1
Change-Id: Ia753bbc7a55a256486f2d0f225571b9046f03cda
REVIEW: 122696
2015-02-24 13:06:48 +01:00
Martin Klapetek
0f3eee1bc7 Add REVISION to the filterString property
Change-Id: I8b5474995ec64c69e16d5209442f7351c10aa73f
2015-02-24 13:06:12 +01:00
Kai Uwe Broulik
5e53bd4d57 Don't ask KWindowEffects for blur repeatedly since we track it ourselves anyway
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
2015-02-23 21:24:12 +01:00
Martin Klapetek
0230949b08 Add plain string filtering capability to SortFilterModel
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
2015-02-23 20:02:41 +01:00
Sebastian Kügler
2cf49abb3e Shorter animations
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
2015-02-21 19:53:01 +01:00
Aleix Pol
e3b8935d29 Fix applet loading
Don't request delayed initialization if we're not going to wait for it.

Reviewed by DjE
2015-02-21 14:06:29 +01:00
Marco Martin
bb9552c7cd remove trailing slash
Change-Id: Ifb22bcfdf2d0562dcb904539a801d8dfa537f35d
2015-02-21 11:27:14 +01:00
Aleix Pol
b14463f352 Make it possible for ContainmentInterface to deal with WrappedMimeData
This way it integrates properly with KDeclarative as well. This will need
to be extended in order to integrate QtQuick.DropArea.
2015-02-20 21:27:30 +01:00
Marco Martin
e2e7cb1cab remove PlasmaKPackageLoader
use a package of type KPackage/GenericQML for the toolbox instead

Change-Id: I5e559535338f093b3cd3734ef9c3906bb20cf001
2015-02-20 18:08:48 +01:00
Marco Martin
2bbb9dda7f if an inexisting library was specified, fallback
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
2015-02-20 13:37:09 +01:00
Kai Uwe Broulik
ffcb5c8046 Make units more finegrained
It's always if (ratio < n) { return size * (ratio - 0.5); } but with the
"< 3.0" condition that was not the case.

REVIEW: 122644
2015-02-20 12:28:53 +01:00
Sebastian Kügler
a8edd6fd2c Port toolbox loading to KPackage
This needs KPluginMetaData::isHidden() which was recently added in kcoreaddons.

Reviewed-by: Marco Martin
2015-02-20 10:00:02 +01:00
Marco Martin
bda055367f use an internal package loader
internal kpackage loader used to load Plasma/generic plasma/plasmoid etc
directly from kpackage

Change-Id: Ibd91b0d18b233291978ac667f7bf768a8bdc3c9b
2015-02-20 09:58:57 +01:00
Sebastian Kügler
47206f89b1 Fix plasmapkg2 -t package for translated systems
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
2015-02-19 15:55:51 +01:00
Marco Martin
1794d3c43f ungrab the current grabber before showing the menu
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
2015-02-19 15:11:25 +01:00
Kai Uwe Broulik
e823ec8488 Ignore single actions on popups
Changelog: Sticky notes no longer appear when middle clicking a plasmoid popup

REVIEW: 122623
BUG: 344309
2015-02-18 14:36:21 +01:00
Kai Uwe Broulik
a717bac7a4 Make non-interactive tooltips outputOnly
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
2015-02-18 14:32:36 +01:00
Kai Uwe Broulik
d0c5aa6fc9 Explain magical round ToolButton behavior on the documentation
Reviewed by David Edmundson
2015-02-17 23:21:54 +01:00
Kai Uwe Broulik
2a4812c9ba Drop size check for round ToolButton
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
2015-02-17 23:21:54 +01:00
Sebastian Kügler
70b545a964 Don't install dpitest app
It's really only a test, not supposed to be installed.
2015-02-17 18:40:49 +01:00
Hrvoje Senjan
9f677ebb55 Use qstrcmp instead of comparing char* pointer with a string literal [-Waddress]
Reviewed by: mgraesslin
2015-02-17 16:11:20 +01:00
Marco Martin
462ad8a6ca support for C++ applets
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
2015-02-17 13:43:33 +01:00
Lasse Liehu
edc767740e Load config i18n domain from applet root path
This now matches AppletQuickItem

BUG: 343932
Change-Id: Ia019ea45d61ec7ae6a8ae6ea83ea757804649b1a
Reviewed-by: David Edmundson
2015-02-16 19:10:27 +01:00
Kai Uwe Broulik
b3f607ec1a Distinguish datacontainer relays by both interval and alignment
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
2015-02-16 18:47:10 +01:00
David Edmundson
ae2b9f7099 Guard around a bug in older versions of Qt
Change-Id: I7d6c11bd426c87b3d1abcedbfc18ccc7b912b1a2
2015-02-16 16:46:34 +01:00
Kai Uwe Broulik
5cfe737618 Optimize DataSource
- 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
2015-02-16 14:55:49 +01:00
l10n daemon script
073b83b440 SVN_SILENT made messages (.desktop file) 2015-02-16 10:17:17 +00:00
l10n daemon script
f64424781a Upgrade KF5 version to 5.8.0. 2015-02-15 22:41:18 +00:00
Kevin Funk
7e302a5236 Use Q_DECL_OVERRIDE where possible
REVIEW: 122542
2015-02-13 13:31:58 +01:00
Lukáš Tinkl
667eb808a9 correctly default to AutoText for tooltip contents
acked by notmart
2015-02-13 13:17:42 +01:00
Aleix Pol
3937b0453e Fix PlasmaCore.IconItem initialization when using QPixmap on it
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
2015-02-12 16:35:28 +01:00