Commit Graph

4512 Commits

Author SHA1 Message Date
Konrad Materka
1330b0279c Add RESET to globalShortcut property
BUG: 431006

FIXED-IN: 5.79.0
2021-01-02 16:20:17 +01:00
Jan Blackquill
f3bab49d03 Expose error information to error plasmoid in a more structured manner 2021-01-02 02:05:53 +00:00
David Edmundson
2c07c2a455 [components] Hook up Mnemonics
Currently in buttons and tabs the mnemonics were shown, but never
actually attached to do anything.

This copies code from QQC2-desktop-style and creates an explicit
shortcut.
2020-12-31 12:41:33 +00:00
David Edmundson
c1560df1cc [svg] Always start SvgRectsCache timer from the correct thread
Plasma::Svg is used in from the render thread in updatePaintNode of
various Plasma::*Item classes.

At this point the GUI thread is blocked, so it's probably safe, but it's
still spamming the log file like crazy.
2020-12-31 10:59:54 +00:00
Kai Uwe Broulik
85f136ff41 [PC3 ProgressBar] Set binding for width
Otherwise the progress bar will never update its size when it was indeterminate
at one point..

BUG: 430544
2020-12-29 17:35:05 +00:00
Johnny Jazeix
4d2d834583 fix Windows build + inversion of variables 2020-12-27 10:48:58 +00:00
Friedrich W. H. Kossebau
fb105c6feb Port away from deprecated signal KIO::MimetypeJob::mimetype
NO_CHANGELOG
2020-12-25 01:03:30 +01:00
David Edmundson
1a1e32bff3 [PlasmaComponents/TabGroup] Fix check if item inherits from Page
TabGroup had a feature where if the item inserted in the stack was a
PlasmaComponents.Page it would update a property.

The check that this property exists was previously bogus leading to
errors if TabGroup was used with non-Page items that happened to have
the same property, such as Loader
2020-12-23 01:23:43 +00:00
Carson Black
e03b9bf081 Port various components to veryShortDuration on hover 2020-12-21 14:16:16 -05:00
Carson Black
7622e09bc0 Move ListItems to use veryShortDuration for hover instead of longDuration
This will generally make UIs using ListItems feel more responsive
2020-12-21 14:00:23 -05:00
Carson Black
aecf9237cc Add veryShortDuration
This adds an veryShortDuration for UI elements that should animate near instantly, but should have a hint of smoothness.
2020-12-21 14:00:22 -05:00
Nate Graham
ddac70f40c Fix typo in 1cb14c21a9 2020-12-19 08:03:24 -07:00
Albert Astals Cid
ec41734969 Remove ifdefs, we require Qt 5.14 now 2020-12-18 21:46:01 +01:00
Friedrich W. H. Kossebau
34a077f741 Unbreak build: add (now) missing <array> include
GIT_SILENT
2020-12-18 06:54:34 +01:00
Nate Graham
1cb14c21a9 Don't allow negative calendar years
The concept is nonsensical and trying to display them crashes the
app displaying the calendar.

BUG: 430320
FIXED-IN: 5.78
2020-12-17 10:10:57 -07:00
David Edmundson
b1364fa601 Fix broken background
In commit c709076d9c the SVG got somehow
broken leading to black rectangles in all cases where it was used.

This commit reverts to the last working version, then reapplies the
"thick margin" from the change.

A test is supplied to show all our frameSVGs to hopefully make this
easier to spot if it happens again.

BUG: 430390
2020-12-17 12:41:38 +00:00
Marco Martin
f09b46bec6 Draft: Replace QString cache IDs with a struct-based version
As it turns out, QString::number() is quite expensive, especially when
using it in a code path that is called a lot of times. So instead, use a
struct with a custom hash method as cache ID. This is significantly
faster since we do not need to do memory allocations or string
conversions.
2020-12-17 11:31:27 +00:00
Mikel Johnson
b1b91fb3eb [TabGroup] Reverse animations in RTL mode 2020-12-14 11:27:22 +00:00
David Edmundson
c920ea86a1 Only remove shortcuts on applet removal not destruction
Applets are destroyed every time we close plasma as well as user
actions.

We only want to remove the shortcut from the registry from when an
applet is actually removed.

The end-user impact was limited as when we restart plasma we re-register
and plasma keeps it's own cache of what the shortcut should be so it
doesn't matter that kglobalaccel lost it's version.

The problem is that it means we send bogus calls to kglobalaccel after
kglobalaccel is potentially closed.

Testing done:
 - set a shortcut on an applet
 - confirmed it still worked after plasma restart
- removed an applet (and closed notificaiton so it wasn't in the
transient state)
- confirmed the entry was gone from system settings and the global
shortcut no-opped.
2020-12-14 10:09:19 +00:00
l10n daemon script
f7743ade92 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"
2020-12-10 06:24:39 +01:00
Nate Graham
08c5cb671d Hide disabled contextual actions from ExpandableListItem
The concept of a disabled contextual item is nonsensical;
the set of context-sensitive actions is always supposed to be responsive
to the context. Accordingly, if the calling code has marked any actions
as disabled, let's hide them entirely.

We can't remove them from the model because they might become re-enabled
at a time when the calling app sees fit (perhaps the context has
changed). So instead we have to set visible to false and height to 0, to
ensure that the listview has the correct height. This is a hack, but I
don't see a better way to do it.

