Commit Graph

3609 Commits

Author SHA1 Message Date
Kai Uwe Broulik
da2b6e270f [Icon Item] Explicitly emit overlaysChanged in the setter rather than connecting to it
There's literally just one place where this thing changes so just emit the signal
there and call it a day.

Differential Revision: https://phabricator.kde.org/D9112
2017-12-02 18:13:19 +01:00
Aleix Pol
1f9b5ed657 Performance
Summary:
Remove splitting + joining of a string just to remove the beginning of a
string.
Remove double look-up.
Solves Clazy warnings

Reviewers: #frameworks, #plasma, hein

Reviewed By: #plasma, hein

Subscribers: hein, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9109
2017-12-02 16:22:03 +01:00
Aleix Pol
b8b8a69fd1 Remove implicit string casting
Summary: Follow the KF5 guidelines

Test Plan: Plasma shell starts

Reviewers: #plasma, #frameworks, sebas

Reviewed By: #plasma, sebas

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9108
2017-12-02 15:44:14 +01:00
Kai Uwe Broulik
cfcf8a61d5 [Dialog] Use KWindowSystem::isPlatformX11()
Rather than doing a string comparison and doing it every time

Differential Revision: https://phabricator.kde.org/D9105
2017-12-02 12:54:48 +01:00
Aleix Pol
f8047e86b2 Reduce the amount of spurious property changes on ColorScope
Summary:
At the moment whenever something changed we were emitting colorGroupChanged
and then every color would recompute. This would end up being emitted
over 10 times at plasma startup so far.
This patch makes sure that the property will only be emitted if the color
group actually changes.

Test Plan:
Ran plasma, didn't notice issues.
I don't see all of the changes on the property anymore

Reviewers: #plasma, mart, davidedmundson

Reviewed By: #plasma, mart

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8917
2017-12-02 12:45:57 +01:00
Kai Uwe Broulik
9066c232b4 [Icon Item] Emit validChanged only if it actually changed
Differential Revision: https://phabricator.kde.org/D9102
2017-12-02 11:40:02 +01:00
Eike Hein
4779f9564a Suppress unnecessary scroll indicators if the flickable is a ListView with known orientation
Summary:
ListView.atYEnd is notoriously buggy and sometimes will cause indicators
to blink in and out of existence where not needed.

Reviewers: #plasma, mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9089
2017-12-01 23:35:19 +09:00
Kai Uwe Broulik
fa3a389925 [AppletInterface] Emit change signals for configurationRequired and -Reason
Differential Revision: https://phabricator.kde.org/D9066
2017-11-30 16:51:26 +01:00
Kai Uwe Broulik
b6b81c67b3 Use setSize() instead of setProperty width and height
We know we have a QQuickItem so we can just use its methods directly and then also use setSize
which does both at once, saving intermediate signal emission and potential re-layouting

Differential Revision: https://phabricator.kde.org/D9068
2017-11-30 14:18:06 +01:00
Montel Laurent
5d9aa6816f We depend against 5.7 2017-11-29 21:10:48 +01:00
David Faure
d3ed3bcbbf GIT_SILENT remove confusing comment. There's no ref() happening here. 2017-11-25 23:19:42 +01:00
Kai Uwe Broulik
facaaf93d0 [PlasmaComponents Menu] Set WA_TranslucentBackground on the underlying QMenu
This ensures the menu can have nice round corners with Breeze and Oxygen. The same had already been done in ContainmentInterface's menu.

CHANGELOG: Fixed an issue where PlasmaComponents Menu would appear with broken corners

CCBUG: 381799

Differential Revision: https://phabricator.kde.org/D8965
2017-11-24 10:40:48 +01:00
Kai Uwe Broulik
f395097fe9 [Containment Interface] Set WA_TranslucentBackground before accessing winId()
This would create the surface after which this flag has no effect causing menus to have black rounded corners.

CHANGELOG: Fixed an issue where context menus would appear with broken corners

CCBUG: 381799

Differential Revision: https://phabricator.kde.org/D8963
2017-11-24 10:40:16 +01:00
David Faure
1d01cd4393 API docs: add deprecation notice found in the git log 2017-11-23 21:48:41 +01:00
Bhushan Shah
0f0b544992 Fix the cmake configuration
It should use find_dependency and not find_package.
2017-11-23 20:29:52 +05:30
Jonathan Riddell
945124d6d4 find Plasma config before using it, neon lintcmake https://build.neon.kde.org/job/xenial_unstable_frameworks_plasma-framework_lintcmake/99/testReport/libkf5plasma-dev/KF5PlasmaQuick/find_package/ 2017-11-23 13:25:42 +00:00
Aleix Pol
28d9c7146e Remove double lookup 2017-11-20 16:13:46 +01:00
Aleix Pol
3e17a2d0a2 Remove duplicate boilerplate code
Summary: Don't replicate logic present in ::colorGroup for every color() call

