Commit Graph

3739 Commits

Author SHA1 Message Date
Marco Martin
47a9cd23b3 fix check 2017-08-07 17:18:45 +02:00
Marco Martin
0c27df529d ignore spurious resize events to empty sizes
Summary:
on multiscreen systems, the notification dialog gets resized to 0x0
right after componentcomplete by someone else (either kwin, notification
 applet  or Qt code) causing 382340, resizing a window to a null size is not correct anyways
and should never happen.
with this, all other resize events are correct and notifications are ok on multiscreen
systems

BUG:382340

Test Plan:
system with primary monitor and panel in the external monitor
at the right of a panel, notifications are fine

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, broulik, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D7127
2017-08-07 16:06:04 +02:00
Volker Krause
0a8d1f9cd4 Fix compilation on Yocto
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
2017-08-03 22:19:29 +02:00
Kai Uwe Broulik
7e0b719f1e [Containment Interface] always emit contextualActionsAboutToShow for containment
The applet context menu contains containment actions which might be outdated if we don't call this.

Differential Revision: https://phabricator.kde.org/D6894
2017-08-02 11:02:12 +02:00
Marco Martin
dcf08486fe add some @deprecated in the documentation 2017-07-28 11:49:23 +02:00
Marco Martin
162431d793 remove resourceinstance
resourceinstance wasn't compiled anymore, never ported to kf5
so is safe to just remove it
2017-07-28 11:37:28 +02:00
Fabian Vogt
48a8245db4 Treat Button/ToolButton labels as plaintext
Summary:
The label text gets treated as RichText/StyledText, which is required
to display mnemonics underlined. Therefore it is necessary to manually
HTML escape the label text, which unfortunately breaks mnemonics as
escaped HTML contains ampersands.
This commit fixes that by introducing a custom function to stylize
mnemonics in HTML escaped text.

Test Plan:
Ran a modified knotificationdbustest with "<h1>&&a&ction</h1>" and
"actio&n2" as actions. Result: http://i.imgur.com/xHifDBu.png

Reviewers: #plasma, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6679
2017-07-25 16:05:20 +02:00
l10n daemon script
7b394146e5 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"
2017-07-25 04:47:04 +02:00
David Edmundson
a0e5bb3ea7 Don't perform wayland specific fixes when on X
Summary:
fd2e850156 introduces some behaviour
changes that affect X even though they should be only Wayland related.

BUG: 381130

Reviewers: #plasma

Subscribers: graesslin, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6776
2017-07-19 15:22:18 +01:00
Kai Uwe Broulik
d8f1d44a49 Declare AppManager.js as pragma library
It doesn't store any state but contains only functions.

Differential Revision: https://phabricator.kde.org/D6676
2017-07-13 14:27:59 +02:00
Kai Uwe Broulik
1d0a0b5cdf [PlasmaComponents] Remove Config.js
It got redundant and since it wasn't declared as "pragma library" an instance
of this script was created for every ListItem, causing quite some memory consumption.

Reviewed-By: notmart
2017-07-13 14:04:05 +02:00
Marco Martin
f5a217cf04 default to plain text for labels
as this control is new, we can change the default.
for sanity purposes, default to plain text
if the user really needs rich text, it can still
be explicitly setted

reviewed-by:kbroulik
2017-07-12 16:49:37 +02:00
David Edmundson
3a0f61b559 Load translations from KPackage files if bundled
Test Plan:
Installed battery monitor locally with kpackagetool5 -i
moved x-test .po file from being installed systemwide to only being
inside the bundle
still get xx everywhere

BUG: 374825

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5209
2017-07-11 13:19:10 +01:00
Kai Uwe Broulik
21f954d94d [PlasmaComponents Menu] Don't crash on null action
You can assign a QAction as "action", this way you can just pass it e.g. plasmoid.action("configure").
However, when assigning a null action as can happen with kiosk restrictions, it would crash
as it assigns m_action the nullptr but never checks for that.

This patch ensures we always have a QAction, creating a new empty one, if neccessary.
Also deletes our own action if an external one is assigned

Differential Revision: https://phabricator.kde.org/D6608
2017-07-11 12:23:39 +02:00
Kai Uwe Broulik
c00069c43d Use new connect syntax in more places
Especially in frequently created items. Shoves off a couple of milliseconds of startup time.

Differential Revision: https://phabricator.kde.org/D6614
2017-07-10 22:24:50 +02:00
Kai Uwe Broulik
a19701c252 [Plasma Dialog] Fix flag conditions
The code wants to check whether we're not a tooltip. This wasn't done properly and didn't work
when other flags were present.

Differential Revision: https://phabricator.kde.org/D6554
2017-07-10 11:55:27 +02:00
andreas kainz
8e24c87d8f update akregator system tray icon
BUG: 379861
2017-07-09 17:14:33 +02:00
Kai Uwe Broulik
f3dcff28b8 [Containment Interface] Keep containment in RequiresAttentionStatus while context menu is open
This ensures the panel does not auto-hide then.
It also forces a re-evaluation of auto-hide status when the menu closes,
so even if we mess up with mouse grabbing, it should more reliably auto-hide afterwards.

BUG: 344205
CCBUG: 351823

Differential Revision: https://phabricator.kde.org/D6527
2017-07-07 13:26:48 +02:00
Luca Beltrame
cf79873de6 Revert "Don't list KF5::WindowSystem in public libraries"
PlasmaQuick::Dialog::WindowType uses KWindowSystem's API, so removing
it from the list of the public libraries causes compilation issues in
projects that depend on plasma-framework (such as plasma-desktop) which
no longer find KWindowSystem's includes.

This reverts commit f8de13c674.

CCMAIL: kde@davidedmundson.co.uk
2017-07-05 09:18:49 +02:00
David Edmundson
f8de13c674 Don't list KF5::WindowSystem in public libraries
Summary: We don't use it in public API

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6495
2017-07-04 07:57:08 +01:00
Friedrich W. H. Kossebau
0e1219d03b API dox: use @param for normal parameter listing, not @arg 2017-07-03 16:24:20 +02:00
Marco Martin
f0cc90e45d fix apidocs 2017-07-03 16:20:46 +02:00
David Edmundson
06410e779b Fix tab bar layout key handling in RTL
Summary:
Current code will, when mirrored, treat all keys like they're the left
key.

