Commit Graph

2930 Commits

Author SHA1 Message Date
Kai Uwe Broulik
6995193219 Make model param of clicked signal of var type
When using ModelContextMenu with a JS array the "model" param of the clicked
signal is null because QtObject property can only hold QObject but no JS objects.

CHANGELOG: The onClicked signal of PlasmaComponents.ModelContextMenu now works properly
if model is a JS Array of JS objects

REVIEW: 124910
2015-08-26 10:46:43 +02:00
Kai Uwe Broulik
25748ca575 Support sections in ModelContextMenu
CHANGELOG: PlasmaComponents ModelContextMenu can now create Menu sections

REVIEW: 124909
2015-08-24 23:14:31 +02:00
Ragnar Thomsen
cc885eb652 Port platformstatus kded plugin to json metadata...
and disable installation of desktop file.
2015-08-21 23:46:30 +02:00
David Edmundson
7061235418 Handle an invalid metadata in PluginLoader
REVIEW: 124823
2015-08-20 16:10:03 +01:00
Leszek Lesner
a7b438ece4 Documentation for PlasmaComponents Menu
Add documentation for declarative menu (PlasmaComponents.Menu)

Change-Id: I66363f43433dedd5f19723e3de4b680eb3e40527
REVIEW: 124727
2015-08-13 13:44:52 +01:00
Aleix Pol
74a605e0cf Let the RowLayout figure out the size of the label
No need to specify the preferredHeight as the RowLayout can already infer
it automatically.

REVIEW: 124646
2015-08-07 14:21:30 +02:00
Marco Martin
d5b71611e2 always show the edit menu when the cursor is visible
not super nice but needed functionality-wise, since i cannot trigger the
menu from CursorDelegate
2015-08-06 15:25:30 +02:00
Aleix Pol
f87f03b4a8 Fix loop on ButtonStyle
Nowadays the size of the icon is defined by the size of the button itself,
and vice-versa.
This patch uses the unit sizes to decide which sizes to offer.

REVIEW: 124628
2015-08-05 18:30:23 +02:00
Aleix Pol
4e9f3dd129 Don't change the flat-iness of a button on pressed
Changes the background component on press, looks odd.

Reviewed by Marco Martin
2015-08-05 18:30:23 +02:00
Marco Martin
0aca608bda on touchscreen and mobile scrollbars are transient
Change-Id: I81b2986b4ca0486b59e8bd400cd8e2603a54e040
2015-08-05 14:54:31 +02:00
Marco Martin
04d946e786 adjust flick velocity&deceleration to dpi
on denser screens we need more higher speed and
deceleration expressed in pixels

Change-Id: Ida366190ec99720f05b8c52f08514fc087a67948
reviewed-by: "Kai Uwe Broulik" <kde@privat.broulik.de>
2015-08-05 14:54:31 +02:00
Marco Martin
ba69d19c63 custom cursor delegate only if mobile 2015-08-05 13:55:26 +02:00
Marco Martin
669f807fa8 touch friendly text cursor 2015-08-05 13:52:22 +02:00
Kai Uwe Broulik
b61a03c048 Support pinch to zoom in the calendar
CHANGELOG: Using a pinch gesture one can now switch between the different zoom levels of the calenda

REVIEW: 124507
2015-08-04 12:44:37 +02:00
David Edmundson
32020aad78 comment about code duplication in icondialog
Change-Id: I0850c6698cbd4b4940b289e3c370c0ab140ed2e4
2015-08-03 15:29:32 +01:00
Xavier Vello
b380205f29 Slider groove color was hardcoded, modified to use color scheme 2015-08-01 22:39:57 +02:00
Kai Uwe Broulik
11e5ff10ae Improve calendar navigation
This adds a "Year overview" showing all 12 months in a grid, and a "Decade overview"
showing the current decade.

CHANGELOG: Calendar navigation has been significantly improved, providing a year and decade overview
REVIEW: 122488
2015-07-27 11:41:35 +02:00
Kai Uwe Broulik
80940951e0 Make PlasmaCore.Dialog opacity work
CHANGELOG: PlasmaCore.Dialog now has an 'opacity' property