Reviewers: #plasma, #frameworks, mart

Reviewed By: #plasma, mart

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8914
2017-11-20 16:12:41 +01:00
Aleix Pol
aa4aa72d63 Synchronize the component with the one in Kirigami
Summary: Using the height property together with paintedHeight had binding loops.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: broulik, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8870
2017-11-20 13:07:15 +01:00
Aleix Pol
11c9206bf6 Reduce spurious signal emissions
Summary:
We were reporting that the margins were changing whenever anything changed
in a FrameSvg, this patch makes sure we are only reporting the changes
when it actually changes.
This also fixes a binding loop in Desktop.qml from plasma-desktop.

BUG: 382233

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

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

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8809
2017-11-16 16:18:04 +01:00
Andras Mantia
eab0378735 Add signals indicating if a screen was added or removed
Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D8566
2017-11-13 16:35:20 +02:00
Marco Martin
9ea4774050 install Switch stuff 2017-11-13 15:31:03 +01:00
Aleix Pol
ceca6ffa01 Don't rely in includes of includes
QFontMetrics is used by theme.cpp
2017-11-07 21:16:08 +01:00
Kai Uwe Broulik
3ebdd64e6b Optimize SortFilterModel role names
* Reserve m_roleIds
* Avoid double lookup contains+value but use default value argument
* Constify

Differential Revision: https://phabricator.kde.org/D8639
2017-11-06 15:17:42 +01:00
Kai Uwe Broulik
d51456bdfc Remove DataModel::roleNameToId
It is unused and returned -1 whereas SortFilterModel would return Qt::DisplayRole

Differential Revision: https://phabricator.kde.org/D8638
2017-11-06 15:17:15 +01:00
Marco Martin
fc653a70a9 manually draw the circle arc
don't use the qqc2 private implementastion as change and will
break with Qt 5.10
2017-10-31 13:45:39 +01:00
l10n daemon script
6f75aa63d2 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-10-27 04:46:40 +02:00
Kai Uwe Broulik
c52a6c5748 [PlasmaComponents Menu] Add ungrabMouseHack
Ensures the PlasmaComponents.Menu doesn't confuse MouseArea states.

Differential Revision: https://phabricator.kde.org/D8445
2017-10-25 15:09:49 +02:00
l10n daemon script
ac3cbe0397 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-10-24 05:08:50 +02:00
Kai Uwe Broulik
dea8a1ed5f [FrameSvg] Optimize updateSizes
frame->fooHeight is the same as frame->fooFixedHeight if the border is enabled, we only meddle
with margins, not heights. Thus we can just do the lookup once and re-use the value.

Also store the hintFooMargin instead of doing the same exact lookup once for fixed
and once for non-fixed margins.

Differential Revision: https://phabricator.kde.org/D8135
2017-10-16 11:38:09 +02:00
Martin Flöser
ecd00a565a Don't position a Dialog if it's of type OSD
Summary:
The OSDs are positioned by the Wayland compositor. This fixed the issue
found in D8268.

Reviewers: #frameworks, #plasma

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8304
2017-10-15 10:09:19 +02:00
Fabian Vogt
4f43c236e3 Fix org.kde.plasma.calendar with Qt 5.10
Summary:
Module internal types are not implicitly available anymore simply by placing
them inside the module's main directory. It is now necessary to mention them
as internal types in the qmldir file.

See qtdeclarative commits 22a2cc43387ec3b9f74a6c01f8665378a4541147 (introduced
the change) and 930aea8b9ca59a24838cf7f279653e3b2ee40cee (explanation)

Test Plan:
Built whole stack with Qt 5.10. The digital clock plasmoid does not
load due to the DaysCalendar type not being available. With these changes to
qmldir and a reload of the plasmoid it works.

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, #frameworks, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8077
2017-10-01 23:06:24 +02:00
Kai Uwe Broulik
c1e432065f sceneGraphBackend() is new in Qt 5.9 2017-09-29 10:48:37 +02:00
Kai Uwe Broulik
bb6b170516 [FrameSvgItem] Iterate child nodes properly
Documentation says "Children are stored internally as a linked list, so iterating over the children via the index is suboptimal."