BUG: 379894

Test Plan: Ran plasma in RTL

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6480
2017-07-03 11:31:46 +01:00
Bhushan Shah
f43938f4c2 Use #if instead of #ifdef
Fixes previous attempt to unbreak the build on Windows
2017-06-25 10:39:53 +05:30
Bhushan Shah
e3ffa8d8fe Fix the build without wayland/kwayland
This fixes the build of plasma-framework on KDE CI. Without this it will
error out as,

dialog.cpp(309): error C2065: 'shellSurface': undeclared identifier
dialog.cpp(310): error C2065: 'shellSurface': undeclared identifier
dialog.cpp(310): error C2227: left of '->setPosition' must point to
class/struct/union/generic type

Signed-off-by: Bhushan Shah <bhush94@gmail.com>
2017-06-25 10:29:28 +05:30
Marco Martin
eab4aa9909 Make sure size is final after showEvent
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
2017-06-21 13:29:26 +02:00
Kai Uwe Broulik
87d5449480 Fix vlc tray icon margins
I broke this in 5bfc730 when I fixed the stylesheet
2017-06-14 11:24:46 +02:00
Kai Uwe Broulik
5bfc730ce7 Fix vlc tray icon color scheme
Make sure to use style sheets and fill:currentColor or else it won't adapt
to the Plasma theme at runtime (e.g. white icon for dark themes etc)

CCMAIL: guoyunhebrave@gmail.com
2017-06-13 10:14:57 +02:00
David Edmundson
4a525f68bd Revert "Make every applet its own focus scope"
Even though this change is probably technically correct, it breaks
things in workspace which aren't really setting focus properly.

Better to revert now and merge again later when things work.

This reverts commit e65d7b98be.
2017-06-12 21:43:52 +01:00
David Edmundson
b0e8ea29fa Set Containments to have focus within the view
Summary:
Now that applets are their own focus scope (which makes sense) we've
also made containments their own focus scope.

We therefore need to also say the containment FocusScope has the focus
within the view.

BUG: 381124

Test Plan:
Renamed something in folderview
Used cursor nav

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6192
2017-06-12 15:22:36 +01:00
l10n daemon script
2544d1c9c7 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"
2017-06-12 05:14:10 +02:00
l10n daemon script
2d4548e4d0 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"
2017-06-11 04:33:38 +02:00
Marco Martin
6ffe068b80 generate the old key before updating enabledborders
Summary:
sometimes a frame changed enabled borders causing a dangling
pointer in s_sharedFrames, since oldkey was generated
with the new enabled borders, it generated a key not present
in the hash, tryed to remove it and left the one associated
with the old key in the hash.
if the need to reuse a frame with that key ever arised again,
we had a crash
BUG:378508

Test Plan:
couldn't reproduce the crash neither with or without patch,
with the patch, if i put debug in every place a framedata is removed,
searching if the key is in the hash before removing it, now
it's always true, before sometimes it was false

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6162
2017-06-09 16:16:16 +02:00
Marco Martin
1aea7bbd5e show show password button also if empty text
like happened in KPasswordWidget, show the show password
button also when there is no text, otherwise is impossible
to know what will be typed, a dot or the actual letter
BUG: 378277
2017-06-09 13:15:46 +02:00
David Edmundson
e65d7b98be Make every applet its own focus scope
Summary:
Like Loaders an applet should be a focus scope. It allows an applet to
set an item to have focus which will then have activeFocus when that
applet gets focus.

Also makes it easy to test if any item within the plasmoid has
activeFocus.

Test Plan:
Keyboard nav in kicker/klipper still work
Added opacity: Plasmoid.activeFocus ? 1 : 0 in an applet and it worked
as expected

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6152
2017-06-08 11:27:52 +01:00
David Edmundson
8fdbfa6980 Emit usedPrefixChanged when prefix is empty
As found by Fabian Vogt
2017-06-07 19:46:19 +01:00
Marco Martin
bf1d1cc6b2 don't switch colors on new themes
new themes as breeze aren't supposed to just use the button graphics
on top, that also mean, don't switch palette on top if the new prefix
is there
2017-06-07 18:24:33 +02:00
Aleix Pol
563011436d Port a bunch of classes away from Plasma::Package
Summary: Ported away some classes, removes many unneeded casts that happen when starting.

Test Plan: Tests still pass, plasma starts properly

Reviewers: #frameworks, #plasma, mart

Reviewed By: #plasma, mart

Subscribers: davidedmundson, mart, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D6041
2017-06-06 15:11:25 +02:00
Allen Winter
6c03c15c08 src/plasmaquick/dialog.cpp - fix build without kwayland 2017-06-05 10:02:44 -04:00
Friedrich W. H. Kossebau
0fb9732866 [FEATURE] Option to build & install QCH file with the public API dox
Using the new extra-cmake-modules module ECMAddQch (since 5.36.0)
this adds the option to automatically build and install a file
in QCH format with the docs about the public API, which then can be
used e.g. in Qt Assistant, Qt Creator or KDevelop.

Additionally the installed cmake config files will be extended
with a target KF5Plasma_QCH containing information about how to "link"
into the generated QCH file, which then can be used in the cmake build
system of other libraries building on this library, by
simply listing this target in "LINK_QCHS" of their ecm_add_qch() usage.
And a respective doxygen tag file with all the metadata about the
generated QCH file and used for the "linking" will be created and
installed.

Pass -DBUILD_QCH=ON to cmake to enable this.
2017-06-05 04:25:55 +02:00
Guo Yunhe
6ee8ffd79a Add VLC tray icon 2017-06-03 13:06:38 +03:00
Aleix Pol
3b303d7363 Small improvements in IconItem
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
2017-05-29 19:10:37 +02:00
Friedrich W. H. Kossebau
68ed01638c API dox: Use doxygen notation to have comments used 2017-05-26 19:55:25 +02:00
Friedrich W. H. Kossebau
fcee026657 API dox: note CamelCase includes by @class tag with more classes 2017-05-26 19:55:09 +02:00
Friedrich W. H. Kossebau
8749591922 API dox: fix doxygen notation with some post-position comments 2017-05-26 19:54:11 +02:00
Marco Martin
32e67a591e minimize dialog resizes/moves
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
2017-05-25 11:21:50 +02:00
l10n daemon script
6622a8c713 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"
2017-05-24 08:46:29 +02:00
Marco Martin
5ba1bed582 set transientparent for menus
Summary:
set transient parent for popup menus created by appletinterface/
containmentinterface, it makes them appear at the proper coordinates