REVIEW: 124408
2015-07-21 22:28:34 +02:00
Aleix Pol
75b1034dd6 Make some space for the radio button
Reviewed by Marco Martin
2015-07-21 18:18:40 +02:00
Aleix Pol
99282d151b Don't show the circular background if there's a menu
Otherwise it's centered on the button instead to the icon and it looks
wrong. Also it's good that we use the rectangular background as it involves
all the button, arrow included.

Reviewed by Marco Martin
2015-07-21 17:30:21 +02:00
Marco Martin
ee94a3ad3e fix parenting and popping up policy 2015-07-21 11:34:01 +02:00
Marco Martin
03560b5a5b declare __editMenu
this makes the patch not fail also on non patched Qt
2015-07-21 10:57:56 +02:00
Kai Uwe Broulik
6098528cd4 Add X-Plasma-NotificationAreaCategory definition 2015-07-20 14:14:52 +02:00
David Rosca
0ffd7681dd Set notifications and osd to show on all desktops
Notification and OnScreenDisplay window types are now shown on all
desktops, same as Dock.

REVIEW: 124355
2015-07-16 17:35:48 +02:00
Bhushan Shah
084d527638 Print useful warning when we can not get valid KPluginInfo
We can not generate proper PluginInfo most likely because metadata was
not valid, printing metadata itself will not be useful and will result
in printing message like,

Could not load plugin info for plugin : "" skipping plugin