Differential Revision: https://phabricator.kde.org/D8046
2017-09-28 23:05:36 +02:00
Marco Martin
9e7d02cde2 pick up the proper positive/neutral/negative colors 2017-09-28 16:14:33 +02:00
Kai Uwe Broulik
cab8fd9160 [Containment Interface] Don't add containment actions to applet actions on desktop
For a panel it makes sense to have panel options easily available on every applet
but on the desktop you typically have some free space to access the containment actions.

This is especially confusing if you have a Folder View on your Folder View desktop
and end up with a "Folder View Options" menu that affects the desktop behind it rather than the applet.

Differential Revision: https://phabricator.kde.org/D8009
2017-09-28 14:09:52 +02:00
David Edmundson
6df656252b Add new component for the greyed out labels in Item Delegates.
Summary:
Plasma code is full of Label {opacity: 0.6}. We shouldn't be hardcoding
style into a UI, especially with magic numbers.

This adds a new component that does the same thing but will allow
plasmoids to write more semantic code.

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: hein, sebas, broulik, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D4831
2017-09-27 15:50:57 +01:00
David Edmundson
daef5c8b6b Fix FrameSVGItem with the software renderer
Summary:
Software rendering (at time of writing Qt5.10) doesn't seem to like our
tiling/stretching in the 9-tiles.
Also when using QPainter it's arguably faster to create and cache
pixmaps of the whole frame, which is what the slow path of FrameSVGItem
does.

Test Plan: Ran FrameSVG test then plasma shell with scene device set

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8013
2017-09-27 15:50:49 +01:00
David Edmundson
94235482f9 Don't animate IconItem in software mode
Summary:
IconItem uses a gorgeous shader to fade between two states. This doesn't
work with software rendering.

Given software rendering is a second class citizen, just skip the
animation.

Test Plan:
Hovered over kickoff.
Went from one to the other, without temporarily disappearing

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D8014
2017-09-27 15:50:44 +01:00
l10n daemon script
07272a2b98 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-09-27 09:05:33 +02:00
Kai Uwe Broulik
46a8d86ee8 [FrameSvg] Use new-style connect
Reviwed-By: d_ed
2017-09-21 14:33:28 +02:00
Marco Martin
b62118c90c possibility to set an attached colorscope to not inherit
this makes an easy bridging between the plasma and kirigami theming
reviewed-by:Eike Hein
2017-09-19 16:42:08 +02:00
David Edmundson
ee2b12be04 Add extra visual indicator for Checkbox/Radio keyboard focus
Summary:
This draws a line underneath a Plasma checkbox label when it has
keyboard focus. This is needed as when an item is checked, the focus
shadow is practically invisible.

Visuals when clicking is completely unchanged
This brings it more in line with our QStyle.

Test Plan: Attached runtime tests

Reviewers: #plasma, #vdg, mart

Reviewed By: #plasma, mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D7819
2017-09-19 13:50:44 +01:00
Marco Martin
3942c5279e don't recreate a null pixmap
if we already have a null pixmap, don't recreate a new one

this saves some pixmap ceation on destructors
reviewed-by:davidedmundson
2017-09-19 13:57:12 +02:00
Kai Uwe Broulik
c707f6074c Remove unused functions
You can just use mapToItem(null, 0, 0)
2017-09-18 15:12:45 +02:00
Kai Uwe Broulik
7482bef085 Pass item to rootObject() since it's now a singleton
The "parent" used to be resolved by the place where the utils.js was imported from.
However, it was changed into a singleton and now this didn't work.

BUG: 384776
2017-09-18 15:11:09 +02:00
David Edmundson
7141ad1721 Don't list tab names twice
Summary:
The name (with a correct role) is already exported as a tab

By having the static text internally we get the name twice when we do a
flat review of the controls.

Reviewers: #plasma

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D7815
2017-09-14 14:50:57 +02:00
Marco Martin
6bb474621e don't accept active focus on tab
this was actually breaking keyboard navigation
see https://bugreports.qt.io/browse/QTBUG-63176
for our use case in pasmashell, it's better to just
rely on focus of the internal items or of the
ListView
reviewed-by: davidedmundson
2017-09-13 13:43:19 +02:00
Marco Martin
48e27b5493 register revision 1 for QQuickItem
make the base properties of revision 1 available
2017-09-13 11:29:04 +02:00
Safa AlFulaij
940adc7e6e [Plasma Components 3] Fix RTL in some widgets.
Summary: Some widgets are missed up in RTL mode, this should fix it.

Reviewers: #plasma, #frameworks, mart

Reviewed By: #plasma, mart

Subscribers: mart, broulik, davidedmundson, plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D7715
2017-09-10 10:42:51 +03:00