Test Plan: containment menus appear where the mouse was pressed

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5918
2017-05-22 10:51:16 +02:00
Marco Martin
680a8a9e28 [WIP] workarounds for menu positioning
Summary:
this ensure two things:
* submenus have the main menu as transientParent
* the visualParent window() is used as transientParent, if exists

this partly fixes popup positioning in wayland, tough
the main taskbar menu is still mis positioned

Test Plan: submenus ok, taskbar contextmenus only partially fixed

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/D5773
2017-05-12 20:53:06 +02:00
Marco Martin
fd2e850156 recreate plasmashellsurf on exposed, destoy on hidden
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
2017-05-12 16:58:21 +02:00
Marco Martin
85699c8d2f reload icon when usesPlasmaTheme changes
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
2017-05-05 22:40:27 +02:00
Marco Martin
57c35df0bb hide scrollbar when useless
not only the root scrollbar should be hidden when
control.size == 1.0 but also background and
contentItem as they get reparented
2017-04-27 16:11:25 +02:00
David Edmundson
d3ed006a1f Install Plasma Components 3 so they can be used
Summary:
We were missing installing the qmldir file which is quite important

Test Plan: Actually used them in a Plasmoid

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: mart, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5603
2017-04-27 14:59:03 +01:00
Eike Hein
4f48901b05 Introduce units.iconSizeHints.* to provide user-configurable icon size hints
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
2017-04-26 20:41:06 +09:00
David Edmundson
884f89b9b0 [TextFieldStyle] Fix textField is not defined error
Summary:
The reference textField is undefined in this context
It works if the style happens to be used from PlasmaComponents
Use control instead to access the TextField.

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: ltoscano, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5297
2017-04-25 15:10:49 +01:00
David Edmundson
29f1ee3858 Update the ungrabMouse hack for Qt 5.8
Summary:
There was an unidentified bug where when opening a context menu in
response to a mousePress event led to the next click events not being
registered. The mouse got grabbed by the item in the mousePressEvent,
but when we open a menu it didn't get released. The next click goes to
the currently grabbed item.

A workaround was added back in 2015 (and copied into various other parts
of Plasma) to ungrab the mouse after launching the context menu inside
our rightClickEvent. This doesn't work because qquickwindow code is
shuffled. It now sends the event and then grabs the mouse.

qquickwindow.cpp:653 on Qt5.8.0

Which means we're now trying to do the ungrab, before QWindow has set
our item as the grabber. That obviously doesn't work.

This real bug needs fixing in Qt, (I now know the root cause!)
but we have a workaround here already, we may as well make it work.

FWIW, the root cause of all of these bugs is:
The way it should work is:
    QQuickItem is pressed
    QtQuick internally says "this item has the mouse"
    you release the mouse, that gets reset
    you change window focus, that gets reset

In our case, we don't get either of the last two because:

We spawn a QMenu on mousePress; this takes focus and more importantly
does a mouse grab (a different type. At an X level, not in QtQuick) so
our QQuickWindow never gets a mouseReleaseEvent

Test Plan:
Had 1 reproducible case
Added this. No longer could reproduce

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5515
2017-04-24 16:06:51 +01:00
l10n daemon script
95601054e5 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"
2017-04-14 03:57:03 +02:00
David Edmundson
1387b5efe3 Guard against Applet not loading AppletInterface
Summary:
This can happen if an applet has invalid metadata, it doesn't have a
script engine set (X-Plasma-API) so it won't load the DeclarativeAppletScripts
Having invalid metadata could come from the applet, or from the fallback applet
created in Containment::Private::createApplet.

We guard against it in appletAdded but not in appletRemoved, which is
inconsistent. We also apparently must have guards elsewhere otherwise
we'd see the crash more.

BUG: 377050

Test Plan: Had corrupt applet, used to crash, now doesn't

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5423
2017-04-13 10:49:10 +01:00
David Rosca
a01e4fb69e Calendar: Use correct language for month and day names
Apply fix for bug 353715 also on QML side.

Differential Revision: https://phabricator.kde.org/D5345
2017-04-11 09:36:20 +02:00
Aleix Pol
328cd681a7 Update qmltypes 2017-04-10 16:02:23 +02:00
Aleix Pol
2df613f938 Generate plugins.qmltypes files for the plugins we install
Reviewers: #plasma, #frameworks, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, hein, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5088
2017-04-10 15:09:57 +02:00
l10n daemon script
bef0612029 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"
2017-04-09 04:01:12 +02:00
Marco Martin
e1aa250e70 remove some debug
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.
2017-04-05 13:40:46 +02:00
Marco Martin
fb8ed07651 if the user did set an implicit size, keep it
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
2017-04-03 16:07:18 +02:00
l10n daemon script
f7e83b4bcf 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"
2017-04-01 04:05:09 +02:00
Kai Uwe Broulik
edb05ef989 [ModelContextMenu] Silence warnings
When using a regular JavaScript Array as model and omitting certain roles (e.g. not
having a "text" for a separator) it would throw a warning.

Differential Revision: https://phabricator.kde.org/D5247
2017-03-30 15:03:39 +02:00
Kai Uwe Broulik
8d42e0072f [ModelContextMenu] Use Instantiator instead of Repeater-and-reparent-hack
Differential Revision: https://phabricator.kde.org/D5215
2017-03-29 12:11:02 +02:00
Kai Uwe Broulik
5ae0651045 [Calendar] Shrink and elide week names like is done with day delegate
This ensures week names never exceed their cell's boundaries.

BUG: 378020

Differential Revision: https://phabricator.kde.org/D5200
2017-03-28 13:46:22 +02:00
Kai Uwe Broulik
611a4b5920 [Icon Item] Make "smooth" property actually do something
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
2017-03-28 13:44:53 +02:00
Marco Martin
8a42b06042 sensible implicit size for svgs
if the icon is an svg, try to get the implicit size
baked into the file, in

