Commit Graph

3739 Commits

Author SHA1 Message Date
Fredrik Höglund
42d3fde1ee windowthumbnail: Use gamma correct scaling 2018-03-27 16:42:18 +02:00
Fredrik Höglund
612494e2b2 windowthumbnail: Use mipmap texture filtering
Blit the contents of the TFP texture to a separate mipmap texture,
and (re)generate the mipmaps on each damage event.

This commit also fixes ARGB thumbnails being rendered as opaque.

Note that this commit only modifies the GLX path.

BUG: 390457
2018-03-27 16:42:18 +02:00
David Edmundson
6291c4852f remove anchors of item in a layout
Summary:
Having an anchor is undefined, and emits a warning in Qt5.11

Mostly it's used to vertically centre items. Some cases already had a
Layout.alignment property. In some cases it was added.

Reviewers: #plasma

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D11557
2018-03-21 19:12:23 +00:00
Jaime Torres
33ddaaa23f Reduce plasmashell frozen time
Summary:
Third part of https://phabricator.kde.org/D10627

According to the documentation at http://doc.qt.io/qt-5/qabstractnativeeventfilter.html

The type of event eventType is specific to the platform plugin chosen
at run-time, and can be used to cast message to the right type.

On X11, eventType is set to "xcb_generic_event_t", and the message can
be casted to a xcb_generic_event_t pointer.

The other eventType are "windows_generic_MSG" and "mac_generic_NSEvent".

No other eventType starts with an 'x'.

Reviewers: #frameworks, #plasma, mwolff, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: mwolff, plasma-devel, davidedmundson

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10670
2018-03-21 19:26:45 +01:00
Marco Martin
e3c5417799 preload only after the containment emitted uiReadyChanged
this way we are sure not to delay the panel load
2018-03-20 12:44:51 +01:00
l10n daemon script
a525489d5d 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"
2018-03-20 05:19:24 +01:00
Nathaniel Graham
3a66e9a0a5 Fix combobox breakage
Summary:
https://cgit.kde.org/plasma-framework.git/commit/?id=a21bc11fe11651f6d211489ebfc8435cef877194 erroneously added `renderType` properties to PlasmaComponents3 ComboBoxes, but QML ComboBoxes don't have this property, which broke Latte Dock's settings. This patch removes it.

BUG: 392026

Test Plan:
- Deployed, added Latte Dock, ran Plasmashell with and without `PLASMA_USE_QT_SCALING=1`, and with and without a HiDPI scale factor
- Opened Latte Dock's settings window. In all cases, Latte Dock's settings window appeared normally and all comboboxes rendered properly
- Opened Folder View settings and verified that all ComboBoxes there looked and worked fine, too

