Commit Graph

14884 Commits

Author SHA1 Message Date
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
l10n daemon script
a9161892b1 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-03-12 05:35:11 +01:00
l10n daemon script
412ea61adf Upgrade KF5 version to 5.33.0. 2017-03-11 20:21:45 +00: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
l10n daemon script
7af319fc5e Upgrade ECM and KF5 version requirements for 5.32.0 release. 2017-03-03 13:14:02 +00: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
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