reviewed-by:Eike Hein
2017-03-28 12:51:12 +02:00
Kai Uwe Broulik
7487e208b6 [Default Tooltip] Fix icon size
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
2017-03-28 11:05:06 +02:00
Weng Xuetian
c0f359fab0 fix stylesheet for fcitx.svgz 2017-03-27 19:12:13 -07:00
Marco Martin
874a7e39b9 fix typo, iterate all colors available
patch by andi.berger@yandex.com
BUG:377944
2017-03-24 13:46:12 +01:00
Eike Hein
bc33f0470d Set implicit size from source size for image/SVG URL sources.
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
2017-03-24 06:34:24 +09:00
Marco Martin
244baaf928 add a new property in containment, for an edit mode
Summary:
used for opening the handles when the toolbox is open
or potentially other places

Test Plan: handles open

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D5153
2017-03-23 15:23:06 +01:00
Marco Martin
088a79d131 correct maskRequestedPrefix when no prefix is used
requestedprefix requires to not have the "-", don't fail anymore in
q->hasElementPrefix(frame->requestedPrefix) in
FrameSvgPrivate::generateBackground

BUG:377893
2017-03-22 14:11:37 +01:00
Roman Gilg
28ad7879d3 [Menu] Harmonize openRelative placement
Use the enums in a consistent way to place the menu around the parent item.

Test Plan:
Tested with plasma-pa and task manager context menu.

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4921
2017-03-22 11:16:33 +01:00
Kai Uwe Broulik
ff78b9e531 Add KAcceleratorManager
This way containment context menus and PlasmaComponents Menu get accelerators assigned to by default.

CHANGELOG: Most (context) menus have accelerators (Alt+letter shortcuts) now

BUG: 361915

Differential Revision: https://phabricator.kde.org/D5057
2017-03-16 11:47:59 +01:00
Marco Martin
76af5399dd Plasma controls based on QtQuickControls2
Summary:
This is a basic styling of a QtQuickControls2 series based on Plasma theme.
it has the main controls available in Qt 5.7
it installs them as a separate import (org.kde.plasma.controls 3.0) for
use restricted to plasmoids, is probably needed to be still installed as
a style as well

Test Plan:
tried with minimal QML files, a more comprehensive gallery may be needed.

pending considerations:
* some of the classes, like Drawer, the dialogs and ApplicationWindow *don't* make sense in plasmoids
* it will probably still need to be installed also as a qqc2 style, as this should be used in Plasma mobile
* probably only some of the controls should be installed as a separate import, the whole set as a style strictly for  Plasma Mobile use. the same qml files would be used, so no maintainance overhead

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, broulik, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4508
2017-03-14 10:21:33 +01:00
David Edmundson
547a34d346 Handle applyPrefixes with an empty string
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
2017-03-10 09:50:24 +00:00
Kai Uwe Broulik
fe3fd0cf17 Forward keyPressEvent to super class
Otherwise things like KRunner while typing on empty desktop breaks

Thanks Fabian Vogt for noticing
2017-03-07 16:56:58 +01:00
Marco Martin
bbcb217b48 actually delete old theme caches
Summary:
QStandardPaths doesn't do file search by wildcards,
that code was never actually functional

Test Plan: old kcache and rects cache files get correctly removed

Reviewers: #plasma, sitter

Reviewed By: sitter

Subscribers: davidedmundson, sitter, apol, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4925
2017-03-07 14:13:57 +01:00
Kai Uwe Broulik
94a6a168cf [Containment Interface] Trigger context menus on pressing "Menu" key
When pressing the "Menu" key, pretend a right-click happened and show the containment context menu.

Differential Revision: https://phabricator.kde.org/D4924
2017-03-06 15:14:15 +01:00
Kai Uwe Broulik
badf8acfe2 [Breeze Plasma Theme] Improve action-overlay icons
The current ones aren't really descriptive and vastly different from what Dolphin uses.

BUG: 376321

Differential Revision: https://phabricator.kde.org/D4917
2017-03-06 14:26:03 +01:00
Kai Uwe Broulik
dfbf2c1c30 Port away from setRoleNames where easily possible
It is deprecated. Instead re-implement roleNames().
Done in places where only static roles were used.

Differential Revision: https://phabricator.kde.org/D4891
2017-03-06 13:36:17 +01:00
David Edmundson
f8bedf84b7 Use initialiser list
Test Plan: Ran

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4857
2017-03-06 00:13:22 +00:00
David Edmundson
586ed85561 Ref/deref DataEngines even if the metadata is invalid
Summary:
Just because the metadata is invalid doesn't mean the DataEngine
actually failed to load, we're still returning a valid object, and as
seen with the MPris DataEngine bug. It's important that we still release
it properly.

It looks like this was designed to make sure you don't delete the null
data engine multiple times, but that shouldn't cause an issue here.

Test Plan: #plasma

Reviewers: #plasma, mart

Reviewed By: mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4556
2017-03-06 00:12:27 +00:00
David Edmundson
23b70f4d45 Implement FadingMaterial frag/vert shaders on core profile
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
2017-03-05 23:44:56 +00:00
David Edmundson
3b05f569ac Split frag and vert code of FadingNode into separate files
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
2017-03-05 23:44:50 +00:00
Aleix Pol
3a9fc22724 Small cleanups
Summary: Move implementation to cpp file, port away from deprecated API.

Reviewers: #frameworks, #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4931
2017-03-06 00:07:52 +01:00
Marco Martin
b99a87a320 set default hints when repr doesn't export Layout.*
when we go from full to compact repr, if the compact
doesn't export a Layout attached property, the hints shouldn't
remain those of the full repr, so reset to default values

BUG:377153
Reviewed-by:Eike Hein
2017-03-03 17:52:41 +01:00
Marco Martin
fba9e9e151 possible to set expanded=false for a containment
Summary:
it will still have no visible effect, but
is possible to read and write the property if
containments make use of it (the systray uses it for
opening/closing its popup)

