Commit Graph

15920 Commits

Author SHA1 Message Date
Ahmad Samir
e0b7aa680c Remove one Qt 5.15 ifdef
GIT_SILENT
2021-04-17 15:47:51 +02:00
Nate Graham
4fdaec615b [ExpandableListItem] Fix determination of the number of list items
This fixes the problem of the default list item not being rendered with
bold text as intended, which was caused by checking the count property
of the wrong thing and causing a condition to always evaluate to false.
2021-04-13 21:39:12 -06:00
Carl Schwan
1fa74ab477 Fix month and year not getting updated after reseting date to today
The old code forgot to launch some signal by directly assigning todat to
the displayed date. Using the setter make sure everything is displayed
visually.
2021-04-13 18:18:12 +00:00
David Faure
252d4b91d2 GIT_SILENT increase KF_DISABLE_DEPRECATED_BEFORE_AND_AT 2021-04-11 12:09:16 +02:00
l10n daemon script
18c1940a64 GIT_SILENT Upgrade KF version to 5.82.0. 2021-04-10 11:36:29 +00:00
Nate Graham
9ce8e84f5e Fix PC3 TabButton alignment
Prior to a45bd75800, label alignment was
controlled by its Layout properties. However that commit made the label
fill width to fix elision, which means that the Layout.Alignment property
no longer has any effect anymore. Therefore, we need to use the
horizontalAlignment property to position the text within its
now-width-filling box.
2021-04-08 17:58:11 -06:00
Nate Graham
46b46c8135 Port to singleton Theme
We ported units to use the PlasmaCore.Units singleton earlier; now it's
time to do the same thing for PlasmaCore.Theme.

There are no UI changes or regressions detected.
2021-04-08 09:20:52 -06:00
Alexander Lohnau
1fd4040a33 GIT_SILENT Add auto generated files to .gitignore 2021-04-07 21:46:01 +02:00
Nate Graham
2fe8178e75 Correct API documentation for PlasmaExtras.PlaceholderMessage
It's "iconName", not "icon.name". This is a difference from the Kirigami
version for historical reasons.
2021-04-06 09:20:28 -06:00
David Edmundson
a45bd75800 Fix elide of TabButtons
Without fillWidth: true the width is unmanaged by the GridView

If the width is unmanaged it will fit the text

BUG: 434945
2021-04-05 14:34:47 +00:00
Noah Davis
239a48175e [widgets/listitem] Increase left/right margins to match top/bottom margins
4px -> 6px

Previously, they were oddly slim. Left/right margins are usually the same size as top/bottom margins or larger than top/bottom margins.
2021-04-04 21:55:43 -04:00
David Faure
82884be7a6 Fix build by reverting the level of Qt deprecation API.
I'll ensure there's a task about qmlRegisterInterface....
2021-04-04 15:49:48 +02:00
David Faure
508d371184 GIT_SILENT Upgrade Qt5 version requirement to 5.15.0. 2021-04-04 15:10:53 +02:00
l10n daemon script
93598ec180 GIT_SILENT Upgrade ECM and KF version requirements for 5.81.0 release. 2021-04-03 09:39:20 +00:00
Nicolas Fella
28811f2e7f Remove unused includes 2021-04-02 23:44:13 +02:00
Nicolas Fella
f30c84275f Deprecate AppletScript::description()
It's based on the deprecated KPluginInfo
2021-04-01 17:56:44 +00:00
Noah Davis
a9ed527663 [widgets/arrows] Fix viewBox size and naturalSize in SvgItems
The viewBox wasn't right, which made the values reported by naturalSize.width and naturalSize.height extremely small.

If you start an SVG from certain templates in Inkscape and then convert the units to px, the viewBox gets messed up. It won't look messed up in Inkscape because everything will appear scaled correctly, but it's actually roughly 26% of the size it should be. In order to fix this, you need to set the document scale to 1.0 which will cause all of the elements in the SVG to shrink to the size they really were. Then, you need to scale all the elements back up to their original sizes.
2021-03-31 19:20:42 +00:00
Nicolas Fella
aeb21cb68d Remove unused includes 2021-03-31 18:11:48 +02:00
Aleksei Nikiforov
325938ece3 Fix dead code in SvgRectsCache::loadImageFromCache
This dead code was found during investigation of KDE bug 433907.
"ok" is always "false", thus next condition is always "false"
and m_localRectCache is never filled from cache.
It looks like "ok" should be set to "true" if "key" contains a valid integer value.
2021-03-31 15:05:33 +00:00
Dan Leinir Turthra Jensen
8a35f83c4b Add a humanMoment unit to the various Units
Time in milliseconds equivalent to the theoretical human moment, which can be used
to determine whether how long to wait until the user should be informed of something,
or can be used as the limit for how long something should wait before being
automatically initiated.