The memory penalty to having invisible but created items should be
negligible since there are only ever a maximum of about 3 items in here.
2020-12-08 15:47:22 -07:00
Mikel Johnson
904e9bb856 [Representation] Only remove top/bottom padding when header/footer is visible 2020-12-03 16:03:08 +00:00
Mikel Johnson
479c90137f [PlasmoidHeading] Use technique from Representation for inset/margins 2020-12-03 14:59:49 +00:00
Marco Martin
da6b8c10c1 properly forward containmentDisplayHintsChanged
make possible to write containmentDisplayHintsChanged from
ContainmentInterface QML
when containmentDisplayHintsChanged, the containment forwards to
all its applets
2020-12-03 13:53:40 +00:00
Marco Martin
0e973e852f Add a Representation component
Add a Page-derived component intended as a root
for full representations.
It may go over the plasmoid edges (both on desktop and popups)
with the properties applyHorizontalPadding and applyVerticalPadding.
When the contentItem is a ScrollView or a Scrollarea,
the plasmoid margins will be automatically removed.
2020-12-02 14:05:29 +00:00
Mikel Johnson
f52823935c [Desktop theme] Rename hint-inset-side-margin to hint-side-inset 2020-12-02 11:31:32 +03:00
Mikel Johnson
0de09e8825 [FrameSvg] Rename insetMargin to inset 2020-12-02 11:24:03 +03:00
Mikel Johnson
1be527bd27 [PC3] Use PC3 Scrollbar in ScrollView 2020-11-29 15:53:05 +03:00
Mikel Johnson
431d4cc0d4 Report inset of zero where appropriate 2020-11-27 10:24:52 +00:00
Mikel Johnson
74a64a0b3d [Breeze] Report inset hint 2020-11-26 09:35:55 +00:00
Mikel Johnson
c8e563efa7 [FrameSvg*] Rename shadowMargins to inset 2020-11-26 09:35:55 +00:00
Mikel Johnson
2f7563d6eb [FrameSvg] Cache shadow margins and honor prefixes 2020-11-26 09:35:55 +00:00
David Redondo
472f4212a9 Finish the animation before changing the length of the progressbar highlight
This messes with the running animation and can lead to it overshooting the track.
BUG:428955
2020-11-25 07:55:24 +00:00
Nate Graham
c5fa23f858 [textfield] Fix clear button overlapping text
This change mirrors what the Kirigami ActionTextField does to solve the
same problem.

BUG: 429187
FIXED-IN: 5.77
2020-11-24 17:01:31 +00:00
David Redondo
3ce989221e Show drop menu at correct global position
The coordinates we get are relative to the containment.
Before when dragging a file to a second screen it would show the menu
on the first screen.
2020-11-24 12:12:00 +00:00
NiccolĂ² Venerandi
f341abadd7 Remove slim- 2020-11-23 18:03:53 +01:00
Carina Odenbreit
eaf585bc01 Use gzip -n to prevent embedded buildtimes 2020-11-23 12:18:16 +00:00
Nicolas Fella
007eacca5b Use KPluginMetaData to list containmentActions
Add a new method that uses KPluginMetaData to list the
containmentActions and deprecate the KPLuginInfo-based one
2020-11-23 12:17:26 +00:00
Nicolas Fella
d7f118e589 Port packageStructure loading from KPluginTrader
It will be deprecated.
2020-11-23 12:17:05 +00:00
Nicolas Fella
1a1133006b Use KPluginMetaData to list DataEngines
Avoid using KPluginInfo and KPluginTrader in favor of KPluginMetaData
and KPluginLoader.

Add new method that uses KPluginMetaData

Deprecate old KPluginInfo-based methods.