Which is 0% useful.
2015-07-16 19:13:44 +05:30
Marco Martin
3689d5472f add missing cursot handles delegates 2015-07-16 15:40:16 +02:00
Marco Martin
797c622f7f whitespace-- 2015-07-16 15:33:34 +02:00
Marco Martin
eef99055e6 rewrite the EditMenu implementation
license reasons
2015-07-16 15:26:18 +02:00
Dan Vrátil
2b31836bdc Fix potential endless recursion in PlatformStatus::findLookAndFeelPackage()
The LookAndFeel entry does not exist in kdeglobals (it's called LookAndFeelPackage),
so when the configured LnF package is removed or renamed, the code will go to
endless loop because it never clears the configuration ine kdeglobals correctly.

REVIEW: 124371
2015-07-16 15:12:45 +02:00
Marco Martin
9e318ed6d9 use the mobile menu only conditionally 2015-07-16 13:52:46 +02:00
Marco Martin
b88f84e703 reparent the menu to root
this makes the menu to be corectly positioned and correct Z
it may happen of menus not getting deleted in dynamic cases such as
 things in pagestacks
2015-07-16 12:51:03 +02:00
Marco Martin
7525a0db40 experimental brnch for inline edit menu 2015-07-15 19:23:30 +02:00
Kai Uwe Broulik
81dbda8e17 Rename software-updates.svgz to software.svgz
Plasma only looks for the section before the first dash.
Fixes not being able to use software-updates-foo icons
2015-07-13 20:12:39 +02:00
Kai Uwe Broulik
5cf9c04ff5 Also check for SharedEngineView
With the move to a shared QML engine infrastructure, the check for whether the
focus item is a View no longer held and thus Plasma dialogs stayed opened when
clicking the Desktop to dismiss them.

CHANGELOG: Dialogs like Kickoff now properly close when clicking the Desktop
BUG: 349172
REVIEW: 124260
FIXED-IN: 5.13
2015-07-05 15:23:34 +02:00
Marco Martin
0cdd928376 make the dark theme completely dark, also the complementary group 2015-06-24 14:09:33 -07:00
Marco Martin
fef51e71d6 cache naturalsize separately by scalefactor
solves some highdpi issues
saves and reads natural sizes separed by scalefactor
so they don't get mixed up when the scaefactor changes
resulting in wrongly sized items

reviewed-by:David Edmundson <david@davidedmundson.co.uk>
2015-06-24 10:38:53 -07:00
Marco Martin
b2b1c93fac give fullrepresentation a parent immediately
like compactRepresentationItem, initialize it
with the appletInterface as parent at creation
not having any moment without parents
2015-06-18 18:29:14 -07:00
Vishesh Handa
2dbeea4d23 ContainmentInterface: Move to lambda to a private slot
The containment interface deletion order isn't clear. It can happen that
it is deleted before the application quits, and then this lambda is
called, and its accesses internals of the class even though it has been
deleted.

Reviewd-By: Marco Martin
2015-06-19 01:07:24 +02:00
Vishesh Handa
c77377221b ContainmentView: Do not crash on an invalid corona metadata
On launching `plasmashell -wap notExistingName`, it's better to give a
warning instead of crashing.
2015-06-19 00:03:20 +02:00
Vishesh Handa
9976edcbc9 AppletQuickItem: Do not access KPluginInfo if not valid
When loading an applet which does not exist, we create a dummy applet
which just contains the error message. This dummy does not have a valid
KPluginInfo, and using an invalid KPluginInfo causes as assert to be
hit.

Reviewed-By: Marco and Sebas
2015-06-18 23:36:28 +02:00
Marco Martin
aa52188364 use ColorScope 2015-06-18 11:42:09 -07:00
Kai Uwe Broulik
ac04b5570a Ignore invalid X-Plasma-ConfigPlugins
CHANGELOG: Fix occasional empty applet config pages

CCBUG: 349250
REVIEW: 124113
2015-06-17 18:28:12 +02:00
Martin Klapetek
5165d6574e [calendar] Ensure the grid is repainted on theme changes
Change-Id: If6e6144fa3aa691628c3ba2c053f3e848da8498d
2015-06-15 16:39:03 +02:00
Martin Klapetek
23add5d6e4 [calendar] Refactor the Calendar grid computation a bit
Makes the code a bit simpler & lighter and fixes the sometimes missing
bottom line in calendar.

The grid is now equally padded from both sides (including the month
name), so basically it's now always aligned to the center and this also
fixes the cases where there was a bigger padding on one side than on the
other.

The grid is now also anchored to the bottom so that the bottom margin
can stay moreless consistent with the side margins in different sizes.

Change-Id: I2f2173d11e473d6e93db2bdca002269e4239f516
REVIEW: 124072
CHANGELOG: Improve hidpi support in the Calendar grid component
2015-06-15 16:35:32 +02:00
Marco Martin
f9d4f3d836 don't destroy the window 2015-06-14 12:30:57 -07:00
David Edmundson
99da4651c3 Verify KService has valid plugin info before using it
Change-Id: I361bb9f49e9fab108e524e5d321d114fd1fc4aae
REVIEW: 124062
2015-06-14 10:16:54 -07:00
Marco Martin
6b633de572 destroy native window on hide 2015-06-11 21:29:10 -07:00
Marco Martin
839dc2c3df write in the qmlobj rootcontext, not global
use a private rootcontext for each wallpaper, or they would
share config
2015-06-11 18:13:30 -07:00
Marco Martin
34935428e8 correctly scale up svgs
scale the natural size as well as sizes
this makes hugh dpi ratios to be more uniformly scaled
2015-06-11 18:01:53 -07:00
Martin Klapetek
bc0280ddb0 [calendar] Always start counting weeks from Monday
Sometimes the first day in the grid can be Sunday, but the week number
must always be counted from Monday in that week

BUG: 349044
Change-Id: I903650fcaadb4fd78764ad6a8bb1e219261c791b
FIXED-IN: 5.11
2015-06-12 01:11:11 +02:00
Marco Martin
c60ca1b6a0 immediately parent objects
don't let representations without parents, avoid
possible leaks and fix cases in which the applet relies
on ht eparent hyerarchy, such as ColorContext
2015-06-10 22:39:22 -07:00
Jan Kundrát
eb4edb0e9e Fix build on Qt 5.2
The QJsonArray::operator<<(const QJsonValue &) is a 5.3 thing.

Change-Id: Ia183cf55bed764747dbba727346f18df396affeb
2015-06-10 18:55:18 +02:00
Marco Martin
13bd6703c0 Merge branch 'mart/singleQmlEngineExperiment'
REVIEW:123736
2015-06-10 09:05:46 -07:00
Martin Klapetek
c98f356fc6 [calendar] Repaint the grid when show week numbers setting changes
Change-Id: I5ec923ed62492afe9a6db24db5085ca98849a5e6
2015-06-10 14:37:20 +02:00
Kai Uwe Broulik
d65c0ed1d0 Bind translucent theme to background contrast rather than blur effect
Only the background contrast effect provides real contrast for contents, the blur effect
doesn't improve readability that much; so we now use the translucent theme only when we
have the background contrast effect. This significantly improves readability.

CHANGELOG: An opaque theme is now used when only the blur effect is available
REVIEW: 124039
BUG: 342934
BUG: 348154
2015-06-08 17:30:38 +02:00
Dan Vrátil
afd962a15b Fix crash when QGuiApplication::primaryScreen() returns a null pointer
There can be a situation when changing resolution/scaling or some other screen
property that driver/XRandR decides to turn the screen off temporarily, during
which there are no screens and QGuiApplication::primaryScreen returns a null
pointer.

Approved-by: David Edmundson
2015-06-06 16:06:51 +02:00
Martin Klapetek
70cf70be3a Fix typo in ToolTipArea documentation
Change-Id: I6a823b1356099f364d0bd59e3f3a0daa137f1ae7
2015-06-05 14:34:56 +02:00
Martin Klapetek
5caba3cfaf [calendar] Add week numbers in Calendar components
Change-Id: Ie46b9b9c1e6035a9b2933362227d3c8fcd30a10e
REVIEW: 124004
CCBUG: 338195
CHANGELOG: Calendar components can now display week numbers
2015-06-05 14:34:05 +02:00
Marco Martin
a2e223c1ad use PlasmaCore.ColorScope in needed places
standard controls should work better in inverted color scopes

Change-Id: I3d10a195cb0ae0b2f2fbbcca21fc6f87f99e7cfc
2015-05-28 12:51:30 +02:00
Marco Martin
eca200f67e use color contexts
Change-Id: Iea8cc397ddd431c61390ddc70c3fab808ef9f72f
2015-05-27 18:18:50 +02:00
Marco Martin
cc97bd8297 most entries are not kcms, fail gracefully
don't spit scary errors when an entry has an empty plugin path,
ie not a kcm

Change-Id: I1f2cc744aaed315ae3dd56d5a55082eb09a5ed6e
2015-05-26 15:45:34 +02:00
Jaroslaw Staniek
1fcdc08222 Missing "or" when looking for .cmake and CMakeLists.txt files
REVIEW:123902
2015-05-25 16:30:43 +02:00
Marco Martin
7e51d55022 remove dead code
Change-Id: I7d5c896572e65d0bc30cbfc41b75968bf6085cec
2015-05-19 14:59:39 +02:00
Marco Martin
607b7bf584 whitelist applets/versions for separate engine
an attempt at transition without having to litter all
the metadata files: whitelist for now the applets in which
use the separate engine: when they have a version number
greater than 3 (arbitrary) switch over to shared engine

Change-Id: I354638527923734722bfcb0810703e20e32372d1
2015-05-19 14:45:12 +02:00
Marco Martin
68104d38d4 ntroduce a new class ContainmentView
replaces View, uses the shared engine view and uses the only global engine

Change-Id: I3de71c38edc92a0609d6614bde819957819c66a4
2015-05-18 16:19:01 +02:00
Marco Martin
07a487de8d less margins
Change-Id: I9acc3cf2e54b6a74fdd1693f60358fa2bd4e37eb
2015-05-15 17:18:17 +02:00
Marco Martin
ae9cb77838 Use QtRendering for fonts in password fields
Since the password echo is a circle woithout vertical or horizontal lines, it won't be
more blurred with different rendring types.
Using Qt rendering, the dots will look more aligned and equally spaced.

Change-Id: I8052f176930d1e2dc144f0b65daf539764cf08b1
REVIEW:123799
2015-05-15 14:29:08 +02:00
Aleix Pol Gonzalez
dedc3cc9ae Improve debug information for some plasmoids
I've been trying to figure out why there's so many qml scripts which errors always specify "<Unknown Files>".
This patch is not ideal, but improves the situation slightly.

REVIEW: 123575
2015-05-14 02:56:04 +02:00
Martin Klapetek
37590e2d2b Fix AssociatedApplicationManager lookup when a mimetype has no aliases
QMimeType::aliases() does not return the main mimetype in the returned
list and so when there are no aliases for a mimetype, there would be no
associated application found as it would be querying for empty mimetype.

This now always prepends the current mimetype to the list for which the
apps are queried.

REVIEW: 123779
BUG: 340326
FIXED-IN: 5.11
CHANGELOG: Fix AssociatedApplicationManager lookup when a mimetype has
no aliases

Change-Id: I322b03f2ac17fa4c0eb70fc3354c65a0f7a5e34c
2015-05-13 19:05:09 +02:00
Marco Martin
c0c56191db fix panel background coloring
Change-Id: Ie60dbf45e78be6d400019834d2324f3ca4e18b6f
BUG:347143
2015-05-12 13:45:40 +02:00
Marco Martin
1b5805ba02 qmlobjectsharedengine in wallpapers
Change-Id: I6125cfa6d7a0cbf1f6f4ece132e9b824a447ddfb
2015-05-11 20:54:52 +02:00
Marco Martin
a595bf9f61 use QmlObjectSharedEngine in applets
Change-Id: Ie3f8c90b7fd601fdb2da23bd69e4b4b338cb190b
2015-05-11 20:44:57 +02:00
Marco Martin
cb6b03e907 use QmlObjectSharedEngine for tooltips
Change-Id: I6ddb3bcad870165e24bd7b5cd63505fd31ca46b9
2015-05-11 20:06:28 +02:00
Marco Martin
a7d4e52aed get rid of "Could not load applet" message
is misleading and not correct anymore

Change-Id: I6429d522d92d94661d14d618f20e1c604140a6a9
2015-05-11 17:48:01 +02:00
Marco Martin
9802e9c6d1 implify
Change-Id: I983400993050e2ebf735290387982845d27dc0d1
2015-05-11 14:51:01 +02:00
Marco Martin
bb0d245d5b support fallback to the multi engine
require SingleEngine in X-Plasma-RequiredExtensions to share the engine

Change-Id: I72873d2e370f98a069bb3dff0d58290277da1292
2015-05-11 13:47:15 +02:00
Marco Martin
509c5da619 consider the case of one engine per applet
rest of fallback mechanism still to be implemented

Change-Id: I2889075d72c776fea4a7db7e9ea638697acd907f
2015-05-11 12:02:34 +02:00
Marco Martin
ac2f76d9c8 heuristic for finding out what package we want
based on the absolute path requested

Change-Id: Ie99bfdc322a409e7ef275499eb8b254d834a98b7
2015-05-11 11:49:37 +02:00
Marco Martin
f1c0a9a06b capability to load QML kcms in plasmoid config windows
With the same mechanism as plasma 1, add the possibility to load kcms directly
 in the plasmoids config windows. this works only for qml based ones.
the apply enable and trigger is correctly wired between the config dialog
and kcm apis.

Change-Id: I66b5ab2253dcbb5f223b5dcf5616efc9d5aab274
REVIEW:123673
2015-05-08 20:35:45 +02:00
Marco Martin
f9e61de51b hopefully fix Plasmoid attached property
Change-Id: I57d6d443b0a2f94e986e11e0e5cfb1ac6e6884bc
2015-05-08 20:23:00 +02:00
Marco Martin
dc288044ef rough experiment on giving all applets the same engine
it has a couple of big problems
Plasmoid attached property (should be easily fixable)
url interceptor (more tricky)

Change-Id: Ie75dfa97e097f43e8e5778f9b47fdff29224e5fc
2015-05-08 19:44:22 +02:00
Aleix Pol
ec6afe2a8a Don't use the DataEngineStructure for Applets
Use Plasmoid instead.

REVIEW: 123690
2015-05-08 19:24:38 +02:00
l10n daemon script
662adbb41b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2015-05-08 10:19:36 +00:00
David Edmundson
04f96779c1 Fix memory leak in AppletQuickItem
Change-Id: I7307cdd4f61fa87f6385a5c09b2fe722165e5199
REVIEW: 123492
2015-05-07 22:18:33 +01:00
Marco Martin
ea924b1469 port libplasma away from sycoca as much as possible
this ports most of libplasma away from sycoca, using instead
a combination of KPluginLoader and KPackage::PackageLoader instead
(so eventually using their own little caches instead of the
global sycoca cache)
a kservicetypetrader call is left in the loading of
containmentactions since is the only way to make an older
workspace still work, but is only a fallback, so containmentactions
in plasma-workspace can be ported eventually as well

Change-Id: Ie9579c3e01284f6d97043e22d01bbe63d3c3f45a
REVIEW:123626
2015-05-07 16:26:37 +02:00
Martin Klapetek
02f124b120 [plasmacomponents] Make SectionScroller follow the ListView.section.criteria
Now it will show first character only if the ListView has FirstCharacter
set

Change-Id: I6d2451d95e36a9a07eed4168402ac5748e87dcb3
Reviewed-by: Marco Martin
2015-05-07 12:56:49 +02:00
Kai Uwe Broulik
01d7343642 Disable transient scrollbars
To improve accessibility and consistency with widget applications scroll bars no longer
automatically hide after a timeout, which was the case when a touch screen was present,
which is nice for tablets but bad for desktops.

CHANGELOG: Scroll bars no longer automatically hide when a touch screen is present

REVIEW: 123645
BUG: 347254
2015-05-05 22:12:48 +02:00
Sergio Martins
dea859ee60 Fix member initialization order [-Wreorder] 2015-05-03 20:36:59 +01:00
Sergio Martins
245082dc34 Fix mismatched header include guards 2015-05-03 12:32:56 +01:00
Aleix Pol
71891996d4 -- unneeded includes 2015-04-30 19:29:50 +02:00
Marco Martin
fe9f515bf5 increase maxAllowedSize a bit
Change-Id: I88ca56d1ac687288e8e780ce43506fb45246d23f
2015-04-28 12:43:49 +02:00
Kai Uwe Broulik
93cf07deac Add support for menu sections
Also adds a manual unit test

CHANGELOG: PlasmaComponents.Menu now supports sections
REVIEW: 123537
2015-04-27 22:19:41 +02:00
Marco Martin
c22bb8c4a8 don't cut away text
Change-Id: I56cf92d0ac6515ec9deb2c8136ef7e2914d1a529
2015-04-21 11:23:11 +02:00
Marco Martin
f248bfbfd1 consider corona actions when evaluating shortcuts
Change-Id: Ic8ff309d6abac6bd85c4fb3c568a9c040f0fc93a
2015-04-16 18:38:23 +02:00
Marco Martin
a5588aab9a Merge "Consider visualParent rotation in popupPosition" 2015-04-10 15:02:34 +02:00
Sebastian Kügler
2b1a487428 Use KPluginLoader to load dataengines
KPluginLoader has all the needed machinery to identify a plugin by its
pluginId. No need to use the query parser here, replace it with a
lambda.

Look for C++ dataengines first. These are much more common, especially
in essential cases. By looking up the plugins through KPluginLoader
first, we can save querying ksycoca.

REVIEW:123297
CHANGELOG:Use KPluginLoader instead of ksycoca for loading C++ dataengines
2015-04-09 01:10:52 +02:00
Marco Martin
a5737b553e fix margin sizing after the imagepath changes
Change-Id: If47f4d538caf93a35b4ef008cbc5339a9ef265a0
2015-04-08 13:44:55 +02:00
Marco Martin
7ea2e8f028 panels have bottom margin
simplify the theme, always use complete frames
and drop the now unised *-mini-* prefixes

Change-Id: I2b85e3561adc6cb910dc12866f246ce1c9fd9c7a
2015-04-07 21:31:47 +02:00
Antonis Tsiapaliokas
684e456f84 Fix typo
REVIEW: 123276
2015-04-07 17:47:36 +03:00
Andrius da Costa Ribas
99d968e190 Convert switch/case statements to if/else due to MSVC being unable to recognise e.g. FrameSvg::TopBorder | FrameSvg::LeftBorder as a const expression (error C2051: case expression not constant)
REVIEW: 120877
2015-04-03 16:29:37 -03:00