Some examples:

- When the user types text in a search field, wait no longer than this duration after
  the user completes typing before starting the search
- When loading data which would commonly arrive rapidly enough to not require interaction,
  wait this long before showing a spinner

This might seem an arbitrary number, but given the psychological effect that three
seconds seems to be what humans consider a moment (and in the case of waiting for
something to happen, a moment is that time when you think "this is taking a bit long,
isn't it?"), the idea is to postpone for just before such a conceptual moment. The reason
for the two seconds, rather than three, is to function as a middle ground: Not long enough
that the user would think that something has taken too long, for also not so fast as to
happen too soon.

See also
https://www.psychologytoday.com/blog/all-about-addiction/201101/tick-tock-tick-hugs-and-life-in-3-second-intervals
(the actual paper is hidden behind an academic paywall and consequently not readily
available to us, so the source will have to be the blog entry above)

see also https://invent.kde.org/frameworks/kirigami/-/merge_requests/268
2021-03-31 14:44:50 +01:00
Marco Martin
fb16e8eb20 add PageIndicator
qml should be complete to all qqc2 components otherwise it can't be
accessible as Plasmacomponents 3 import
2021-03-31 15:26:48 +02:00
Nicolas Fella
bfa1100523 [pluginloader] Add methods to list containments using KPluginMetaData
To replace the KPluginInfo-based variants
2021-03-29 20:41:37 +02:00
Nicolas Fella
cde7f8a986 Deprecate PluginLoader::listEngineInfoByCategory
It isn't used anywhere.

It is problematic since it returns KPluginInfo. Instead one can use the
KPluginMetaData-based method and do the filtering manually
2021-03-28 22:24:20 +02:00
David Faure
f54f769d12 GIT_SILENT increase KF_DISABLE_DEPRECATED_BEFORE_AND_AT 2021-03-27 11:41:04 +01:00
Jan Blackquill
d526a2c29a Revert "Redesign calendar component"
This reverts commit b6f9e51b65. The MR
was not approved by anyone and still had outstanding criticisms raised
in the VDG room that were not addressed.

CCMAIL: carl@carlschwan.eu
2021-03-25 19:28:02 -04:00
Carl Schwan
b6f9e51b65 Redesign calendar component
1. This removes the grid around the items
2. The header component is now optional and the API caller can disable it
to add its own.
3. It is now using a SwipeView to provide better touch navigation
4. Use buttons to navigate to year/month/decade view instead of a non-discoverable click on the heading
5. Add some convenient functions to manipulate the view and get its state
6. Add a bit of documentation

Implements https://phabricator.kde.org/file/data/wiv5bs4ucvqnfiibxtjy/PHID-FILE-nnurs2z323lvwrjsavun/system_tray_w%E2%81%84headers_2x.png
2021-03-25 23:26:54 +00:00
Carl Schwan
53b8883019 Mark Plasma Style as internal
So that it doesn't appear on api.kde.org and produce noice.
2021-03-21 20:16:57 +00:00
Carl Schwan
8047c5daad Make private API invisible in api.kde.org 2021-03-21 20:04:54 +00:00
Carl Schwan
fb5dcf1f47 Improve TabBar documentation 2021-03-21 19:55:22 +00:00
Ahmad Samir
3b0d926a95 Add notes about classes that will hopefully be dropped in KF6
Mainly so that no one spends time porting them for KF6...etc
2021-03-18 18:11:40 +00:00
Noah Davis
c159eff4b3 [lineedit.svg] Remove empty space around borders and use 3px corner radius 2021-03-16 12:26:26 +00:00
l10n daemon script
1bb889dfac GIT_SILENT Upgrade KF version to 5.81.0. 2021-03-15 14:42:41 +00:00
Noah Davis
669f25347f [PC3 TextField] set on placeholder text
Fixes cursor not being an I beam when placehoder text is hovered.
2021-03-13 20:06:13 -05:00
Noah Davis
1b71490296 [PC3 TextField] mirrored -> control.mirrored
Fixes "ReferenceError: mirrored is not defined"
2021-03-13 19:59:40 -05:00
Alexander Lohnau
9b7b38004e
GIT_SILENT Fix formatting for templates 2021-03-13 21:52:20 +01:00
Alexander Lohnau
c7c0146cc6
GIT_SILENT Remove trailing comma in QML code 2021-03-13 21:21:15 +01:00
Ahmad Samir
a6e994a391 Add .git-blame-ignore-revs
GIT_SILENT
2021-03-13 17:35:34 +00:00
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
cce6198bb9 Add clang-format bits to CMakeLists.txt
GIT_SILENT
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
Laurent Montel
bc9eb362c8 Remove not implemented method 2021-03-05 20:50:16 +01: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