See also https://phabricator.kde.org/T13889
2020-11-23 12:16:32 +00:00
Marco Martin
255eb93070 check for parent 2020-11-23 12:44:09 +01:00
Nicolas Fella
750deb933d Remove dead cmake code 2020-11-20 22:50:18 +00:00
NiccolĂ² Venerandi
09ed402eb7 Merge branch 'master' of https://invent.kde.org/frameworks/plasma-framework into work/marginareas 2020-11-20 23:23:52 +01:00
NiccolĂ² Venerandi
b4d81f90bf Actually add highlight svg 2020-11-20 22:07:48 +01:00
Mikel Johnson
3b11e75462 Revert "[Dialog] Make BackgroundHints a flag and add DiscardBackgroundMargins"
This reverts commit 4079eaae0e
2020-11-20 15:21:23 +00:00
Mikel Johnson
d56ca431c2 Revert "[Dialog] Don't apply margins with DiscardBackgroundMargins instead of reverse"
This reverts commit 4f80d91ceb
2020-11-20 15:21:06 +00:00
Mikel Johnson
717e2ab7b0 Revert "[Dialog] Evaluate margins when BackgroundHints change"
This reverts commit 1367c5d3f6
2020-11-20 15:20:36 +00:00
Mikel Johnson
c387bddf17 Remove FullRepresentationFillArea for now
This needs further discussion
2020-11-20 15:18:24 +00:00
Mikel Johnson
5cbdc03197 [PlasmaCore] Make ConstraintHint a flag and add FullRepresentationFillArea 2020-11-20 17:05:57 +03:00
Mikel Johnson
f8ae743c2f Revert "[IconItem] Add selected property"
This reverts commit 9c8cf7078e
2020-11-20 13:26:54 +00:00
David Redondo
624fc88f7a BasicPlasmoidHeading: Use i18nd
GIT_SILENT
2020-11-20 08:57:12 +01:00
NiccolĂ² Venerandi
93ef1a4d4a Fix the documentation of ConstraintHints 2020-11-19 18:49:25 +00:00
Mikel Johnson
1367c5d3f6 [Dialog] Evaluate margins when BackgroundHints change 2020-11-19 18:45:27 +00:00
NiccolĂ² Venerandi
99ab350d6c Merge branch 'master' of https://invent.kde.org/frameworks/plasma-framework into work/marginareas 2020-11-19 18:52:44 +01:00
Mikel Johnson
4f80d91ceb [Dialog] Don't apply margins with DiscardBackgroundMargins instead of reverse 2020-11-19 17:31:51 +00:00
NiccolĂ² Venerandi
f3a7b2d26f Merge branch 'master' of https://invent.kde.org/frameworks/plasma-framework into work/marginareas 2020-11-19 18:17:05 +01:00
Mikel Johnson
ecb1820357 [TabBar] Add highlight on keyboard focus 2020-11-19 17:07:30 +00:00
Mikel Johnson
9c8cf7078e [IconItem] Add selected property 2020-11-19 17:07:30 +00:00
Mikel Johnson
d6656a545a [FrameSvg*] Expose shadows margins 2020-11-19 17:06:51 +00:00
Mikel Johnson
4079eaae0e [Dialog] Make BackgroundHints a flag and add DiscardBackgroundMargins 2020-11-19 16:23:00 +03:00
NiccolĂ² Venerandi
3c92764b62 Merge branch 'master' of https://invent.kde.org/frameworks/plasma-framework into work/marginareas 2020-11-18 23:03:56 +01:00
NiccolĂ² Venerandi
bca1d4a7b3 Make MarginAreasSeparator value more clear 2020-11-18 18:21:06 +00:00
Nate Graham
da2cfd7c4a Add monochrome tray icon for Kup 2020-11-17 14:31:13 +00:00
Mikel Johnson
9df6f42c60 [TabButton] Align center icon and text when text is beside the icon 2020-11-14 16:40:20 +00:00
Nate Graham
90e92a9c67 [SpinBox] Fix logic error in scroll directionality
Scrolling up was decreasing the value, when the reverse should be true.
2020-11-13 10:45:54 -07:00
Marco Martin
8e0344a979 fix mobile scrollbar in RTL mode 2020-11-12 14:53:37 +01:00
Marco Martin
bf339509e3 fix RTL for sliders
colored area in sliders positioned correctly in RTL mode
2020-11-12 14:30:06 +01:00
Nate Graham
d66afc1fd0 [RoundButton] Fix binding loop in extraSpace property 2020-11-11 10:33:17 -07:00
Noah Davis
7b39642f29 [PC3 ToolBar] Don't disable borders 2020-11-10 20:08:06 +00:00
Noah Davis
fc0a5bbbd5 [toolbar.svg] Increase margin size by 2x
They were half of what they were supposed to be
2020-11-10 20:08:06 +00:00
Noah Davis
6fd1f919c2 [PC3 ToolBar] Use correct svg margin properties for padding 2020-11-10 20:08:06 +00:00
Nicolas Fella
dc7d0f5b85 [pc3/scrollview] Remove pixelAligned
This is severly breaking touch scrolling. The view gets stuck during overshoot and doesn't go back to the target position.
2020-11-10 12:13:34 +01:00
NiccolĂ² Venerandi
c709076d9c Add margin areas 2020-11-09 19:42:36 +00:00
NiccolĂ² Venerandi
346dbea467 Introduce margin area separator constraint 2020-11-09 19:42:36 +00:00
Marco Martin
8b7b4f74c6 Revert "Revert "BasicPlasmoidHeading component""
This reverts commit 3a3b78c146.
2020-11-09 18:35:28 +00:00
Marco Martin
3a3b78c146 Revert "BasicPlasmoidHeading component"
This reverts commit 18ee2d9eed.
2020-11-09 16:10:41 +01:00
Marco Martin
18ee2d9eed BasicPlasmoidHeading component
plasmoids can use it as a standard heading with a config button and a
menu with all actions. this heading would be visible only when
plasmoids are not in the systemtray which has an header that replaces it
2020-11-05 16:51:11 +00:00
Nate Graham
e845f3dbcc Always show ExpandableListitem buttons, not just on hover
Hover buttons suffer from discoverability problems and can't be used on
touch, and this component is explicitly trying to be touch-friendly. So
let's make the buttons always be visible, not just on hover.

To avoid the appearance becoming too heavy, the Buttons are turned
into ToolButtons.

BUG: 428624
FIXED-IN: 5.76
2020-11-04 13:32:08 -07:00
Carson Black
b96f23cd3a [PlasmoidHeading]: Set implicit sizing properly
The implicit sizing was set strangely, with implicitHeight not being set, and implicitWidth not following QQC2 conventions. Content height was also being set for some reason.
2020-11-04 12:57:00 -05:00
Dominic Hayes
79cbd1ba74 Lock the header colours of Breeze Dark and Breeze Light
This MR locks the header colours of Breeze Dark and Breeze Light, for
Plasma 5.21/master, to the colours for the titlebars and window colours
that they currently use in 5.20 (from their respective colour schemes),
so that the locked appearance is consistent with how the background of
these Plasma Styles is already locked, as well as fixing an issue with
the header looking wrong on light colour schemes + Breeze Dark and
vice-versa. Breeze itself will still colour just as completely as usual,
though.

BUG: 427864
FIXED-IN: 5.76
2020-11-03 18:30:14 +00:00
Aleix Pol
bc25ad21f0 Fix porting issue
textField does not exist here, it's called control. Also QQC2.TextField
doesn't have length, we need to check the text.
2020-11-03 02:27:39 +01:00
Yunhe Guo
dbbc0429a8 Unify aspect ratio of 32px and 22px battery icons 2020-11-01 11:35:15 +00:00
David Faure
e6fb3c7a87 Port from QStandardPaths::DataLocation to QStandardPaths::AppDataLocation
They are the same on Linux (but DataLocation is deprecated). On Windows this enables the use of the roaming path.

NO_CHANGELOG
2020-10-31 14:29:35 +01:00
Kai Uwe Broulik
0fc98e5141 [ContainmentInterface] Remove unused include
ConfigPropertyMap is only used from AppletInterface, which this inherits
2020-10-29 22:33:22 +01:00
Noah Davis
b3ee36cfbb Add margin hints to toolbar.svg and refactor PC3 ToolBar
There's no need to redefine contentWidth and contentHeight. For controls based on QQC2 Pane, content size is implicit size if not 0, else the implicit size of the top level child item if there is only one.
2020-10-29 15:18:20 +00:00
Noah Davis
13b0bb8364 Add AbstractButton and Pane to PC3
These 2 don't contain much, but they should be a good base for making custom controls in plasmoids and plasmashell (where that makes sense)
2020-10-29 15:18:20 +00:00
Marco Martin
4ceb47765f support exclusive action groups in the contextual actions 2020-10-29 15:14:20 +00:00
Fabian Vogt
d578c2a154 Fix BusyIndicator rotating even when invisible, again
After "BusyIndicator: Do not rotate when invisible", plasmashell started
consuming 100% CPU due to plasma-nm's icon having an invisible BusyIndicator.
Adding the "visible" property back into the equation avoids this.