Reviewers: broulik, #plasma, mvourlakos, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D11484
2018-03-19 09:40:20 -06:00
l10n daemon script
5cd23ff55f 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"
2018-03-17 05:05:51 +01:00
Nathaniel Graham
a21bc11fe1 Fix text scaling with non-integer scale factors when PLASMA_USE_QT_SCALING=1 is set
Summary:
When `PLASMA_USE_QT_SCALING=1` is set, Plasma uses native Qt scaling. This works fine for integer scale factors, and fixes a lot of bugs (see [[https://bugs.kde.org/show_bug.cgi?id=356446|Bug 356446]]) but it introduces a new one: with non-integer scale factors, text becomes blurry and pixellated because of a bug in `Text.NativeRendering`: https://bugreports.qt.io/browse/QTBUG-67007

QQC2-desktop-style forces the use of `Text.QtRendering` rendering for non-integer scale factors, successfully working around the problem. But PlasmaComponents QML objects don't implement the same workaround, so we see the issue in Plasma. This patch fixes that, and gets us one step closer to being able to use Qt scaling in Plasmashell.

There is no effect when `PLASMA_USE_QT_SCALING=1` is not being used.

FIXED-IN 5.13
BUG: 391691
BUG: 384031
CCBUG: 386216
CCBUG: 391695
CCBUG: 391694
CCBUG: 385547
CCBUG: 391692
CCBUG: 356446

Test Plan:
Before: `PLASMA_USE_QT_SCALING=1` set, 1.2 scale factor: Plasma text looks awful:
{F5749797}

After: `PLASMA_USE_QT_SCALING=1` set, 1.2 scale factor: Plasma text looks amazing!
{F5749798}

Note that we still get sub-pixel anti-aliasing and good kerning. There appear to be no layout regressions.

Without both `PLASMA_USE_QT_SCALING=1` and a non-integer scale factor set, there is no visual change compared to the status quo.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: mart, broulik, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D11244
2018-03-16 16:26:38 -06:00
Marco Martin
5163e3e9ff new icons for disconnected/disabled devices
Summary:
there were some icons which conveyed meaning solely by color
which is discouraged by the hig
https://community.kde.org/KDE_Visual_Design_Group/HIG/Color
this makes use of the little x corner icons that are already
used somewhere in breeze (like muted microphone)
the exception is wireless off that has a bar, so a stronger
this is disabled message than wireless-disconnected

Depends on D10243
...which should go in asap

Test Plan: they all look readable at 100% zoom

Reviewers: #plasma, #vdg, andreask

Reviewed By: andreask

Subscribers: andreask, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D11390
2018-03-16 16:15:17 +01:00
Kai Uwe Broulik
049aa5677d [Dialog] Allow setting outputOnly for NoBackground dialog
I don't see why this would be silently discarded.
The input shape has nothing to do with the window mask (e.g. rounded border depending on theme).

Differential Revision: https://phabricator.kde.org/D11102
2018-03-15 13:07:11 +01:00
Kai Uwe Broulik
77bac859bc [ToolTip] Check file name in KDirWatch handler
KDirWatch::self() is a singleton so we would get change events also for other files like plasma-appletsrc needlessly reloading plasmarc all the time.

Differential Revision: https://phabricator.kde.org/D11326
2018-03-15 12:17:10 +01:00
l10n daemon script
f65393c68e 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"
2018-03-13 05:18:02 +01:00
Kai Uwe Broulik
7ea4c5c8c1 Add precision to fading fragment material shader also 2018-03-12 16:22:05 +01:00
David Edmundson
d196823f59 Add precision to fading material core frag shader 2018-03-12 14:30:23 +00:00
Roman Gilg
da64339eeb [Breeze Plasma Theme] Apply currentColorFix.sh to changed media icons 2018-03-07 15:52:33 +01:00
Kai Uwe Broulik
785bc44c7a [Breeze Plasma Theme] Add media status icons with circles 2018-03-07 11:16:21 +01:00
Roman Gilg
812b32fb05 Remove frames around media buttons
Summary:
We were inconsistent on that and it can get in way with placement on buttons.

Mirrors a change in Breeze icons.

{F5740901}

Reviewers: #frameworks, #plasma, ngraham

Reviewed By: #frameworks, ngraham

Subscribers: ngraham, mart

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D11050
2018-03-07 10:33:46 +01:00
Kai Uwe Broulik
48771a2912 [Window Thumbnail] Allow using atlas texture
It's not using any custom shaders anyway

Differential Revision: https://phabricator.kde.org/D11097
2018-03-06 15:13:11 +01:00
Kai Uwe Broulik
7e5dff648f [Dialog] Remove now obsolete KWindowSystem::setState calls
The comment says it's resolved in Qt 5.6.1+ but Frameworks depends on Qt 5.7 nowadays

Differential Revision: https://phabricator.kde.org/D10769
2018-03-06 14:42:08 +01:00
David Edmundson
02c4194534 Support Atlas textures in FadingNode
Summary:
Previously IconItem would create icons in new textures for animating. By
keeping them in the atlas not only do we avoid that, but we should
implicitly share the QSGTexture used for non-animating item.

Test Plan:
Moused over icon, it changed correctly
Set core profile, moused over an icon it changed correctly

Reviewers: #plasma

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D11091
2018-03-06 12:36:08 +00:00
David Edmundson
188be131bc Fix FadingMaterial fragment with core profile
Summary:
Currently it asserts. I'm sure it worked at some point.
Fixed to match shaders shipped with Qt.

Test Plan:
Set Core profile
Did crash
Now doesn't

Reviewers: #plasma

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D11090
2018-03-06 12:36:08 +00:00
Kai Uwe Broulik
8019cb369c [Icon Item] Remove unused variables
Differential Revision: https://phabricator.kde.org/D11077
2018-03-06 09:12:50 +01:00
Marco Martin
76da09bf31 use the new value for largeSpacing in Kirigami
new value is half what it was, agreed with the VDG
2018-03-01 22:09:48 +01:00
Nathaniel Graham
a8c347f255 Reduce visibility of PC3 TextField placeholder text
Summary: The PlasmaComponents TextField makes placeholder text light enough so that it doesn't compete with other UI elements, but the PC3 version does not. This patch fixes that.

Test Plan:
Before:
{F5734041}

After:
{F5734042}

Reviewers: mart, hein, #plasma

Reviewed By: mart, #plasma

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D10922
2018-02-28 11:10:04 -07:00
Nathaniel Graham
1d0e78b697 Don't make Titles 20% transparent either
Summary:
If it didn't make sense to have Headings be 20% transparent because nearby or child textual content would be darker (see D10899), then it //really// doesn't make sense to have Titles be 20% transparent, because then **all** the text is darker than the titles, which is really odd.

As with D10899, this brings Plasma in line with Kirigami, where the large titles are already 100% opaque.

Test Plan:
Widget Explorer title, before:
{F5732725}

Widget Explorer title, after:
{F5732726}

As with D10899, it's a very subtle change, so I don't expect anyone to //consciously// notice. But people's unconscious brains will probably say , "wow, text looks sharper and more readable now!", though they won't be able to articulate why.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D10902
2018-02-28 07:45:57 -07:00
Kai Uwe Broulik
4dda85971f [PackageUrlInterceptor] Don't rewrite "inline"
When omitting the third "location" argument of Qt.createQmlObject it will instead use "inline" [1]
as path and will run through the entire URL interceptor even logic.

[1] https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/qml/qml/v8/qqmlbuiltinfunctions.cpp#n1134

Differential Revision: https://phabricator.kde.org/D10870
2018-02-28 12:49:00 +01:00
Friedrich W. H. Kossebau
9168e1c79f API dox: remove duplicated deprecated comment 2018-02-27 23:25:11 +01:00
Friedrich W. H. Kossebau
f82d764ad7 API dox: Use @deprecated tag for deprecation comment 2018-02-27 23:24:57 +01:00
Nathaniel Graham
51d5f00920 Don't make Headings 20% transparent, to match Kirigami
Summary:
We [[https://cgit.kde.org/kirigami.git/commit/?id=95417dc1f9bea79cabffb95fa0a79621167a6106|recently removed Kirigami Headings' slight transparency]], after concluding that it looked inappropriate to have Headings with lighter text than their textual content. `PlasmaExtras.Heading` does the same thing, so we should make the same change here, both based on the inherent merits of the change, and also to maintain consistency with Kirigami.

This also slightly improves matters for people who complain about poor text contrast throughout Plasma.

Test Plan:
Browsed System Settings; headings are now ever so slightly darker (or lighter, for users of Dark themes)

Also, here are some befores-and-afters for a widget I'm working on that uses Headings. Before:
{F5732641}

After:
{F5732643}

It's subtle; you'll need to flip between the two with the arrow keys to see the difference, and may need to also zoom in ({key meta +})

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D10899
2018-02-27 12:12:57 -07:00
Marco Martin
3c5d6a9be8 don't put the fullrep in the popup if not collapsed
when preloading, if the applet is not collapsed,
the full representationshouldn't be put in the popup

reviewed-by: kbroulik
2018-02-26 14:42:01 +01:00
l10n daemon script
e80ebab9db 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"
2018-02-25 05:27:39 +01:00
Kai Uwe Broulik
48b62d1a27 [AppletQuickItem] Preload applet expander only if not already expanded
When an applet is placed on the desktop and already shows its full representation, like Weather applet,
don't create the expander item.
The DefaultCompactApplet shows the dialog when plasmoid.expanded which will be always the case and you end up with an empty
window randomly showing up on startup.

Differential Revision: https://phabricator.kde.org/D10764
2018-02-23 12:59:41 +01:00
Marco Martin
79fb4ebfa7 other preload microoptimizations
Summary:
make svgitem schedule a polish right when it's done loading

ScrollView now forces to layout items as soon is created, to preload items
before the window is shown

remove useless include

Test Plan:
possible to preload (almost) the whole systray with less hacks
on that part (see D10692)

Reviewers: #plasma, davidedmundson, broulik

Reviewed By: #plasma, broulik

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

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10722
2018-02-22 18:42:14 +01:00
David Edmundson
bf4facd8c1 Set IconItem default to smooth=true
Summary:
This changes between linear and nearest neighbour filtering.

Docs for QtQuick say:
In Qt Quick 2, this property has minimal impact on performance.

Generally we round to icon size anyway and resize the underlying images
anyway, so this will have no impact.

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10653
2018-02-21 13:39:42 +00:00
Marco Martin
8346b3e76a preload the expander (the dialog) too
Summary:
when preloading, preload the expander as well, and reparent the
full representation to it, so we have a scene schanged less.
also do a create() of that window (may be worth to do create()
automatically in every Dialog?)

Test Plan: the first open is visibly a lot faster now

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10681
2018-02-20 14:56:01 +01:00
Kai Uwe Broulik
fa9d4be5d1 [AppletQuickItem] Fix setting default preload policy if no environment variable is set
Also add a debug output so we can actually see what it's using
2018-02-20 11:17:33 +01:00
Michail Vourlakos
1ff405cca5 fix RTL appearance for ComboBox
Summary:
-- when the combobox isnt inside the main Item
but rather a sub-Item it doesnt inherit the
LayoutMirroring properties. This is a workaround
to handle that behavior.
QTBUG: https://bugreports.qt.io/browse/QTBUG-66446

Test Plan:
checkout that LayoutMirroring works properly in
such case

Reviewers: #plasma, mart, safaalfulaij

Reviewed By: safaalfulaij

Subscribers: safaalfulaij, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10592
2018-02-19 20:44:37 +02:00
Marco Martin
6cbea20bf9 try to preload certain applets in a smart way
Summary:
preload popups of some applets after init in the background
based on a value of X-Plasma-PreloadWeight in the desktop file
if present, otherwise some default values based on the applet
type (Provides)

Save the weight in the config, if an applet is never opened,
slowly decrease the weight, when it reaches 0 don't preload it
next start, increase every time it gets opened, so at the moment
it's quite aggressive about preloading, in order to not do it
a lot of plasma startups without touching the applet are needed

Applet with a very big weigth will be preloaded immediately,
therefore having an impact on the time it will take to have
a panel visible and usable, while lesser weigths will preload
after a random number of seconds between 2 and 10, so will load
in the background after everything is started

Test Plan:
Plasma starts up correctly, applets load correctly and can be added
correctly both those expanded or collapsed.
plasmashell appears correctly usable without too big hiccups even
while it's loading things in the background

some numbers:
without preloading, plasma takes around 64 mb of memory after startup
when preloading everything about 94, so it's a cost of about 30 mb
which is not negligible.
don't have precise timing, but if everything gets preloaded immediately,
the time to get an usable desktop appears to be at least doubled,
while the delayed preloading (except just a couple of applets) doesn't
seem to have a big impact on the time needed to get an usable desktop

Reviewers: #plasma

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

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10512
2018-02-19 18:34:24 +01:00
Kai Uwe Broulik
c05b1bdec7 [Icon Item] Set filtering on FadingNode texture
Ensures the fading node's texture has the same filtering as the regular node,
otherwise during transition the icon could show scaling artefacts.

Differential Revision: https://phabricator.kde.org/D10533
2018-02-15 13:32:57 +01:00
Aleix Pol
581dc48ff8 Initialize m_actualGroup to NormalColorGroup
Reviewers: #frameworks, dfaure

Reviewed By: dfaure

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D10464
2018-02-13 15:32:03 +01:00
Aleix Pol
3e4b26452a Make sure the FrameSvg and Svg instances have the right devicePixelRatio
Summary:
On wayland (at least) it's initialized when the window is assigned, so
we need to listen to the itemChanged to adopt it.

Test Plan: manual testing

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: hein, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10420
2018-02-12 14:37:23 +01:00
l10n daemon script
fde1a97636 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"
2018-02-04 05:15:50 +01:00
Aleix Pol
a02e91a271 Define property in Units.qml for the Plasma styles
Summary: Much like it is specified by kirigami itself

Test Plan: Now I don't get a warning

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10225
2018-02-01 19:57:45 +01:00
Friedrich W. H. Kossebau
551e92b10f Include cstdlib for std::free
clang/freebsd can has satisfaction that way (hopefully)
2018-01-31 23:55:45 +01:00
Fredrik Höglund
46121d5848 windowthumbnail: Fix the GLXFBConfig selection code
Check that the sizes of the color channels in the fbconfig match those
in the window visual.

This fixes a 2-10-10-10 fbconfig being choosen for the ARGB32 visual.

Differential Revision: https://phabricator.kde.org/D10173
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Acked-by: David Edmundson <kde@davidedmundson.co.uk>
2018-01-31 14:56:54 +01:00
Kai Uwe Broulik
f6de326fdf Revert "[Plasma Dialog] Call window effects only if visible"
Apparently causes background contrast to not work on startup, let's just revert this
and figure out a proper solution later.

BUG: 389352

This reverts commit f3cd5d55fa.
2018-01-26 20:33:09 +01:00
Kai Uwe Broulik
f31e7860d9 [Default Tooltip] Fix sizing
Unset the Label's default height which completely confuses the renderer either shifting the item vertically (e.g. when toggling
system tray popup), or letting it get too wide (e.g. when moving from a two-line tooltip to a one-line tooltip).
Also let the Layouts figure out sizing rather than trying to overrule it with flaky values.

BUG: 386260
BUG: 389371

Differential Revision: https://phabricator.kde.org/D10077
2018-01-26 15:49:06 +01:00
Marco Martin
f906178713 parametrize qqc2 version
Summary:
for styles in order to work at all they need to import
the latest available qqc2 version installed in the system
or any app using new qqc2 feature will fail to load.
do like in qqc2-desktop-style and set the import version
at build time

Test Plan: all generated files have 2.3 here as version and apps using qqc2 still oload

Reviewers: #plasma, bshah

Reviewed By: #plasma, bshah

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D10074
2018-01-24 13:32:35 +01:00
Marco Martin
af00946f81 don't multiply svg sizes by devicepixelratio
Summary:
when the native high dpi scaling is enabled, some things gets scaled two times,
as sizes taken from svgs should *not* be manually scaled by devicePixelRatio

Test Plan:
works correctly on wayland, svg.elementSize will have to be tweaked in x11 to
return a value scaled by scalefactor, to homogenize the behavior compared to
native qt high dpi scaling.
to return a value scaled by scalefactor for this qml code to work there too.
I advise everybody with high dpi laptops to test this on both wayland and x11

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

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

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9286
2018-01-23 15:58:55 +01:00
Kai Uwe Broulik
f3cd5d55fa [Plasma Dialog] Call window effects only if visible
It spends 160ms in total on plasmashell startup for me here.

Differential Revision: https://phabricator.kde.org/D9223
2018-01-23 12:45:53 +01:00
Kai Uwe Broulik
9870027494 [Plasma Theme] Guard against invalid KPluginInfo object
BUG: 389152

Differential Revision: https://phabricator.kde.org/D9961
2018-01-22 11:10:11 +01:00
Randy Kron
5eece6769f Fix one source of log spam referenced in Bug 388389 (Empty filename passed to function)
Summary:
I found two places in plasma-framework svg.cpp (Plasma::Svg) that were triggering this message.

path variable was not being checked for empty before passing to QFile::exists().

This seems to be one source of the issue reported in [[ https://bugs.kde.org/show_bug.cgi?id=388389 | Bug 388389 ]]

Test Plan: Found that kicker was triggering this message and also plasmashell tooltips.

Reviewers: #frameworks, davidedmundson

Reviewed By: davidedmundson

Subscribers: ngraham, alexeymin, aacid, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D9928
2018-01-20 22:26:16 +00:00
Alexander Akulich
55efe5ae63 [Calendar] Adjust the calendar toolbar anchors
Summary:
Horizontally align the toolbar row to the days/month/etc grid canvas.

(The bar was used to be a few pixels wider)

Test Plan:
Before: {F5514329}

After: {F5514330}

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

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

Tags: #frameworks, #plasma

Maniphest Tasks: T7499

Differential Revision: https://phabricator.kde.org/D9019
2018-01-16 13:57:22 +03:00
Friedrich W. H. Kossebau
85193f8c75 API dox: Use code markup for described dataUpdated slot signature 2018-01-16 11:42:20 +01:00
Kai Uwe Broulik
94b91f723a [ConfigModel] Set QML context on ConfigModule
This will have the ConfigModule use the same engine as we do, ensuring we use the correct QtQuick Controls style.

BUG: 388766

Differential Revision: https://phabricator.kde.org/D9785
2018-01-15 10:32:40 +01:00
Kai Uwe Broulik
639e8684e3 [Icon Item] Treat sources starting with a slash as local file
We have a special case for sources starting with "file://" but a "/" also represents an absolute path and shouldn't
conflict with icon theme names.
Kicker sets a custom image as local path and then we would end up trying to load it as a QIcon::fromTheme eventually.
This will cause the implicit size of the icon item to stay at its default as we only check a custom implicit size
for a source QImage or an SVG. Moreover, this potentially introduces scaling artefacts.

Differential Revision: https://phabricator.kde.org/D9812
2018-01-15 10:22:18 +01:00
Michail Vourlakos
547dade2f8 fix RTL appearance for ComboBox
Summary:
--PlasmaComponents3.ComboBox now appears correctly
its list items in RTL environments by aligning them
to the right

BUG: 387558

Test Plan:
check the combobox list both in RTL and LTR environments
in order to confirm that the list items are aligned correctly

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: mart, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9275
2018-01-13 03:24:14 +02:00
Laurent Montel
d1949d9149 Const'ify, use nullptr 2017-12-25 18:41:50 +01:00
Kai Uwe Broulik
3889edd6d6 [Air theme] Add task bar progress graphic
This adds a dedicated, green, task bar progress graphic.
Currently there isn't and as a fallback it uses the hover graphic.

BUG: 368215

Differential Revision: https://phabricator.kde.org/D9324
2017-12-22 11:17:31 +01:00
Marco Martin
c318fde313 make packageurlinterceptor as noop as possible
Summary:
minimize file access during url rewrite

we still need it for accessing stuff under code/

Test Plan: plasma still loads, seems to save ~2%

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

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

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9124
2017-12-18 13:00:31 +01:00
Eike Hein
2956419c7e Revert "Don't tear down renderer and other busy work when Svg::setImagePath is invoked with the same arg"
This reverts commit 4ce50cc61f.

This caused a regression with toggling compositing, causing SVG reloads
with the same path to switch to opague elements. As this revision was
meant as a performance optimization, it can be reverted with no other
consequence for now.
2017-12-16 20:16:38 +09:00
Marco Martin
e3fba25754 move kirigami plasma styles here
solves a nasty dependency loop
(and kirigami is supposed to be tier1)
2017-12-14 12:56:06 +01:00
Montel Laurent
d14d50a668 Add more explicit 2017-12-13 07:52:10 +01:00
Montel Laurent
7f0c023d3f Use nullptr + add explicit 2017-12-13 07:36:22 +01:00
l10n daemon script
6195342df2 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-12-13 06:58:55 +01:00
Marco Martin
b2f61f8e3c disappearing scrollbars on mobile
Summary:
like other platforms, on mobile devices make scrollbars visible only when
dragging/flicking, behavior on desktop unchanged
it introduces a runtime dependency on kirigami, but was already kinda there
but broken as the Settings singleton was already used.
if this can't be done, i'll add something in plasmacore which reads as well the
QT_QUICK_CONTROLS_MOBILE environment variable

Test Plan: scrollbar disappearing with the variable set, normal behavior otherwise

Reviewers: #plasma, bshah, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9287
2017-12-12 15:42:47 +01:00
Marco Martin
604aba0e24 reuse KPackage instance between PluginLoader and Applet
Summary:
to minimize metadata lookups, pass the kpackage created in pluginloader
to the applet itself as args. the args structure will be used only by the
internal constructor and applet sublasses will get their args unaltered

Test Plan:
plasma loads correctly, from 3 kpackage instantiation per applet to 2
(last is in the access manager)

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9123
2017-12-09 10:37:08 +01:00
Kai Uwe Broulik
3ad4798ca6 [AppletQuickItem] Only set QtQuick Controls 1 style once per engine
The style is global per engine, there's no need to set it for every applet created
as the engines are shared.
Since this entire thing is just a hack, just setting a dynamic property to identify
that we've set a style is valid imho.
Also turn it into a plain QtObject since we don't need a fully-fledged Item.

Differential Revision: https://phabricator.kde.org/D4362
2017-12-05 23:35:07 +01:00
Eike Hein
78f83f5c77 Don't set a window icon in Plasma::Dialog
Summary:
Setting a window icon is costly enough to be worth avoiding when it's
not actually needed.

This is a resurrection of David's old patch:

https://git.reviewboard.kde.org/r/128484/

The concerns in the old discussion that led to its rejection are no
longer valid today: In the meantime we implemented a way for apps to
announce their .desktop file in a window hint, which KWin (and libtm)
will fall back to to look up an icon if not set. As plasmashell does
this, we can drop the setIcon call here and won't regress.

Test Plan:
The pinned systray popup dialog still gets the Plasma icon in the
Present Windows effect.

Reviewers: #plasma, #frameworks, davidedmundson, graesslin

Subscribers: plasma-devel

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9209
2017-12-06 02:28:47 +09:00
Michail Vourlakos
71f8f16fea [RTL] - align properly the selected text for RTL
Summary:
--align selected text correctly for
PlasmaComponents2.ComboBox taking into account
RTL.

BUG: 387415

Test Plan:
use ComboBoxes in RTL and LTR in order
to check a proper behavior

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: broulik, plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9126
2017-12-05 19:13:40 +02:00
Eike Hein
f75816a33a Initialize scale factor to the last scale factor set on any instance
Summary:
Plasma::Svg initializes SvgPrivate::scaleFactor to 1.0. On systems with
a higher value for Units:devicePixelRatio, that means Svg::setScaleFactor
gets called with a different value right after instanciation and a fair
amount of work is done twice.

This patch introduces a static SvgPrivate::s_lastScaleFactor,
initialized to 1.0 but updated in Svg::setScaleFactor.
SvgPrivate::scaleFactor is then initialized to the static every time
its instanciated. That means after the first time Svg::setScaleFactor
is called with e.g. 2.0, subsequent Svg instances get initialized
with 2.0.

This ends up shaving a decent amount of time off of startup on scaled
systems.

Reviewers: #plasma, davidedmundson, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9119
2017-12-04 04:56:19 +09:00
Eike Hein
73b6d92258 Revert "Initialize scale factor to the last scale factor set on any instance"
This reverts commit 15f470fafc.
2017-12-04 03:00:53 +09:00
Eike Hein
a570254e1a Don't update when the underlying FrameSvg is repaint-blocked
Summary:
When the component completes `FrameSvg::setRepaintBlocked(false)`
is called, which calls `updateFrameData`, which emits
`repaintNeeded`, which is connected to `doUpdate` anyway.

This saves one `doUpdate` per instanciation. The reason for that
is as follows:
* The concept or repaint blocking is implemented in `FrameSvg`,
  which inherits from `Svg`.
* The `repaintNeeded` signal connected to `doUpdate` is the one
  in `Svg`.
* `Svg` code emits `repaintNeeded` liberally even when repaints
  are blocked, since it doesn't know anything about this.

Hence we check if repaints are blocked in doUpdate and abort,
implementing the QQmlParserStatus interface in the right class.

Reviewers: #plasma, davidedmundson, mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9138
2017-12-04 00:12:11 +09:00
Eike Hein
15f470fafc Initialize scale factor to the last scale factor set on any instance
Summary:
Plasma::Svg initializes SvgPrivate::scaleFactor to 1.0. On systems with
a higher value for Units:devicePixelRatio, that means Svg::setScaleFactor
gets called with a different value right after instanciation and a fair
amount of work is done twice.

This patch introduces a static SvgPrivate::s_lastScaleFactor,
initialized to 1.0 but updated in Svg::setScaleFactor.
SvgPrivate::scaleFactor is then initialized to the static every time
its instanciated. That means after the first time Svg::setScaleFactor
is called with e.g. 2.0, subsequent Svg instances get initialized
with 2.0.

This ends up shaving a decent amount of time off of startup on scaled
systems.

Reviewers: #plasma, davidedmundson, broulik

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9119
2017-12-04 00:03:46 +09:00
Kai Uwe Broulik
fae6558dae Move if check inside #ifdef
This way we're not doing a contains() and then not do anything
2017-12-03 15:00:14 +01:00
Kai Uwe Broulik
ab8915bc12 [FrameSvgItem] Don't create unneccessary nodes
If a border isn't enabled there's no point in creating a node for itIf a border isn't enabled there's no point in creating a node for it.

Differential Revision: https://phabricator.kde.org/D9121
2017-12-03 12:40:31 +01:00
Eike Hein
4ce50cc61f Don't tear down renderer and other busy work when Svg::setImagePath is invoked with the same arg
Summary:
During my plasmashell startup this saves time for 17 calls. Opening
something like Simple Menu saves another ~dozen.

It's worth investigating why Svg::setImagePath gets called repeatedly
with the same args to begin with, but this is worth doing anyway.

Reviewers: #plasma, davidedmundson, mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma, #frameworks

Differential Revision: https://phabricator.kde.org/D9115
2017-12-03 06:45:47 +09:00
Ben Cooksley
df09180d31 The #warning directive is not universal and in particular is NOT supported by MSVC
Remove the directive to restore compilation on Windows.
Ref D9108

CCMAIL: aleixpol@kde.org
2017-12-03 07:03:09 +13:00
Kai Uwe Broulik
f8e3a16040 [IconItem] Use ItemSceneHasChanged rather than connect on windowChanged
Saves a connection and also only schedule if we actually have a window.

Differential Revision: https://phabricator.kde.org/D9111
2017-12-02 18:13:19 +01:00
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