Test Plan: setting expanded : false to containments doesn't break them

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4866
2017-03-03 14:31:07 +01:00
Roman Gilg
daee27f096 [Menu] Improve available space correction for openRelative
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
2017-03-02 21:02:32 +01:00
Marco Martin
2b3e8dfe86 move setImagePath logic into updateFrameData()
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
2017-02-28 13:35:09 +01:00
David Rosca
af2b27d1b8 IconItem: Add roundToIconSize property
Disabling this property makes it possible to show icon of arbitrary size.

Differential Revision: https://phabricator.kde.org/D4689
2017-02-28 11:18:17 +01:00
Marco Martin
c95f6ada5e same margins as the normal button 2017-02-28 11:07:06 +01:00
Kai Uwe Broulik
83755ee136 [Desktop Themes] Bump version number
We changed some graphics (new toolbutton design, slider handle hint), this ensures
that caches are properly nuked.
2017-02-28 10:53:01 +01:00
Kai Uwe Broulik
6b70fd983b [SliderStyle] Allow providing a "hint-handle-size" element
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
2017-02-28 10:22:36 +01:00
Marco Martin
916bcbf6c0 possibility to use a fallback chain as prefix
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
2017-02-27 18:55:02 +01:00
Martin Klapetek
2fea7077c8 Make the dataengine alignment timer more precise
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
2017-02-26 00:58:55 +01:00
David Edmundson
07d8df77a1 Connect all connections to action in QMenuItem::setAction
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
2017-02-24 14:16:51 +00:00
Kai Uwe Broulik
1934475e48 [ConfigView] Honor KIOSK Control Module restrictions
Differential Revision: https://phabricator.kde.org/D4679
2017-02-24 12:01:06 +01:00
David Edmundson
13054c0473 Fix disabling the spinner animation when Busy indicator has no opacity
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
2017-02-23 12:31:10 +00:00
David Edmundson
e301b63685 Fix binding loop regression in FrameSVGItem
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
2017-02-22 12:31:44 +00:00
Kai Uwe Broulik
408b311662 [FrameSvgItemMargins] Don't update on repaintNeeded
FrameSvgItem already updates the margins in response to that.

Differential Revision: https://phabricator.kde.org/D4688
2017-02-21 17:48:22 +01:00
Allen Winter
c4b01b0155 qml/plasmoid/containmentinterface.cpp - fix compile with Qt5.6 2017-02-20 11:36:55 -05:00
Marco Martin
f684e6b2e0 [WIP]: integrate drop menu and filecopy drop menu
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
2017-02-20 11:23:18 +01:00
Ivan Čukić
5ea39a32ad Applet icons for the Plasma Vault 2017-02-16 22:58:12 +01:00
Marco Martin
3bb3cf6932 fix stylesheet 2017-02-16 12:01:39 +01:00
Kai Uwe Broulik
263f119e17 Migrate AppearAnimation and DisappearAnimation to Animators
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
2017-02-12 00:22:17 +01:00
Eike Hein
701771833e Align bottom edge to top edge of visualParent in the TopPosedLeftAlignedPopup case.
Differential Revision: https://phabricator.kde.org/D4546
2017-02-11 00:35:37 +09:00
Kai Uwe Broulik
5becf5bc11 [ConfigModel] Emit dataChanged when a ConfigCategory changes
Differential Revision: https://phabricator.kde.org/D4543
2017-02-10 12:24:59 +01:00
Marco Martin
cee709d054 use anchors instead of fillHeight
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
2017-02-08 13:36:14 +01:00
Marco Martin
b2786508e1 hardcode padding of scrollview style to 0
due to the frame borders behavior in the plasma style,
we need style padding to be zero. this fixes
scrollbars appearing when they shouldn't
2017-02-07 15:45:37 +01:00
Roman Gilg
eb39b35141 [ScrollViewStyle] Evaluate frameVisible property
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
2017-02-07 14:13:21 +01:00
Marco Martin
d8a1a9eb08 don't regenerate frames when setting every property
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
2017-02-07 13:08:27 +01:00
Guo Yunhe
50699af19a Add kleopatra icon
See https://phabricator.kde.org/D4288
2017-02-07 11:47:41 +02:00
Kai Uwe Broulik
c21ff749e6 [Button Styles] Use Layout.fillHeight instead of parent.height in a Layout
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
2017-02-06 15:20:08 +01:00
Kai Uwe Broulik
1b02bfdff7 [ContainmentInterface] Also align containment context menu to panel
There's no point in only aligning applet context menus to the panel.

Differential Revision: https://phabricator.kde.org/D4453
2017-02-06 12:31:30 +01:00
l10n daemon script
bba40b9b9d 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"
2017-02-05 06:07:10 +01:00
Aleix Pol
6659517bce Specify NoDisplay type
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
2017-02-02 17:26:18 +01:00
Kai Uwe Broulik
031bd773b7 [ContainmentInterface] Use setSize instead of setWidth/setHeight in createApplet
This avoids needless binding updates and expensive layouting.

Differential Revision: https://phabricator.kde.org/D4352
2017-01-30 16:16:40 +01:00
Kai Uwe Broulik
d38be811e8 [FrameData] Avoid iterating keys()
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
2017-01-30 15:08:09 +01:00
Kai Uwe Broulik
fe39905560 [Containment Interface] No need for values() as contains() looks up keys
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
2017-01-30 15:07:30 +01:00
David Edmundson
8d60a8f1f5 Use texture atlas for static icon item
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
2017-01-30 10:24:33 +00:00
l10n daemon script
68f1a87c67 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"
2017-01-28 06:33:42 +01:00
David Rosca
d2c7435b1b Dialog: Hide when focus changes to ConfigView with hideOnWindowDeactivate
Differential Revision: https://phabricator.kde.org/D4282
2017-01-26 15:25:14 +01:00
Kai Uwe Broulik
ceeb57d17f [PlasmaComponents Menu] Add maximumWidth property
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
2017-01-25 18:02:33 +01:00
andreas kainz
c65edd7167 KAlarm icon is indistinct and unrecognisable at smaller sizes
BUG: 362631
2017-01-24 21:13:44 +01:00
andreas kainz
f75c8bd8c7 Missing icon when connected to openvpn via bluetooth network
BUG: 366165
2017-01-24 20:32:07 +01:00
Aleix Pol
54e87fe879 Make sure we display enabled ListItem on hover
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
2017-01-24 15:47:07 +01:00
Marco Martin
979e0ea54c Revert "Add steam tray icon"
This reverts commit 93807a222c.