Third time's the charm?
2020-10-24 15:56:11 +02:00
Devin Lin
a868053128 Fix colours not applying to mobile task switcher icon 2020-10-24 03:29:44 +00:00
Devin Lin
c48be25a72 Add plasma mobile task switcher and close app icons (for taskpanel) 2020-10-23 14:54:44 +00:00
Felix Yan
c7a7aad857 Correct a typo in service.h 2020-10-23 16:53:02 +08:00
Laurent Montel
e2c16864c8 If include is define in .h remove it if it's defined in .cpp too (scripted) 2020-10-23 08:39:01 +02:00
Aleix Pol
c3259fc2df Solve some clazy warnings
My last patch triggered me to run clazy on the project. This patch
solves some of them:
- Proper iteration of some types, saving their copy.
- compile-time connects
- prefer using connects with the 3rd argument as an object when using
lambdas.
2020-10-22 11:12:32 +00:00
Marco Martin
f93c8769ef remove dead code 2020-10-21 15:19:16 +00:00
Marco Martin
c2f281452c Better Menu in PlasmaComponents3
add the missing MenuSeparator component
support for radio buttons
like the desktop style, put icons and checkboxes in two separate columns, making them
all aligned to each other when there is a combination of neither, only icon, only checkbox, both
2020-10-21 15:19:16 +00:00
Laurent Montel
fa06d610dd Remove not implemented method 2020-10-19 07:12:43 +02:00
Chris Holland
25d22c1a64 Remove unnecessary anchors in the ComboBox.contentItem
@ahiemstra noticed this in the qqc2-desktop-style!19 patch but the PC3
patch plasma-framework!36 had already been merged.
2020-10-13 14:37:09 +00:00
David Redondo
a187141e73 Round slider handle position
We are dividing by two and additionally availableHeight can be fractional
(observed when running kirigami gallery with plasma style for example). Round
the resulting values to avoid blurry rendering due to fractional positioning.
2020-10-13 15:19:48 +02:00
Kai Uwe Broulik
4d5ff92b2c [ExpandableListItem] Load expanded view on demand 2020-10-11 19:30:11 +00:00
Nate Graham
8e6f62f0cf Add missing PlasmaCore.ColorScope.inherit: false
Whenever you override or hardcode a color, you need to set colorscope
inheritance to false to prevent weird issues.

CCMAIL: noahadvs@gmail.com
2020-10-09 10:29:33 -06:00
Noah Davis
28560ec596 Set PlasmoidHeading colorGroup in root element
This makes it so any child elements inherit the colorGroup if they are
capable of doing so.
2020-10-09 08:35:13 -04:00
NiccolĂ² Venerandi
143a9418ce Merge branch 'master' of https://invent.kde.org/frameworks/plasma-framework into work/plasmoidsCanIgnoreMargins 2020-10-09 11:12:14 +02:00
Nate Graham
21b27e90bf [ExpandableListItem] Make colored text 100% opaque
Otherwise it can be difficult to see, especially with dark backgrounds.
Also, let's set the opacity directly rather than using the enabled
property to approximate it.

BUG: 427171
FIXED-IN: 5.76
2020-10-09 02:13:25 +00:00
Aleix Pol
e0e7840a03 BusyIndicator: Do not rotate when invisible
It seems like the "visible" property is catching there is the wrong one
and would still rotate while invisible.

CCBUG: 426746
2020-10-08 18:14:02 +02:00
Chris Holland
086a710478 ComboBox3.contentItem must be a QQuickTextInput to fix autocomplete
See QQuickComboBoxPrivate::updateEditText()
https://github.com/qt/qtquickcontrols2/blob/dev/src/quicktemplates2/qquickcombobox.cpp#L426

By removing the MouseArea previously in the contentItem, we lose the
ability to press+hold+drag to select a drop down item.

The wheel events still work, as they are captured by the MouseArea in
the background component.

The combobox previously closed the popup when releasing the click to
open the dropdown when editable=true.

BUG: 424076
2020-10-08 13:34:32 +00:00
NiccolĂ² Venerandi
337779252d Merge branch 'master' of https://invent.kde.org/frameworks/plasma-framework into work/plasmoidsCanIgnoreMargins 2020-10-08 14:52:45 +02:00
Aleix Pol
f2ed2ca183 FrameSvg: Don't reset the cache when resizing
We were passing the enum as the first argument, which was being
converted to 0 and would set lastModified to 0. This would in turn
result in the cache being bypassed because now `findInCache with a
lastModified timestamp of 0 is deprecated` taking the slow path on most
occasions.
2020-10-08 04:06:56 +02:00
Friedrich W. H. Kossebau
d1617d6d2d Port away from deprecated KDeclarative::setupContext()
NO_CHANGELOG
2020-10-07 16:26:31 +00:00
Alexander Lohnau
d6a5b10b3b Toggle plasmoids when shortcut is activated
BUG: 400278
FIXED-IN: 5.76

