Commit Graph

15673 Commits

Author SHA1 Message Date
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
l10n daemon script
458ba419f3 GIT_SILENT Upgrade KF5 version to 5.74.0. 2020-08-08 10:28:37 +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
74de953ce6 GIT_SILENT Upgrade ECM and KF5 version requirements for 5.73.0 release. 2020-08-01 17:13:57 +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
Nate Graham
1a2e4023b0 Correct QT Bug URL for font rendering hack
This makes it clear which version of Qt (5.14) Frameworks has to be
able to depend on before we can remove the font rendering hack.
2020-07-14 16:35:28 -06:00
Shantanu Tushar
c0e721429c Don't use hand cursor because it is not consistent
We should use the normal arrow cursor when a list item is hovered.
The hovered state is depicted with a highlight already, so the hand
cursor is unnecessary and doesn't go well with the rest of the desktop.
2020-07-14 20:40:59 +05:30
Nate Graham
cc86759139 [ExpandableListItem] use standard button sizes
The sizes of the context buttons on the list item were being overridden
for no apparent reason. Let's stop doing that so that the button sizes
are consistent with other PC3 button sizes.
2020-07-14 03:55:15 +00:00
Nate Graham
bc4a6d06bc [PlasmaComponents3] Show ToolButton focus effect and omit shadow when flat
Make sure the shadow item--which includes the hover effect, if present--can
be shown when the ToolButton is focused, and also always omit the shadow
when the ToolButton is flat.
2020-07-14 03:50:31 +00:00
Marco Martin
e7fadd1671 fix borders size 2020-07-13 17:34:23 +02:00
Marco Martin
8688fdaab4 remove empty pixel around 2020-07-13 17:19:17 +02:00
Nate Graham
e607c1ae47 Unify height of PC3 buttons, TextFields, and Comboboxes
Now all of them have a base height of units.gridUnit. Combined with
the standard 6px margins it works out to make all of these controls
a uniform 30px tall with the default Noto Sans 10 font. If the font
is changed or the size is increased, even to absurd levels, all of
them scale evenly.
2020-07-13 14:59:59 +00:00
Friedrich W. H. Kossebau
2ce6774718 Use KF-standardized Qt logging categories
See https://community.kde.org/Frameworks/Frameworks_Logging_Policy
2020-07-13 03:16:11 +02:00
l10n daemon script
81aed18cf3 GIT_SILENT Upgrade KF5 version to 5.73.0. 2020-07-12 21:55:03 +00:00
Nate Graham
26fdcbea63 [PlasmaComponents3] Add missing features to TextField
The PC3 version was missing the clear button and show password button,
which the PC2 version has. This should allow us to port more things to
use the PC3 version.
2020-07-11 14:11:32 -06:00
Nate Graham
12dd2589f6 [ExpandableListItem] Fix silly error 2020-07-10 23:05:21 -06:00
Noah Davis
2ed274da76 Rewrite button.svg to make it easier to understand 2020-07-08 11:50:57 -04:00
Laurent Montel
e45a66139a Use camelcase include. (scripted) 2020-07-08 07:44:43 +02:00
David Edmundson
582d9ed38d Copy DataEngine relays before itterating
relay->checkQueueing emits a signal to all observers. As it's a signal
anything can happen at that point. It's seemingly common for a receiver
to connect/disconnect a new visualisation which in turn alters
d->relays.

This broke when a foreach (with implicit shallow copy) was ported to a
for statement.

This report contains a good analysis and test case

BUG: 422973

Probably also:

BUG: 421392
BUG: 423713
BUG: 423776
BUG: 422230
BUG: 423081
2020-07-07 08:18:23 +00:00
Eugene Popov
b713e96531 Make signal strength in network icons more visible
Currently, I see that the icons that show available and connected networks are not 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 reduce the opacity of faded lines. As for me, this solution makes determining the signal level more convenient and the icons more informative.

BUG: 423843
2020-07-04 19:47:57 +00:00
l10n daemon script
fb87efff68 GIT_SILENT Upgrade ECM and KF5 version requirements for 5.72.0 release. 2020-07-04 09:58:59 +00:00