We can't ship trademarked logos with plasma-framework
2017-01-24 10:48:36 +01:00
Guo Yunhe
93807a222c Add steam tray icon 2017-01-24 11:01:07 +02:00
Marco Martin
b629bdcf08 make all heights in the calendar header to be even
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
2017-01-20 14:32:50 +01:00
andreas kainz
1d12abf334 fix color styling in network plasma icon
BUG: 373172
2017-01-19 23:18:18 +01:00
Marco Martin
46c87d5ac3 it must also be possible for the status to be decreased again
this fixes the autohide panel being broken the first time an applet
like kickoff opens. when it closes again, the status has to be
decreased again
2017-01-19 14:30:13 +01:00
David Edmundson
17830b10f8 Remove excessive debug in CommonDialog 2017-01-19 02:29:57 +00:00
Eike Hein
2c69d22546 Add missing screenGeometryChanged signal; use in AppletInterface; fix typos.
Reviewed-by: Marco Martin

BUG:373075
2017-01-19 03:43:49 +09:00
Eike Hein
593f8183dd Set wrapMode to Text.WrapAnywhere.
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
2017-01-19 00:55:48 +09:00
Marco Martin
859dcc1403 use PlasmaCore.ColorScope for text as the rest 2017-01-18 15:04:08 +01:00
andreas kainz
aacf4f9aa4 update kalarm icon
BUG: 362631
2017-01-17 23:42:12 +01:00
Marco Martin
47ec9b84db correctly forward status from applets to containment
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
2017-01-17 18:07:10 +01:00
Kevin Funk
f8a7b418d5 Prefer nullptr over Q_NULLPTR 2017-01-16 18:17:34 +01:00
l10n daemon script
7d3d68a3c8 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"
2017-01-16 06:06:25 +01:00
Albert Astals Cid
5c46e32993 Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAG
REVIEW: 129826
2017-01-14 01:06:28 +01:00
Daniel Vrátil
3aec1bf2d3 Use KPlugin to load Calendar plugins
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
2017-01-12 14:53:25 +01:00
David Edmundson
66ebf2c84f Part Revert "[Units] Make iconSizes property constant"
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
2017-01-12 11:51:17 +00:00
Marco Martin
31cd81ca53 use the highlight color for selected text
plasma theme highlight color comes from the text selection
background kcoloscheme, so that's the one coherent with qwidget
based apps

BUG:374140
2017-01-11 18:41:41 +01:00
Kai Uwe Broulik
0a7ae2ce97 [Icon Item] Round size we want to load a pixmap in
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
2017-01-11 10:34:35 +01:00
Kai Uwe Broulik
57d58e371d Break from loop once we've found a Layout
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
2017-01-09 17:10:27 +01:00
Marco Martin
12a4709b6c portait prop is not relevant when there is no text
this fixes a binding loop on this property
when there is no label

BUG:374815
Change-Id: I71616a6c86cd4acdaff47f141ed5c676358db496
2017-01-09 16:29:32 +01:00
Bhushan Shah
780be6f4ce Fix the renderType properties for various components
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.
2017-01-09 14:50:06 +05:30
David Edmundson
dcd81c6be8 Don't register ConfigModel twice
Test Plan: Opened config

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4010
2017-01-08 20:22:29 +00:00
Kai Uwe Broulik
a0119858e4 [ToolTipDialog] Use KWindowSystem::isPlatformX11() which is cached
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
2017-01-08 18:11:14 +01:00
Kai Uwe Broulik
8875a04a1b [Icon Item] Fix updating implicit size when icon sizes change
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
2017-01-08 16:16:59 +01:00
Kai Uwe Broulik
4b55493568 [Dialog] Use setPosition / setSize instead of setting everything individually
Reduces the amount of unneccessary layouting done.

Differential Revision: https://phabricator.kde.org/D4009
2017-01-08 16:14:38 +01:00
Kai Uwe Broulik
4479fdab7f [Units] Make iconSizes property constant
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
2017-01-08 16:02:56 +01:00
Kai Uwe Broulik
56773014e1 Introduce Units singleton
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
2017-01-08 16:00:20 +01:00
Kai Uwe Broulik
d46a91ea57 [Icon Item] Support non-square icons
BUG: 355592

Differential Revision: https://phabricator.kde.org/D3892
2017-01-05 15:15:14 +01:00
Marco Martin
0611e01a69 new start menu icon with proper padding
new graphics by andreas
2017-01-04 16:36:45 +01:00
Marco Martin
94edfa149f use KPluginMetaData::readStringList()
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
2017-01-03 17:19:10 +01:00
Sven Brauch
c6132f87c4 GIT_SILENT Fix ECM warning: use CMakePackageConfigHelpers instead of ECM variant 2017-01-03 16:23:41 +01:00
Marco Martin
642db25fb9 search/replace old hardcoded types from plasmapkg2
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
2017-01-03 13:25:02 +01:00
Kai Uwe Broulik
a0f3d2429d Fix X-Plasma-Drop* types
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
2017-01-03 09:31:21 +01:00
Montel Laurent
39adcec588 Add missing Q_dECL_OVERRIDE 2017-01-03 09:13:39 +01:00
Kai Uwe Broulik
8675a31d2a [Plasma ScrollViewStyle] Show scroll bar background only on hover
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
2016-12-31 13:42:27 +01:00
Michail Vourlakos
6aedda94b2 Fix #374127 misplacement of popups from dock wins
--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.
2016-12-30 01:07:43 +02:00
David Edmundson
2e944d53a3 Avoid using deprecated Qt code QAbstractItemModel::reset
Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3839
2016-12-28 15:43:38 +00:00
Aleix Pol
dc4474125c Delegate plasmapkg2 completely into kpackagetool5
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
2016-12-27 18:59:57 +01:00
Martin Gräßlin
4798310ed7 Deprecate Plasma::Package API in PluginLoader
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
2016-12-27 18:20:35 +01:00
David Edmundson
2affb1ab56 Recheck which representation we should using in setPreferredRepresentation
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
2016-12-23 13:28:32 +00:00
Bhushan Shah
324232a745 [declarativeimports] Use QtRendering on phone devices
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
2016-12-23 16:37:16 +05:30
l10n daemon script
9581ada651 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"
2016-12-23 05:42:04 +01:00
Marco Martin
c0ce37551b a bit of padding 2016-12-22 12:30:07 +01:00
Marco Martin
68094ef795 use the plasma logo for start menu 2016-12-22 11:41:56 +01:00
l10n daemon script
2f4e59e902 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"
2016-12-22 05:52:51 +01:00
Marco Martin
6ae3a073db consider an empty panel always "applets loaded"
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
2016-12-21 18:11:51 +01:00
l10n daemon script
8431ef6e03 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"
2016-12-21 05:49:49 +01:00
Aleix Pol
38991f1f58 Remove unused file
So far it had just been moved from a place to another in the source
tree.
2016-12-20 18:44:03 +01:00
David Edmundson
7e1f2d79da Don't double emit iconChanged
Summary:
AppletInterface::setIcon calls Applet::setIcon which in turn emits
Applet::iconChanged

