Commit Graph

4410 Commits

Author SHA1 Message Date
Ahmad Samir
2ff586d513 Tweak formatting after running clang-format
NO_CHANGELOG
2021-03-13 17:35:34 +00:00
Ahmad Samir
e7e839e82b Fix build after clang-format reorderd the #include's
Include the public class header in the private one.

NO_CHANGELOG
2021-03-13 17:35:34 +00:00
Ahmad Samir
c0274df69a Run clang-format on all cpp/h files
NO_CHANGELOG
2021-03-13 17:35:34 +00:00
Ahmad Samir
9ae7d71b9a Add a trailing comma to enum
Should help produce better diffs and clang-format won't squash the enum
on one line.

GIT_SILENT
2021-03-13 17:35:34 +00:00
Noah Davis
52b9c9e94a [PC3] Refactor TextField
Compensate for inset in implicit size.

Set padding to 0 if background is not present or does not have the margins property.

Use more of TextField's properties for setting the appearance.

Fix input alignment in RTL layouts.

Use colorGroup to set colors instead of deprecated properties.

Make placeholder text renderType match TextField's.

Use `clear()` instead of `text = ""`.

Use disableTextColor for placeholderTextColor.

Reduce background to 2 elements and set implicit size like most controls.

Set `anchors.rightMargin` of inlineButtonRow to `background.margins.right`.
2021-03-13 13:59:02 +00:00
Niccolò Venerandi
2f48e808d5 Make compositing-off margins in the panel same size of compositing on 2021-03-12 14:54:15 +00:00
Jan Blackquill
96b069d4f4 widgets>lineedit.svg: remove double ring
We aren't using this style yet, so having it in our Plasma
theme is weird.
2021-03-11 21:05:14 -05:00
Dominic Hayes
1b9b03529b Change ContrastEffect check to AdaptiveTransparency in A.T. check
Fix Contrastless Plasma Styles not being able to use Adaptive
Transparency by changing the check, for ContrastEffect being enabled in
the Plasma Style to instead check if AdaptiveTransparency is enabled in
the Plasma Style, for determining if Adaptive Transparency should be
available.

BUG: 434200
FIXED-IN: 5.81
2021-03-11 20:34:11 +00:00
Dominic Hayes
3701b184d8 Revert 4d4db0b199780d8e3a94594fb72739565cd3919d's theme changes
Undoes the theme changes in that commit since they got pushed too
early in the Frameworks release cycle to be effectively Plasma 5.22
exclusive, saddling users on 5.21 with increased transparency all the
time with no way to turn it off. This was not the intended user
experience.

This commit will be reverted in time to be released with Frameworks 5.83,
which will align with the release of Plasma 5.22.

BUG: 434202
2021-03-09 22:31:58 +00:00
Nate Graham
5447cef2d8 Port to singleton Units
The context property version is slower to access and won't be supported
in Qt6. Let's port away from it and use the singleton version instead.

Here was my full process for making this change:

1. Made the change with `find . -name '*.qml' | xargs perl -pi -e 's/units\./PlasmaCore\.Units\./g'`
2. Verified no more occurrences with `grep -r " units."`
3. Made sure this didn't change any comments in a silly way by inspecting the output of `git diff | grep "+   " | grep "//"`
4. Manually inspected the full git diff to make sure there were no other unintentional or silly changes (there were none)
5. verified that all changed files have the PlasmaCore import with the correct name with `for FILE in `git status | grep modified | cut -d ":" -f 3`; do grep -q "as PlasmaCore" $FILE || echo "$FILE needs the PlasmaCore import"; done` (one needed the import)
2021-03-07 13:34:47 +00:00
Nate Graham
177be0c79a Use more standard durations
CCBUG: 433948

Note that this also makes the busy indicator stop spinning at all when
the user has disabled animations. Instead it just shows a static image.
2021-03-05 16:47:08 +00:00
Noah Davis
98810a7dd5 Make durations match Kirigami durations 2021-03-05 06:18:56 -05:00
Nate Graham
15b75de387 [plasmacomponents3/TextField|TextArea] Fix placeholder text
In TextField, it was not disabled, so the mousearea that changes the
cursor shape wasn't working properly. Fixed now.

In TextArea, it was not disabled, not the right color, and was
inappropriately selectable. Fixed now.

The UI tests were testing for these conditions but were broken, and are
now fixed by these changes.

BUG: 433864
FIXED-IN: 5.80
2021-03-02 12:44:07 -07:00
Kai Uwe Broulik
6ac6ff028e [Icon Item] Load .ico files using QIcon
Loading it as a `QImage` just uses whatever first frame there is in the image
whereas `QIcon` has all the logic needed for interpreting `.ico` files and
picking the right pixmap for a given size.