Now the plasmoids are toggled by default. The system tray is a
special case, which needs to be in plasma-workspace adjusted.
2020-10-07 16:18:35 +00:00
Aleix Pol
0e5338fcc9 TextField 3: Add missing import
Looking at kscreenlocker logs I noticed this was missing.
2020-10-07 15:05:41 +00:00
Alexander Stippich
88384296d5 Fix IDs in plasmavault_error icon
Fixes display of icon in the vault plasmoid, e.g. when unmounting a vault with a file of it still opened
2020-10-05 16:56:34 +00:00
Friedrich W. H. Kossebau
88c916ff59 PC3: fix color of TabButton label
For some currently unknown reason the color property does not have
the binding as set in PC3's Label.
So explicitly setting it, like also done for CheckBox, Switch, RadioButton
2020-10-05 15:19:46 +02:00
Nate Graham
7f9fe64f9b Fix plasmoidheading.svgz being installed to the wrong place
This was causing it to not show up for people using the Breeze Dark
Plasma theme (but not the default Plasma theme with a dark color scheme)

BUG: 426537
FIXED-IN: 5.75
CCMAIL: vonreth@kde.org
2020-10-01 17:28:54 -06:00
Aleix Pol
93de15f545 Detect that we are looking for an empty element and quit early
Otherwise we just go through all the fallbacks unnecessarily
2020-10-01 12:14:41 +00:00
Nate Graham
b532fd2f20 Make PlasmaComponents3 Tooltips use the typical tooltip style
Without this, the tooltips are light when using a light theme. This is
contrary to other tooltips, which are always dark no matter which
coloration of theme you're using.

BUG: 424506
FIXED-IN: 5.75
2020-09-28 08:44:41 -06:00
Nate Graham
b40a1fbdf0 Use Header colors in PlasmoidHeading headers
This brings applets with distinct heading areas into visual consistency
with windows, once the Tools Area MR lands.

When using a color scheme that lacks Header colors, there is no visual
change whatsoever.
2020-09-28 14:30:18 +00:00
l10n daemon script
f47f98da0b 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"
2020-09-28 05:58:18 +02:00
andy salerno
ad6647d5e5 Change PC2 TabBar highlight movement animation easing type to OutCubic
This makes the highlight movement feel more responsive in Kickoff.

Unfortunately, the same cannot be done for the PC3 TabBar since it uses
a ListView with a highlight. The easing type for the highlight movement
animation cannot be customized.

MR: frameworks/plasma-framework!91
2020-09-26 15:20:26 -03:00
Noah Davis
b8fb2ff44e Add support for Tooltip color set
Also add some missing color sets to ThemePrivate::colorsChanged()
2020-09-24 16:41:13 -04:00
Noah Davis
3167717797 Fix PC3 Button/ToolButton icons not always having the right color set
BUG: 426556
FIXED-IN: 5.75
2020-09-23 20:33:46 -04:00
Arjen Hiemstra
16f852ea4c Ensure FrameSvg uses lastModified timestamp when using cache
This, I suspect, is the true source of bug 426674. FrameSvg would
request items from the cache without specifying any modification time
stamp, so we end up always retrieving the cached version. Since
lastModified is now a required parameter, we need to ensure this does
not happen anymore.

BUG: 426674
2020-09-23 14:08:52 +00:00
Arjen Hiemstra
7b42e5b45d Ensure we always have a valid lastModified timestamp when setImagePath is called
Not tracking modification time of icon/themed stuff means we do not know
when we need to reject the cached versions of these. So ensure we try to
keep track of the svg that this is coming from, even if we do stuff to
it in the meantime.

Longer term this should be changed so the cache knows which files it is
caching and can reject things that changed in the meantime.
2020-09-23 14:08:52 +00:00
Arjen Hiemstra
54e12fcda0 Deprecate a lastModified timestamp of 0 in Theme::findInCache
lastModified is used to track whether a file is outdated. Having a 0
here means we (in the old code) use the cached version. This causes
problems when the on-disk file has changed, as we have no way of
informing callers that they should regenerate the cache entry. To avoid
this, using a lastModified of 0 now warns and will always return false
(to indicate it is not cached). Unfortunately we can't simply drop the
default parameter of 0 since there is no source-compatible way of doing
that.

CCBUG: 426674
2020-09-23 14:08:52 +00:00
Jonah BrĂ¼chert
c0ebacfa68 Adapt QQC2 import to new versioning scheme
The minor version of QQC2 is now the same as the Qt minor version.
2020-09-23 07:05:30 +00:00
l10n daemon script
6885e1176b 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"
2020-09-23 06:25:34 +02:00
David Edmundson
4a9e57b7df [windowthumbnail] Verify that the relevant GLContext exists, not any
glXGetCurrentContext checks if any GLContext exists and is current.

resolveGLXFunctions uses window->openglContext()

One can hit a situation that you are using software rendering for the
window, yet someone else has created a GL Context. This then crashes.
2020-09-22 10:20:57 +00:00
Nate Graham
36247d97c4 Add missing PlasmaCore import to ButtonRow.qml 2020-09-21 17:08:01 -06:00
Noah Davis
fb883e2740 Improve the accuracy of Units.gridUnit documentation
It never held the width of an 'M', it held the height of a boundingRect that happened to contain an 'M'. The fact that there is an 'M' doesn't really matter since the bounding rect is much taller.
2020-09-19 09:58:43 -04:00
Nate Graham
a7aeba21c4 Fix a few more reference errors in PlasmaExtras.ListItem 2020-09-17 12:51:51 -06:00
Nate Graham
39d824796c Fix error for implicitBackgroundWidth in PlasmaExtras.ListItem 2020-09-17 12:18:40 -06:00
l10n daemon script
1be54dfc61 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"
2020-09-13 05:57:29 +02:00
l10n daemon script
cdfc7512aa 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"
2020-09-08 06:34:57 +02:00
l10n daemon script
973051ef3d 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"
2020-09-07 05:56:59 +02:00
Nate Graham
1aaccc2aef Call edit mode "Edit Mode"
This came up in yesterday's VDG meeting.

