Commit Graph

4428 Commits

Author SHA1 Message Date
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