Applet::iconChanged is already connected to
AppletInterface::iconChanged

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3761
2016-12-20 13:26:10 +00:00
David Edmundson
17f5a3073b Emit toolTipMainTextChanged if it changes in response to a title change
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
2016-12-20 13:26:10 +00:00
David Edmundson
63a889ea0d Don't double emit titleChanged
Summary:
AppletInterface::setTitle calls Applet::setTitle -- which in turn emits
Applet::titleChanged

Applet::titleChanged is already connected to
AppletInterface::titleChanged

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3759
2016-12-20 13:26:10 +00:00
l10n daemon script
793441b77b 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"
2016-12-20 12:53:44 +01:00
Anthony Fieroni
d46a7f39ee [WindowThumbnail] Update thumbnail content
REVIEW: 129669

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-12-19 19:28:12 +02:00
Kai Uwe Broulik
a7ccca25ba [TextField] Allow disabling reveal password button through KIOSK restriction
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
2016-12-19 14:20:33 +01:00
Kai Uwe Broulik
eb81b3f162 [AppletQuickItem] Support launch error message
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
2016-12-19 13:48:52 +01:00
Eike Hein
db15022686 Fix logic for arrow handling in RTL locales.
Summary: BUG:373749

Reviewers: #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3718
2016-12-18 08:32:27 +09:00
l10n daemon script
4a97989f0f 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"
2016-12-16 05:40:59 +01:00
David Rosca
d1f4b5322a TextFieldStyle: Fix implicitHeight value so the text cursor is centered
This makes the TextField slightly bigger, but cursor is now correctly centered.

REVIEW: 129603
2016-12-14 16:44:08 +01:00
Aleix Pol
7b5f5b57b0 Introduce undefined fields
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
2016-12-14 15:50:33 +01:00
Marco Martin
862a19b758 make X-Plasma-NotificationArea a string
due to wrong checking in systray client code, which checks the string "true"

reviewed-by:apol
2016-12-14 15:43:42 +01:00
l10n daemon script
86569bcdcd 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"
2016-12-13 04:07:30 +01:00
l10n daemon script
a92fa79cc0 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"
2016-12-02 04:31:48 +01:00
l10n daemon script
3962e29b61 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"
2016-11-30 04:25:52 +01:00
l10n daemon script
7c13492f2a 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"
2016-11-29 04:25:11 +01:00
l10n daemon script
711e7b4a94 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"
2016-11-25 04:59:58 +01:00
l10n daemon script
0bcaf4f529 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"
2016-11-23 04:19:18 +01:00
David Edmundson
760fb53e7d Check for metadata validty in settingsFileChanged
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
2016-11-22 10:44:07 +00:00
Marco Martin
783f26e628 don't flip tabbar layout if vertical
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
2016-11-21 17:27:17 +01:00
andreas kainz
18ff230d81 remove radialGradient4857
BUG: 372383
2016-11-15 13:22:51 +01:00
Kai Uwe Broulik
a195a6b0b3 [AppletInterface] Never pull focus away from fullRepresentation
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
2016-11-15 10:31:03 +01:00
Aleix Pol
edbccc5fca Dependency resolution code was moved to KPackage
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
2016-11-08 16:50:18 +01:00
andreas kainz
76d137e594 Add keyboard icons for kimpanel thanks Yunhe Guo
REVIEW: 129098
2016-11-08 16:35:27 +01:00
andreas kainz
29aac77ca7 Add icons for Kimpanel and Fcitx from Yunhe Guo
REVIEW: 129091
2016-11-08 16:24:20 +01:00
Marco Martin
f37cc13614 Fix SVG icon ID prefix
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
2016-11-08 10:53:55 +01:00
David Edmundson
e615d15a4e Don't redeclare signal (and then not use it)
Fixes runtime warning

REVIEW: 129321
2016-11-07 12:45:07 +00:00
Marco Martin
62b0865492 make sure OSD doesn't have Dialog flag
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
2016-11-02 11:56:40 +01:00
Marco Martin
07ae9bbc46 set context proeprties before reloading the qml
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
2016-10-31 14:45:37 +01:00
Aleix Pol
6d47160367 Don't reparse the metadata file if it's already loaded
By doing so, we don't tie ourselves to the desktop format as well as we
leverage cached data.
Expose Plasma::Package::kPackage

REVIEW: 129278
2016-10-31 12:04:06 +01:00
David Faure
a940089a8f Fix crash when no QApplication is available.
This happens when QtCreator launches qmlplugindump.
Testcase: qmlplugindump -nonrelocatable org.kde.analitza 1.1
or qmlplugindump -nonrelocatable org.kde.okular 2.0