When we introduced the idea of an edit mode. We kind of danced areound
what it is, and didn't call it a mode, even though it is. We named the
menu item "Customize layout". However in all of our communications with
the user outside of the UI, we call it the global edit mode. Users
themselves call it "mdit mode". The code calls it "edit mode". We call
it edit mode when we talk about it internally. I think it's pretty clear
what it is in people's minds. So let's make the UI text reflect that.
2020-09-06 16:13:14 +00:00
Felix Yan
c5a8ed1a88 Fix a TypeError in QueryDialog.qml 2020-09-06 15:15:41 +00:00
Felix Yan
e424330089 Fix ReferenceError to PlasmaCore in Button.qml 2020-09-06 13:32:58 +00:00
l10n daemon script
cfaf383f89 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"
2020-09-06 05:47:09 +02:00
David Edmundson
7b6191f440 [PC3/BusyIndicator] Avoid running invisible animation
Running is a property managed by a state machine. It is bound in the
transition between states. We don't run a transition to get to the first
state.

These transitions aren't needed and can be written away simplifying the
code considerably in the process.

This means krunner is invisibly animating at 60fps constantly even when
it's not doing anything.
2020-09-05 14:13:26 +01:00
Noah Davis
37a95de3f3 Add missing license headers 2020-09-01 12:53:40 +00:00
Nicolas Fella
107776b239 Drop empty X-KDE-PluginInfo-Depends
The whole concept is almost unused and there's no point in having it there but empty

See also https://phabricator.kde.org/T13553
2020-09-01 02:09:43 +02:00
Noah Davis
b382bca34c Don't use highlightedTextColor for TabButtons
PC2 didn't do that and it doesn't look good with Breeze
2020-08-31 12:53:49 +00:00
Noah Davis
0f96187bfa Remove Layout.minimumWidth from Button and ToolButton
This fixes non-square buttons in plasma-pa.
2020-08-31 10:18:22 +00:00
Noah Davis
4980e4e985 Use the spacing property for the spacing between Button/ToolButton icons and labels 2020-08-31 10:18:22 +00:00
Noah Davis
7838a4ecc9 Add private/ButtonContent.qml for PC3 Buttons and ToolButtons
This allows Buttons and ToolButtons to share almost all of the same code, which prevents unnecessary inconsistencies.
2020-08-31 10:18:22 +00:00
Noah Davis
9e9136bddd Change PC3 Button and ToolButton implicitWidth and implicitHeight to account for inset values 2020-08-31 10:18:22 +00:00
Noah Davis
73865f7171 Add implicitWidth and implicitHeight to ButtonBackground
Remove unnecessary keyboardFocus property since visualFocus exists

Remove unnecessary parentControl property
2020-08-31 10:18:22 +00:00
Noah Davis
34bed4571c Reduce toolbutton margins to 4px
This makes it so flat buttons can use 22px icons, but still be the same size as raised buttons
2020-08-31 10:18:22 +00:00
Carson Black
c24ebf1d12 Fix incorrect default for PlasmaExtras.ListItem
This fixes the mismatched default sectionDelegate compared to PlasmaComponents.ListItem,
where it was default false and this was default true.

BUG: 425769
2020-08-30 23:41:22 +00:00
David Redondo
8c37d1d225 Don't let the background become smaller than the svg
Otherwise the svg rendering results in broken looks.
BUG:424448
2020-08-25 15:11:17 +00:00
NiccolĂ² Venerandi
e4ab700b70 ops 2020-08-24 19:57:15 +02:00
NiccolĂ² Venerandi
60e029d9d2 Merge branch 'master' of https://invent.kde.org/frameworks/plasma-framework into work/plasmoidsCanIgnoreMargins 2020-08-24 19:56:20 +02:00
Friedrich W. H. Kossebau
3f8469acb1 Use Q_DECLARE_OPERATORS_FOR_FLAGS in same namespace as flags definition
Having the macro's definition of the operator| in the namespace of the
flags argument improves/unbreaks things for the argument-dependent
lookup of unqualified function names, e.g. when flags are combined in
calls of other methods, but there is some other operator| defined in the
namespace of the current code.

Given Q_DECLARE_OPERATORS_FOR_FLAGS creates inlined functions, this
should be a source and binary compatible change.

Qt did similar for Qt 5.12 in
https://codereview.qt-project.org/c/qt/qtbase/+/225348
2020-08-24 09:21:41 +00:00
Noah Davis
3509283d63 Make PC3 BusyIndicator visuals keep a 1:1 aspect ratio
Updated the tests so that you can see if the aspect ratio is correct.

Made an animated transition for when `control.running` is false.

Removed the code that updates the RotationAnimator when control.running changes since it didn't work.

Set padding to 0 (see comment).

BUG: 425504
2020-08-23 15:08:32 -04:00
NiccolĂ² Venerandi
dcb26d979e ops 2020-08-22 16:56:05 +02:00
NiccolĂ² Venerandi
db2126cea1 Use a hint instead of a bool 2020-08-22 16:54:52 +02:00
Noah Davis
a4e7ea6807 Use ButtonFocus and ButtonHover in PC3 ComboBox 2020-08-20 22:25:33 -04:00
Noah Davis
89b7d0afb5 Use ButtonFocus and ButtonHover in PC3 RoundButton 2020-08-20 21:05:43 -04:00
Noah Davis
c31edc876b Use ButtonFocus and ButtonHover in PC3 CheckIndicator 2020-08-20 19:40:46 -04:00
Noah Davis
7574eee24e Unify the flat/normal behavior of PC3 Buttons/ToolButtons
Rather than duplicating the behaviors in both Button.qml and ToolButton.qml, leading to bugs and inconsistencies, the Button/ToolButton background code is split into separate reusable files. The correct background is used depending on whether or not flat mode is enabled.

