Commit Graph

14610 Commits

Author SHA1 Message Date
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
l10n daemon script
6f02cf215b 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-26 05:55:37 +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
David Rosca
148ff6311b IconItemTest: Fix loadPixmap and loadImage tests
It only works on CI because data/test_image.png size
is the same as implicitSize of IconItem (KIconLoader::Dialog).

Differential Revision: https://phabricator.kde.org/D4702
2017-02-21 12:04:41 +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
Sebastian Kügler
8e8c5d4513 Use QtQuickControls button, instead of PlasmaComponent's
Reviewed-by: notmart
2017-02-11 15:37:42 +01:00
l10n daemon script
6a3813acd6 Upgrade KF5 version to 5.32.0. 2017-02-11 10:42:39 +00: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
c32b01a6da Upgrade Qt5 version requirement to 5.6.0. 2017-02-05 12:39:02 +00: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
l10n daemon script
86143c61d7 Upgrade ECM and KF5 version requirements for 5.31.0 release. 2017-02-04 18:37:42 +00: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