REVIEW: 128767
2016-10-30 12:31:25 +01:00
l10n daemon script
910e6a4ef7 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"
2016-10-30 09:15:51 +00:00
David Edmundson
c246588999 Don't show "Alternatives" menu by default
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
2016-10-26 12:36:59 +01:00
l10n daemon script
96bb3e7645 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"
2016-10-21 09:28:41 +00:00
Roman Gilg
65706d3878 New bool to use activated signal as toggle of expanded
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
2016-10-19 18:51:15 +02:00
Eike Hein
91eb0749ed Revert "port all output to QCDebug/QCWarning"
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
2016-10-19 03:16:16 +09:00
Marco Martin
acd7ab7815 port all output to QCDebug/QCWarning
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
2016-10-17 18:18:04 +02:00
Alberto Curro
f82d76eb2b Fixes for building plasma-framework with Qt 5.5
REVIEW: 129203
REVIEW: 129065
2016-10-17 16:46:41 +01:00
David Edmundson
07c978f619 Remove unused member var
REVIEW: 129104
2016-10-17 16:44:54 +01:00
Marco Martin
2b68e07658 make it actually build without kwayland
Change-Id: I864c771a2db7f3cdfb124729c5ae8739d2eec310
2016-10-17 14:25:50 +02:00
Aleix Pol Gonzalez
9e54853ac8 Use less deprecated API
Makes it easier to look at the compilation output.

REVIEW: 129150
2016-10-17 13:36:51 +02:00
l10n daemon script
05e86467c4 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"
2016-10-17 09:30:20 +00:00
l10n daemon script
8cc8753692 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"
2016-10-16 09:33:58 +00:00
Nuno Pinheiro
d209889ff8 4 more icons 2016-10-14 10:08:43 +01:00
Kai Uwe Broulik
e7e0344d35 [PluginLoader] Use operator<< for finalArgs instead of initializer list
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
2016-10-13 10:18:06 +02:00
Marco Martin
b0a5bc09ef use kwayland for shadows and dialog positioning
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
2016-10-11 17:21:57 +02:00
Aleix Pol
ba9a8a16ab Fix loading plasmoids by absolute path
We were not looking into the plugin directory when figuring out the applet
path.
Fixes configmodeltest

REVIEW: 129143
2016-10-11 15:22:41 +02:00
l10n daemon script
98b7f48a89 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"
2016-10-11 10:31:56 +00:00
Marco Martin
014979d8bf Revert "Fix loading plasmoids by absolute path"
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
2016-10-10 23:31:37 +02:00
Aleix Pol
2ed819f37d Fix loading plasmoids by absolute path
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
2016-10-10 21:30:02 +02:00
Aleix Pol Gonzalez
4a9d5cff2a Port some few remaining uses of pluginInfo to pluginMetaData
I forgot to do it in the previous RR.

REVIEW: 129100
2016-10-10 18:02:20 +02:00
Nuno Pinheiro
6b135f212c Remaining missing icons and network improvements 2016-10-10 16:32:00 +01:00
Nuno Pinheiro
5fcb1728c8 Merge branch 'master' of git.kde.org:plasma-framework 2016-10-10 15:44:29 +01:00
Nuno Pinheiro
18d5bd79aa network-wired-icons 2016-10-10 15:43:56 +01:00
Aleix Pol
0ebe2ca1fa Don't enforce metadata.desktop, cleanup constructor
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
2016-10-10 16:28:13 +02:00
Nuno Pinheiro
bedaa4835f fixing a bug in 5 series more tomorrow 2016-10-07 18:14:04 +01:00
Marco Martin
523e4c4c04 more complete air icon 2016-10-06 11:34:47 +02:00
Aleix Pol
bd970141ce Simplify plugin construction by relying exclusively on KPluginMetaData
REVIEW: 129057
2016-10-04 23:56:17 +02:00
David Edmundson
0f2bc677b9 Check defaultActionsCfg is valid
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
2016-10-04 22:08:58 +01:00
Eike Hein
89a3e34bd2 Move availableScreenRect/Region up to AppletInterface.
Summary:
Tested with Folder View and Simple Menu, both use cases (desktop
containment margins, strut-aware dialog placement) addressed.

Reviewers: #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D2932
2016-10-04 21:47:02 +09:00
David Edmundson
752626ad55 Don't load containment actions for embedded containments (system trays)
Also load the correct default actions for custom panels.

REVIEW: 129078
2016-10-03 11:45:32 +01:00
David Edmundson
048d5243f0 Update applet alternatives menu entry visibility on demand
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.
2016-10-03 01:46:33 +01:00
Aleix Pol
7429791309 Improve timetracker output
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
2016-09-29 12:32:11 +02:00
l10n daemon script
732b7d82a4 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"
2016-09-29 09:53:12 +00:00
Kai Uwe Broulik
b115ea1c55 [ToolButtonStyle] Fix menu arrow
This fixes the size of the icon as well as its color group.

REVIEW: 128870
2016-09-28 12:31:36 +02:00
David Rosca
1369bca36f Add removeMenuItem to PlasmaComponents.ContextMenu
REVIEW: 128999
2016-09-26 17:54:45 +02:00
andreas kainz
95f01093ac update ktorrent icon
BUG: 369302
2016-09-25 23:00:18 +02:00
l10n daemon script
19c89d0b0c 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"
2016-09-23 09:35:12 +00:00
Mihail Ivchenko
edf0d68ea5 [WindowThumbnail] Discard pixmap on map events.
According to [X.org
docs](http://www.x.org/releases/X11R7.7/doc/compositeproto/compositeproto.txt)
regarding NameWindowPixmap:

"This pixmap will remain allocated until freed, even if 'window' is
unmapped, reconfigured or destroyed. However, 'window' will get a new
pixmap allocated each time it is mapped or resized, so this request will
need to be reinvoked"

So, pixmap needs to be discarded not only on XCB_CONFIGURE_NOTIFY event
but on XCB_MAP_NOTIFY event also.
2016-09-22 21:29:42 +01:00
David Edmundson
494c690b18 Don't include kdeglobals when dealing with a cache config
The svg elements cache isn't really a "configuration" and it's not
something that should be overridden by global config settings.

Loading it as a simple config skips the cascading and saves reparsing
kdeglobals.

REVIEW: 128966
2016-09-21 11:43:50 +01:00
David Edmundson
16b478a827 Fix Plasma::knownLanguages
There was a logic error meaning this did the exact opposite of what
it should have been doing.

Fortunately no-one calls it anywhere.

REVIEW: 128959
2016-09-20 14:31:29 +01:00