BUG: 425174
2020-08-20 19:33:53 -04:00
Noah Davis
5ca28a123b Make Heading use PC3 Label 2020-08-18 21:10:38 +00:00
Nate Graham
c73264c75e [PlasmaComponents3] Make checkbox text fill its layout
Otherwise the elision property set on it has no effect because no width
boundary is defined.
2020-08-18 13:52:13 -06:00
Noah Davis
2774a61db7 Give PC2 slider implicitWidth and implicitHeight
Needed to prevent them from having 0 width and height in Layouts.
2020-08-18 15:17:24 -04:00
Hannah von Reth
d874449ad3 Copy files rather than broken symlinks
This fixes installation on Windows.
An alternative solution would have been to dynamically create the symlinks
in the install step, on Linux, and to copy them on Windows.

01:05:07.444  CMake Error at src/desktoptheme/breeze-dark/cmake_install.cmake:43 (file):
01:05:07.444    file INSTALL cannot read symlink
01:05:07.444    "C:/_/acd4f350/plasma-framework-5.71.0/src/desktoptheme/breeze-dark/widgets/plasmoidheading.svgz"
01:05:07.444    to duplicate at
01:05:07.444    "C:/Craft/BC/windows-mingw_64-gcc/build/kde/frameworks/tier3/plasma-framework/image-RelWithDebInfo-5.71.0/Craft/BC/windows-mingw_64-gcc/bin/data/plasma/desktoptheme/breeze-dark/widgets/plasmoidheading.svgz":
01:05:07.444    No such file or directory.
01:05:07.444  Call Stack (most recent call first):
01:05:07.444    src/desktoptheme/cmake_install.cmake:40 (include)
01:05:07.444    src/cmake_install.cmake:41 (include)
01:05:07.444    cmake_install.cmake:109 (include)
2020-08-17 19:06:52 +00:00
Noah Davis
f857da3864 Fix toolbutton-hover margins in button.svg
The toolbutton-hover margins need to be inconsistent with the hover margins because 3rd party themes expect this inconsistent behavior now.

BUG: #425255
2020-08-14 20:20:52 +00:00
Noah Davis
eff71b6650 Revert "Fix PC2 ToolButtonStyle margins"
This reverts commit 7062c635a9.

Unfortunately, 3rd party themes were still broken after this commit was made because it didn't fix the real issue.

The real issue is that toolbutton-hover is supposed to have margins, but it didn't have real margins due to a previous patch to `button.svg`.

3rd party themes depend on hover and toolbutton-hover being used in inconsistent ways because of past behavior.
Unfortunately, they have to be inconsistent again
to not break themes.
2020-08-13 18:26:44 -04:00
Noah Davis
7062c635a9 Fix PC2 ToolButtonStyle margins
Previously, it was trying to use the margins of toolbutton-hover for flat buttons, but toolbutton-hover doesn't have real margins (0.001 since 0 isn't valid).

BUG: #425255
2020-08-13 17:10:35 -04:00
Andreas Cord-Landwehr
d10afb5d2a plasma-framework: Convert copyright statements to SPDX expressions 2020-08-13 19:08:54 +00:00
Nate Graham
b811a9b30b [PlasmaComponents3] very small refactor of ToolButton shadow code
This introduces a bit more consistency to this big `if` chain.
2020-08-12 15:56:10 -06:00
Nate Graham
f389064ca3 [PlasmaComponents3] Fix reversed condition for flat ToolButton shadow
Non-flat ToolButtons are supposed to have a shadow, but flat ToolButtons
are not. The ternary providing this was inverted so that the reverse was
true.
2020-08-12 15:42:34 -06:00
Nicolas Fella
49bb7d152b Port away from KMimeTypeTrader
It is about to be deprecated

See https://phabricator.kde.org/T12177
2020-08-11 23:41:10 +02:00
Nate Graham
0fe4fc53ef [PlasmaComponents3] Strip mnemonic ampersands from tooltip text
They're never useful in that context, and this prevents having to strip
them out manually when assigning a tooltip text that comes from a source
that sets a mnemonic ampersand. For example
https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/171#note_79871
2020-08-11 18:24:06 +00:00
David Redondo
3e225d8664 Only draw the focus indicator when we got focus via the keyboard
QQC2 controls gain activeFocus on press this is a difference to controls 1
which had activeFocusOnPress property that defaulted to false. qqc2-desktop-style
also only sets the focus flag if it was gained via keyboard (kquickstyleitem.cpp:705).
BUG:424446
2020-08-11 06:58:19 +00:00
Nate Graham
711789908b Drop implicit minimum sizing from PC2 and PC3 Buttons
For the following reasons:
- It can break and look bad on Plasma Mobile which uses the Plasma style
- It makes buttons with icons and short text look visually unbalanced
- QStyle and QML desktop style buttons do not do this so it's a source
  of inconsistency

Tests are adjusted to all pass. Stuff looks better to my eye.
2020-08-10 18:47:49 +00:00
Carson Black
8ef5347074 Add PC3 equivalent to PC2 ListItem 2020-08-07 17:26:34 +00:00
Nicolas Fella
fd0d8f9284 Fix toolbar svg
To make it consistent with the qqc2-desktop-style toolbar we need to change the color from ViewBackground to Background and remove the opacity.
2020-08-06 21:37:38 +00:00
Nicolas Fella
52f81b4630 [pc3] Make ToolBar more aligned with qqc2-desktop-style one
The qqc2-desktop-style one has an implicit height of 40 plus some other tweaks
2020-08-06 21:25:49 +02:00
NiccolĂ² Venerandi
a2500223b5 Remove unrelated change 2020-08-05 10:44:01 +00:00
NiccolĂ² Venerandi
e5a6deb8ba Allow plasmoids to ignore the margins 2020-08-04 16:46:00 +02:00
David Redondo
6329eb7af4 Expose the applet metadata in AppletInterface
Needed for displaying about pages of applets.
2020-08-04 07:43:13 +00:00
David Edmundson
e510d9d3ce Don't truncate DPR to an integer in cache ID 2020-08-03 08:18:35 +00:00
Alexander Lohnau
c1fd9b4439 Add timeout property to ToolTipArea 2020-08-02 17:26:59 +00:00
NiccolĂ² Venerandi
3caaaae585 Set type to Dialog in flags if type is Dialog::Normal 2020-08-02 10:24:36 +00:00
l10n daemon script
e0a721c103 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"
2020-07-31 05:33:55 +02:00
David Redondo
b1345e9d30 Set cpp ownership on the units instance
Fixes common and frequent crashes introduced by 6c627ea044.
Otherwise the engine will try to delete it. The docs say:
 NOTE: A QObject singleton type instance returned from a singleton type provider
 is owned by the QML engine unless the object has explicit
 QQmlEngine::CppOwnership flag set.
