Commit Graph

15732 Commits

Author SHA1 Message Date
Jan Blackquill
bb714f8f28 Remove hover animation from buttons
Removing hover animations makes buttons feel more responsive
2021-01-18 19:15:48 -05:00
Ahmad Samir
34a8b79aa7 Use Q_EMIT instead of emit
In C++20 there are new classes that have member functions named emit().
c.f.:
https://lists.qt-project.org/pipermail/development/2020-February/038812.html
https://en.cppreference.com/w/cpp/io/basic_osyncstream/emit

GIT_SILENT
2021-01-18 13:08:40 +02:00
Jan Blackquill
108939c420 Dump plasmoid errors into console
For some reason, we weren't putting plasmoid loading errors into the console, which interfered with debuggability of errors. Dumping them is useful for debugging.
2021-01-15 15:38:34 -05:00
David Redondo
3c80bc83d9 Solve cyclic dependency of Units.qml
It imported Kirigami to check whether we are on mobile.
Kirigami::Settings::isMobile checks whether QT_QUICK_CONTROLS_MOBILE is set.
QtQuickControlsSettings always returns true on various mobile platforms (Q_OS_IOS,
Q_OS_ANDROID, Q_OS_BLACKBERRY, Q_OS_QNX and Q_OS_WINRT) or checks
QT_QUICK_CONTROLS_MOBILE.
2021-01-15 10:40:21 +01:00
Kai Uwe Broulik
051dec5f8f [PlasmaComponents MenuItem] Create dummy action when action gets destroyed
`MenuItem` does not delete other people's `QAction` but it does not take kindly
to the `QAction` being deleted under it. As a workaround recreate a dummy action
when ours gets destroyed.

This crash can easily be triggered by opening the Media Controller applet and
quickly right-clicking its icon to open the context menu. Media Controller recreates
its actions in `contextualActionsAboutToShow`, which removes and deletes them.
Then the `Instantiator` in System Tray's `ExpandedRepresentation` updates its `model`,
deleting the delegate items (`MenuItem` instances) it created. This prompts the `Menu`
to run `removeMenuItem` on the now removed `MenuItem`, accessing its backing `action()`
to remove it from the menu, resulting in a crash as it was deleted earlier.
2021-01-11 19:03:49 +00:00
Waqar Ahmed
2864f99dc5 Fix windows build failing due to narrowing cast
NO_CHANGELOG
2021-01-09 13:58:19 +00:00
l10n daemon script
296ab6421b GIT_SILENT Upgrade KF5 version to 5.79.0. 2021-01-09 10:06:14 +00:00
Friedrich W. H. Kossebau
b8d21595f9 Add missing include to unbreak build on FreeBSD
NO_CHANGELOG
2021-01-08 13:58:05 +01:00
Marco Martin
04c6f61f70 fix autotest
since it was manually generating a cacheid assuming the structure, port
o the new logic
2021-01-07 15:17:13 +00:00
Marco Martin
f9b4b12b38 don't make pixmaps bigger than needed
create the pixmap texture of icons just as big as icon's actualsize
for that given size, not having unneeded padding around.
It also makes plaintedWidth/paintedHeight return actually sensible
values
2021-01-07 10:19:51 +00:00
Konrad Materka
908a9effcf Add JetBrains IDEs project files to ignored
Used by some developers, IntelliJ IDEA or CLion has nice git, diff and replace tools.
2021-01-02 23:30:09 +01:00
Konrad Materka
1051a4045b Fix Connections warnings
Qt 5.14 introduced new syntax for defining Connections. Fix warnings like this one:
QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
2021-01-02 19:15:59 +00:00
Konrad Materka
1330b0279c Add RESET to globalShortcut property
BUG: 431006

FIXED-IN: 5.79.0
2021-01-02 16:20:17 +01:00
l10n daemon script
84527c752c GIT_SILENT Upgrade ECM and KF5 version requirements for 5.78.0 release. 2021-01-02 12:35:28 +00: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
Albert Astals Cid
c20f93d26e GIT_SILENT Upgrade Qt5 version requirement to 5.14.0. 2020-12-18 19:10:25 +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
ec113adffe GIT_SILENT Upgrade KF5 version to 5.78.0. 2020-12-12 13:20:11 +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
l10n daemon script
26eb310175 GIT_SILENT Upgrade ECM and KF5 version requirements for 5.77.0 release. 2020-12-05 10:17:09 +00: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
Albert Astals Cid
65d600fa93 GIT_SILENT Upgrade Qt5 version requirement to 5.13.0. 2020-11-27 00:52:43 +01: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