Commit Graph

15801 Commits

Author SHA1 Message Date
Noah Davis
54069ee94c Remove minimum size test from PC3 Button test
Also add disabled buttons to the PC3 Button test

The minimum size test didn't make any sense. You don't normally set the implicitWidth of a button to Layout.minimumWidth in a Layout.
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
8fe3f656e8 Add PC3 RoundButton test and add flat buttons to PC3 Button test 2020-08-20 21:06:34 -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
13882a60e1 Fix visual glitches and improve the layouts of component tests 2020-08-19 14:00:44 -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
Andreas Cord-Landwehr
23997c46b4 Remove obsolete COPYING files 2020-08-17 08:00:58 +02:00
David Faure
a230221a54 GIT_SILENT increase KF_DISABLE_DEPRECATED_BEFORE_AND_AT 2020-08-16 01:16:17 +02: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
Volker Krause
3e92503c2a Remove ancient unused ModelTest copy 2020-08-14 15:09:20 +02: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
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