2020-07-28 13:12:53 +02:00
David Redondo
32fce1e668 Do not unnecessary specify a default capture for singleton registration lambdas
A lambda can only be converted to a function pointer if it does not capture
anything. Just specifying a default capture even if it does not capture anything,
prevents this. In newer Qt this actually ended up calling the std::function
(which is much heavier than function pointers) overload which was introduced
only after Qt 5.12.
2020-07-28 08:58:41 +02:00
Nate Graham
e781341ee0 Add some missing PlasmaCore imports 2020-07-27 13:59:15 -06:00
Carson Black
6c627ea044 Remove usage of context properties for theme and units 2020-07-27 19:54:44 +00:00
Jonah BrĂ¼chert
630e5c88e8 PC3: Improve look of the Menu 2020-07-26 11:57:14 +00:00
Noah Davis
8812eb5e4b Adjust audio icons again to match breeze-icons
see https://invent.kde.org/frameworks/breeze-icons/-/merge_requests/29
2020-07-23 18:00:23 -04:00
Nate Graham
c505340e20 Make showTooltip() invokable from QML
It may become necessary for various reasons to want to programmatically
show a tooltip, like how the tooltip can be programmatically hidden.
2020-07-23 14:39:20 +00:00
Nate Graham
b7ee696250 [PlasmaComponents3] Honor icon.[name|source] property
Since a checkbox is a subclass of AbstractButton, it can be given an
icon. QWidgets checkboxes will faithfully display this icon, but
PlasmaComponents3 ones will not. They should. :)

I will submit a similar change for the QQC2 checkbox style
to make them consistent.
2020-07-23 14:38:14 +00:00
l10n daemon script
ab125ac2d5 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"
2020-07-23 05:58:32 +02:00
Marco Martin
50a03b39a3 filter on formfactors if set
if KDeclarative::runtimePlatform() is set, then filter applets
that have formfactors set and don't match, in order to not
show on the phone applets that are desktop only

in desktop case, list all applets, for maximum retrocompatibility,
to be reconsidered for kf6
2020-07-22 08:00:28 +00:00
Noah Davis
139b0486ce Update mute icon style to match breeze-icons 2020-07-22 04:07:17 +00:00
Friedrich W. H. Kossebau
eb87bd715d Remove unneeded Q_DECLARE_METATYPE calls for pointers to QObject subclasses
Compare API dox of Q_DECLARE_METATYPE:
"
Some types are registered automatically and do not need this macro:
* Pointers to classes derived from QObject
* QPointer<T>, QSharedPointer<T>, QWeakPointer<T>,
  where T is a class that derives from QObject
"

This is a ABI-compatible change, as this just replaces explicitly
defined template code (by the Q_DECLARE_METATYPE macro use) with the
generic predefined one picking up pointers to QObject subclasses.

So instead of the custom explicitly template overload
    template <>
    struct QMetaTypeId< TYPE >
    { /**/ static int qt_metatype_id() {/**/} };
the predefined template overload one is picked up via
    template <typename T>
    struct QMetaTypeId : public QMetaTypeIdQObject<T>
    { /**/ };
    template <typename T, int =
        QtPrivate::IsPointerToTypeDerivedFromQObject<T>::Value ?
            QMetaType::PointerToQObject :
        /**/ 0>
    struct QMetaTypeIdQObject
    { /**/ };
    template <typename T>
    struct QMetaTypeIdQObject<T*, QMetaType::PointerToQObject>
    { /**/ static int qt_metatype_id() {/**/} };

And thus the constexpr code using QMetaTypeId<T>::qt_metatype_id(),
for which all this is done, evaluates as before.

GIT_SILENT
2020-07-20 21:55:53 +00:00
Friedrich W. H. Kossebau
f125cb0233 Document why qmlRegisterInterface<Plasma::T>("T) cannot be ported for KF5
GIT_SILENT
2020-07-20 22:19:31 +02:00
Friedrich W. H. Kossebau
efb2f2bb6c Remove QML registration of DataSource as interface, done as type before
GIT_SILENT
2020-07-19 19:58:08 +02:00
Friedrich W. H. Kossebau
8d3f4fccbd Remove broken metatype registration for types missing the "*" in the name
The old code calling
    qRegisterMetaType<Plasma::T *>("T");
was broken, as it registered for the name "T", not the pointer
type "T*". Things still work though as that registration is also
covered due to
    qmlRegisterInterface<Plasma::T>("T");
internally also calling
    qRegisterMetaType<Plasma::T *>("T*");
so that in the end "T*" was registered and mapped to the right type.
2020-07-19 19:58:08 +02:00
Eugene Popov
a851c78bfe Use 35% opacity for faded elements in the network icons
Currently, I see that the network icons aren't visible enough. For example, I find it difficult to determine the signal strength of the network without peering. I would like these icons to be more visible, and therefore I propose to use 35% opacity for faded elements. As for me, this solution makes determining the signal level more convenient and the icons more informative.
2020-07-18 10:58:20 +03:00
Nate Graham
a707731607 Don't show Plasma dialogs in task switchers
Plasma dialogs are already marked as not being shown in the task manager
and the pager. We should similarly omit them from the task switcher, for
the same reasons.

BUG: 419239
FIXED-IN: 5.73
2020-07-16 20:18:30 -06:00