BUG: 429927
2021-03-02 00:35:41 +00:00
Niccolò Venerandi
4d4db0b199 Use adaptive transparency and tweak contrast effect to make better use of it 2021-03-01 22:25:52 +00:00
Nate Graham
aa1ce4e7ea [PlaceholderMessage] Correct my silly mistake
Sorry about that.
2021-03-01 14:46:56 -07:00
Nate Graham
498983d8de [PlaceholderMessage] Sync with Kirigami version
Can't let these drift out of sync.
2021-03-01 10:37:07 -07:00
Marco Martin
f709007d46 add missing sizeForLabels 2021-03-01 14:30:17 +01:00
Aleix Pol
f33d8b795f Print which file is responsible for an error
Makes it easier to debug issues.
2021-02-24 15:51:04 +01:00
Aleix Pol
918dc221e2 --warning
Don't warn when there's no tabs visible
2021-02-24 15:50:08 +01:00
Noah Davis
b84fbb01f7 [PC3 ToolTip] Reduce margins to smallSpacing
CCBUG: 428191

BUG: 433243

FIXED-IN: 5.80
2021-02-19 13:56:16 -05:00
Arjen Hiemstra
e1c784dfa4 Port Plasma Style Kirigami Theme plugin to new Kirigami API 2021-02-12 10:30:43 +00:00
Nate Graham
b4dd1a1819 [plasmoidheading] Use intended color for footers
There's no such color group as PlasmaCore.Theme.WindowColorGroup; the
one corresponding to the window color group is
PlasmaCore.Theme.NormalColorGroup.
2021-02-03 21:39:01 -07:00
Nate Graham
32eef18f50 [plasmacomponents3/spinbox] Fix selected text color
There's no such color as theme.selectedTextColor.
2021-02-03 21:30:16 -07:00
Jan Blackquill
353bb1578b widgets>lineedit.svg: fix pixel misalignment woes
This fixes all visible pixel misalignment and different-sizes-causing-weird-behaviour
issues with the line edit widget.

BUG: 432422
2021-02-02 21:07:31 +00:00
Carl Schwan
33660db124 Fix inconsistent left and right padding in PlasmoidHeading 2021-01-30 18:41:46 +00:00
Nicolas Fella
08f0204d16 Replace KF5_VERSION with KF_VERSION
Frameworks will be Frameworks 6 at some point and there is no good reason to have the major version in the variable name.

Given this is purely internal we can to this now, making it a bit more future-proof

GIT_SILENT

NO_CHANGELOG
2021-01-29 23:25:42 +01:00
Friedrich W. H. Kossebau
47f01a434b Use non-deprecated KDEInstallDirs variables also for CMake config generation
NO_CHANGELOG
2021-01-29 05:31:27 +01:00
Friedrich W. H. Kossebau
1938d19f34 Use non-deprecated KDEInstallDirs variables
NO_CHANGELOG
2021-01-29 01:16:09 +01:00
Noah Davis
0cf8d15a31 Update breeze-dark/breeze-light colors
These now match the BreezeDark and BreezeLight color schemes
2021-01-28 16:22:33 +00:00
David Redondo
63a803b480 Revert "[SpinBox] Fix logic error in scroll directionality"
This reverts commit 90e92a9c67.
The commit caused what it claimed to fix. Also compare with the
desktop style which increases with positive delta.
2021-01-28 16:40:03 +01:00
Jan Blackquill
a5aca68269 widgets>lineedit.svg: fix corners
The top corners of the line edit were previously lenghthened, causing
distortion whenever the lineedit's height changed from that of
the source SVG.

The bottom left corner also had an issue, although it's mostly non visible
GUIwise.
2021-01-27 19:19:53 -05:00
Jan Blackquill
9d0f437335 widgets>lineedit.svg: add double ringed focus
This mirrors its appearance in the Breeze QStyle, improving overall
consistency of the Plasma experience.
2021-01-25 20:56:44 -05:00
l10n daemon script
a12a29e19d 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"
2021-01-24 06:48:01 +01:00
Nate Graham
d1f36580cd [calendar] fix missing import names
This was ported mostly to QQC2 with the StackView, with a "QQC1" import
name added. But these properties got forgotten.
2021-01-22 15:08:38 -07:00
Niccolò Venerandi
4d42a15025 add -hint- to right side margin 2021-01-22 19:23:23 +01:00
Nate Graham
8b16de4f6b [ExpandableListItem] Make expanded actions list view respect font
Previously it was basing its height on an icon size, which does not
scale with the font. As a result, sometimes the actions list could
get clipped when using certian fonts and font sizes. Let's change this
to multiples of GridUnit, which adjusts with the font.
2021-01-20 10:34:30 -07:00
Jan Blackquill
8c320d6841 DaysCalendar: port to PC3/QQC2 where possible
This allows DaysCalendar to take advantage of the work in the previous commits
removing hover animations on PC3 components, and is generally good for modernisation
anyways.
2021-01-18 19:18:55 -05:00
Jan Blackquill
f25b093325 Remove hover animation from flat buttons 2021-01-18 19:15:48 -05:00
Jan Blackquill
d4ec370187 Remove hover animation from calendar
Removing hover animation from calendar tiles makes it feel more responsive
2021-01-18 19:15:48 -05:00
Jan Blackquill
b92744aaea Remove hover animation from listitems
Removing hover animations from listitems makes them feel more responsive
2021-01-18 19:15:48 -05:00
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
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
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
Jan Blackquill
f3bab49d03 Expose error information to error plasmoid in a more structured manner 2021-01-02 02:05:53 +00:00