Commit Graph

4138 Commits

Author SHA1 Message Date
David Edmundson
0417bf61d5 [configview] Simplify code / workaround Qt5.15 crash
Summary:
QQmlComponent::beginCreate and completeCreate are useful if you need to
set properties on the object explicitly. We're not doing that here, we
can just call create.

Test Plan:
On Qt5.15
Right click a panel
choose edit

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28599
2020-04-06 12:30:51 +01:00
Nate Graham
96d203b4b8 Fix i18nd test by removing commented-out i18n() calls in API docs 2020-04-05 18:21:21 -06:00
Nate Graham
863ec93ade Remove the panel tooltip icon
Summary:
As discussed in T12778, the icon can never be in a correct state: either it's
redundant with the icon you're hovering over that made the tooltip appear, or
else it's different from the icon you're hovering over, which is inconsistent.

Since either case is undesirable, let's just remove the icon from the tooltip
entirely. This reduces the visual noise in the tooltip and solves the entire
class of bugs automatically.

Test Plan:
{F8150019}
{F8150017}
{F8150021}

Reviewers: #vdg, #plasma, cblack, niccolove, apol

Reviewed By: #vdg, cblack, niccolove, apol

Subscribers: cblack, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T12778

Differential Revision: https://phabricator.kde.org/D27848
2020-04-04 20:54:45 -06:00
Nate Graham
3bd31386ab Create ExpandableListItem
Summary:
This patch creates the `ExpandableListItem`, a re-usable PlasmaExtras item that can
be used for the views in various Plasma applet pop-ups, such as Vaults, Printers,
Bluetooth, Networks, and Device Notifier. This way those applets can share more code and
not have to implement this paradigm themselves in five different ways, as they currently
do.

All of these applets currently use slightly different visual styles. For example the
network applet uses a pushbutton with no icon as its "default action" button, while
other applets use icons-only toolbuttons. I tried my best to create a component that's
flexible but also consistent, so various applets that adopt it will see minor visual
changes as a result. Hopefully this is acceptable.

Closes T12812

Depends on D28144

Test Plan: {F8183650}

Reviewers: #vdg, #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: mart, davidedmundson, bruns, niccolove, cblack, davidre, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T12812

Differential Revision: https://phabricator.kde.org/D28033
2020-04-04 20:52:53 -06:00
Nate Graham
0739113a44 Make animation durations consistent with Kirigami values
Summary:
Right now longDuration is 120ms and shortDuration is 24ms. This presents three problems:
- The durations are far too fast, especially shortDuration, which is so fast that it seems like there is no animation at all.
- The durations are not consistent with Kirigami, which uses 150 for short and 250 for
 long.
- There is no longer value available, as with the one being added to Kirigami in D28143.

Accordingly, this patch makes the short and long values consistent with Kirigami's values,
and adds a new `veryLongDuration` value to match the one being added to Kirigami in D28143.

Reviewers: #plasma, davidedmundson, mart

Reviewed By: #plasma, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28144
2020-04-04 20:42:35 -06:00
l10n daemon script
26eb57c53e 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-04-04 06:27:52 +02:00
Niccolò Venerandi
8b5e093141 Added Page element
Summary: Page element was missing. I added it.

Reviewers: #plasma, ngraham, mart

Reviewed By: #plasma, ngraham, mart

Subscribers: ngraham, davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28466
2020-04-03 17:14:13 +02:00
Nicolas Fella
bc3ccd1782 [pc3/busyindicator] Hide when not running
Summary: When not running the indicator should be invisible. This matches the behaviour of the org.kde.desktop style.

Test Plan: Run KTrip with Plasma style. Open location search page. Indicator is only shown when actually loading things

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28391
2020-03-29 23:37:59 +02:00
l10n daemon script
f6bb0229b0 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-03-27 06:24:35 +01:00
Nate Graham
e2a13e9ac7 Revert "Make animation durations consistent with Kirigami values"
This reverts commit 049978008b.

This commit changes existing animation durations, and must be landed
simultaneously with Plasma 5.19's release so that rolling release
users don't suffer from very slow animations for a month. Will
re-land after Plasma 5.59 is tagged so it gets released with Frameworks
5.60, the dependency version for Plasma 5.19.
2020-03-24 08:36:30 -06:00
Noah Davis
f363a06ae6 Update window-pin, Add more sizes, Remove redundant edit-delete
Summary:
16 and 22px sizes added for window-pin and unpin. Style was also updated for window-unpin.

edit-delete is redundant because it's already defined in edit.svg. I don't think it's used anywhere at all. It was actually window-close, but renamed to edit-delete for whatever reason.

Test Plan:
{F8195527, size=full}

1. Install patch to kdesrc-build environment
2. Run `plasmashell --replace &` in kdesrc-build environment
3. Check pin button in systray

Reviewers: #vdg, #plasma, cblack, ngraham

Reviewed By: #vdg, cblack, ngraham

Subscribers: cblack, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28228
2020-03-23 19:10:41 -04:00
Nate Graham
049978008b Make animation durations consistent with Kirigami values
Summary:
Right now longDuration is 120ms and shortDuration is 24ms. This presents three problems:
- The durations are far too fast, especially shortDuration, which is so fast that it seems like there is no animation at all.
- The durations are not consistent with Kirigami, which uses 150 for short and 250 for
 long.
- There is no longer value available, as with the one being added to Kirigami in D28143.

Accordingly, this patch makes the short and long values consistent with Kirigami's values,
and adds a new `veryLongDuration` value to match the one being added to Kirigami in D28143.

Reviewers: #plasma, davidedmundson, mart

Reviewed By: #plasma, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D28144
2020-03-20 09:43:45 -06:00
Niccolò Venerandi
7d80f01c31 WIP: Create a new TopArea element using widgets/toparea svg
Summary:
This creates a new component that uses the widgets/toparea svg. First time I try to add something to PlasmaComponents, so I probably got stuff wrong and I probably have to still do thing like adding documentation. I'm creating the diff to get feedback on how to move forward with this.

Depends on D27444

Reviewers: mart, ngraham

Reviewed By: mart, ngraham

Subscribers: ngraham, davidedmundson, ahiemstra, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T10470

Differential Revision: https://phabricator.kde.org/D27695
2020-03-14 19:46:48 +01:00
Niccolò Venerandi
f55f104447 Added plasmoid heading svg
Summary: Adds plasmoid heading for D27189

Reviewers: #vdg, ngraham, ndavis

Reviewed By: #vdg, ngraham

Subscribers: mart, kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T10470

Differential Revision: https://phabricator.kde.org/D27444
2020-03-14 19:46:11 +01:00
Marco Martin
6f34838f97 make highlighted property work for roundbutton 2020-03-12 10:09:04 +01:00
Marco Martin
0b89e7f3f0 Buttons: allow to scale up icons
Summary:
always scale icons unless a size is specified in the api.
this makes icon sizing more in line with plasma components 2

Test Plan:
{F8129062}

{F8129064}

{F8129065}

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27628
2020-03-02 14:42:15 +01:00
David Redondo
b7fa6e0e91 Try to apply the colorscheme of the current theme to QIcons
Summary:
Before icons loaded internally with QIcon::fromTheme were being colored with the
colors from the current global color scheme instead of the ones from the current
Plasma Theme. Leading to visual bugs when the two differ. This happened because
KIconLoader uses the global color scheme by default.
A prominent case is the notification send by the network plasmoid when one
successfully connected to a wireless network. It sets the icon
"network-wireless-on" which is not included in Breeze icons (but is included in
Breeze Plasma Theme). If the current icon theme is indeed Breeze, IconItem
resorts to using QIcon::fromTheme and we end up with a wrong colored
"network-wireless" icon.

BUG: 417780

Test Plan:
{F8125752}

{F8125753}

Reviewers: #plasma, cblack, ngraham, mart

Reviewed By: #plasma, cblack, ngraham, mart

Subscribers: mart, wbauer, cblack, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27589
2020-03-02 11:55:35 +01:00
Daniel Vrátil
b6213cdd59
Dialog: disconnect from QWindow signals in destructor
Summary:
When Dialog is being destroyed, its QWindow super-class may still emit
some signals from its destructor. Dialog is connected so some of them,
so this leads to Qt invoking slots on Dialog, whose destructor has
already been called, leading to crashes.

This patch disconnects all internal connections in Dialog's destructor.

See https://phabricator.kde.org/D23339 for details.

Test Plan: Plasma no longer crashes when a notification appears

Reviewers: #plasma, nicolasfella, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27671
2020-02-26 10:00:45 +01:00
George Vogiatzis
10c112fccd [PlasmaComponents]Clean up ListItem code
Summary:
Removed two unused lines.
Removed old comments.
Minor style changes to comments.

Test Plan: Everything must stay unchanged visually and function wise for ListItems.

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27296
2020-02-25 21:00:02 +02:00
Daniel Vrátil
1e11099c16
Fix initialization order
Reviewers: #plasma, #frameworks, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27627
2020-02-25 14:32:06 +01:00
Daniel Vrátil
4b93b71a49
Fix memory leak in ConfigView and Dialog
Reviewers: #plasma, #frameworks, apol, davidedmundson

Reviewed By: apol, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23339
2020-02-25 14:31:28 +01:00
Nate Graham
6b8f114284 Port away from Title and towards level 1 Heading
Summary: `Title` is deprecated.

Test Plan: No visual changes anywhere; level 1 Heading is identical in appearance

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27350
2020-02-21 08:39:25 -07:00
Marco Martin
ba0b637de9 fix layout size hints for button labels
Summary:
icon sizes and label placements tested correct in  several scenarios

* control.icon.width/height is used as maximum size of the icon
* if the button is smaller icons always scale down
* icons stay ccentered regardless of button size when there is no text

Test Plan:
fixes icon sizes without workarounds like D27260
{F8108705}

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27460
2020-02-19 12:12:41 +01:00
Laurent Montel
9f02cf685a Use no deprecated qprocess api 2020-02-17 16:44:25 +01:00
Marco Martin
667dce502a make sure the size hints are integer and even
Summary:
for retrocompatibility with pc2 units.gridUnit * 1.6 is used
a lot as size hint (we have to guarantee buttons and
textfields have the same height by default for perfect
horizontal alignment.
tough we have make sure that size is integer and even otherwise
we'll have a lot of internal misalignments

Reviewers: broulik

Reviewed By: broulik

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27399
2020-02-14 13:55:21 +01:00
Marco Martin
3de1c2462e support icon.width/height
Summary:
support the icon size hint of the control. Reinstate it in ToolButton
and add the support for the other controls
CCBUG:417514

Test Plan:
possible to control buttons icon sizes
mediacontroller taskbar tooltip with icons set to small:
{F8103363}

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27396
2020-02-14 12:37:42 +01:00
Niccol Venerandi
1ed47e7c41 Remove hardcoded colors
Summary:
Fixes https://www.reddit.com/r/kde/comments/f2mxd3/517_seeing_weird_white_corners_on_my_autohiding/

BUG:417511

Reviewers: ndavis

Reviewed By: ndavis

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27354
2020-02-13 18:18:09 +01:00
Kai Uwe Broulik
1dc36bc2ce Construct NullEngine with KPluginMetaData()
The deprecated constructor taking a KPluginInfo unconditionally calls toMetaData() and then asserts.

BUG: 417548

Differential Revision: https://phabricator.kde.org/D27366
2020-02-13 15:21:49 +01:00
Marco Martin
97d431270d remove broken references 2020-02-12 18:14:23 +01:00
Marco Martin
655cc40db8 fix TabButton 2020-02-12 17:10:40 +01:00
Nate Graham
a9ea008b8d Slightly reduce level 1 heading size
To match the change agreed to in https://phabricator.kde.org/D27198
2020-02-12 08:04:53 -07:00
Marco Martin
1b1dc79dc4 Revert "Make the attached property a simple QObject"
This reverts commit 68a273aef6.

introduced regressions in several places
2020-02-12 12:00:21 +01:00
Friedrich W. H. Kossebau
2e3cc7e8dd Use ecm_qt_install_logging_categories over manual categories file 2020-02-12 04:09:12 +01:00
Nate Graham
9d27675c3b Vertically center tooltip icon/image
Summary:
Right now the widget tooltip's icon/image is top-aligned, which in practice makes it
vertically centered when the tooltip has only one line of text, but not vertically
centered when there are two lines of text.

This patch makes it vertally centered all the time, improving the appearance.

Test Plan:
Before: {F8095695}

After: {F8095696}

{F8095697}

Reviewers: #vdg, #plasma, filipf, ndavis

Reviewed By: #vdg, filipf, ndavis

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27299
2020-02-10 11:17:30 -07:00
Marco Martin
2b78afd921 support display property for Buttons
tested on buttons, toolbuttons and tabbuttons
2020-02-10 18:42:11 +01:00
Marco Martin
014c3fd104 revert unrelated changes in previous commit
Button and ToolButton were't supposed to be touched by previous commit
2020-02-10 17:00:36 +01:00
Marco Martin
68a273aef6 Make the attached property a simple QObject
Summary:
move all the logic in an attached property QObject
it's a bit less heavy to create so should make things slightly better
when this is used in delegates

Test Plan: Plasmoid background removal (with colors inversion) still works

Reviewers: bshah, #plasma

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27200
2020-02-10 16:49:55 +01:00
Nate Graham
b76b908e10 Don't warn for invalid plugin metata
Summary:
See explanation in https://bugs.kde.org/show_bug.cgi?id=412464

BUG: 412464
FIXED-IN: 5.67

Test Plan: restart plasmashell, see way less useless warning spam

Reviewers: #plasma, mart, apol

Reviewed By: apol

Subscribers: apol, alex, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27080
2020-02-07 06:34:07 -07:00
Marco Martin
0c897d8048 tooltips always have normal colorgroup 2020-02-05 12:28:34 +01:00
Johnny Jazeix
2ea27fb068 fix compilation + remove duplicate in src 2020-02-04 08:32:05 +01:00
Tranter Madi
f8be3ea710 Optimize code when dropping files into the desktop
Summary:
Currently, when you have the desktop in the Desktop layout, if you drop 10 jpg files into the desktop, it creates 10 menus at the same position.
When you have the desktop in the Folder layout, if you drop 10 jpg files into the desktop, it calls `KIO::setApplicationActions()` 10 times.

What does this improve?

- Do not create KIO::MimetypeJob for each file
- Do not call `DropJob::setApplicationActions()` too many times/ create too many menus for each file.

My idea is that, when you drop files into the desktop:
- If they have the same `mimetype` -> we add actions support this `mimetype`.
- If not -> we only show the action from `KIO::DropJob` and only actions support different `mimetypes` at the same time like `Add icon`...

**Require:** D26484
CCBUG: 415917

Reviewers: #plasma, mart, broulik, #vdg, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, anthonyfieroni, #plasma, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26691
2020-02-04 12:54:38 +07:00
Niccol Venerandi
f7b4bbf861 Fixed tooltip corners and removed useless color attributes
Reviewers: ndavis

Reviewed By: ndavis

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27075
2020-01-31 23:17:03 +01:00
Niccolò Venerandi
ffbd186975 Removed hardcoded colors in background SVGs
Summary: Alternative and more basic patch to D26955, this aims to fix the background color without breaking the mask

Reviewers: #vdg, #plasma, ndavis

Reviewed By: #vdg, ndavis

Subscribers: ndavis, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26968
2020-01-28 11:58:11 -05:00
Noah Davis
ad625f68f3 Fix the size and pixel alignment of checkboxes and radiobuttons
Summary:
The checkboxes and radio buttons in plasmashell were signficantly different from checkboxes and radio buttons in the Breeze QStyle. This patch is needed to make D26271 look nicer.
- Plasmashell checkboxes and radio buttons were much larger.
-- 24x24 for checkboxes and 29x29 for radio buttons (Plasmashell) vs 16x16 (QStyle).
- Pixel alignment was very poor.
-- Checkbox indicator was 14x14, stretched to 24x24.
-- Radio button background was 22x22 or 32x32, adjusted to 29x29.
-- Radio button indicator was 16x16, stretched to 29x29.
- Style was different.
-- Checkbox indicators had sharper corners and less margin around the inner rectangle.
-- Radio buttons had a hardcoded dark gray circular frame and a shadow on the bottom of the inside of the frame.
-- Radio button indicators had less margin around the inner circle.

Test Plan:
{F7891476}

{F7891477}

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26758
2020-01-28 01:31:07 -05:00
Niccolò Venerandi
35351ba3f2 Update breeze theme shadows
Summary: I have received negative feedback (and I agree with it) on the current state of breeze shadows: they are quite dark, narrow, and feel unnatural. I tried to adress that by making shadows more sparse and a bit lighter especially on the angles while trying to keep it distinguishable when on white background. I received some positive feedback on these shadows from T10891 and the VDG channel. More specifically, I changed dialogs/background.svg to have a) longer linear gradients and b) radial gradients instead of linear on the four sides to make the center darker than the angles.

Test Plan:
{F7765496}
{F7765497}
{F7765500}

Reviewers: #vdg, ngraham, The-Feren-OS-Dev, ndavis

Reviewed By: #vdg, ngraham, The-Feren-OS-Dev, ndavis

Subscribers: The-Feren-OS-Dev, mart, broulik, cblack, ndavis, manueljlin, ngraham, filipf, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25015
2020-01-23 11:22:16 +01:00
Vlad Zahorodnii
f5f43514af [Plasma Quick] Add WaylandIntegration class
Summary: It allows us to get rid of DialogShadows::waylandPlasmaShellInterface().

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Maniphest Tasks: T12496

Differential Revision: https://phabricator.kde.org/D26491
2020-01-22 02:42:02 +02:00
Laurent Montel
1e5966147d QHash::insertMulti is deprecated in qt5.15 => port to QMultiHash
Summary: Port to QMultiHash

Reviewers: apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26736
2020-01-18 07:40:52 +01:00
Friedrich W. H. Kossebau
1c60859999 API dox: do not use ":" after "@since"
GIT_SILENT
2020-01-16 12:30:31 +01:00
Marco Martin
02e57319f7 Same behavior for scrollbar as the desktop style
Summary:
bigger scrollbar and add a small line separator
to look consistent with D26655 and D26654

same behavior for mobile scrollbar

Test Plan: {F7882876}

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26664
2020-01-15 16:58:59 +01:00
Friedrich W. H. Kossebau
4d7ba16825 Fix some @since & PLASMA_ENABLE_DEPRECATED_SINCE of last commit 2020-01-12 07:36:34 +01:00
Aleix Pol
591aceb3f9 Make use of KPluginMetaData where we can
Summary: Instead of relying on the older KPluginInfo which is slower (parses de metadata twice) and comes from a much higher tier.

Test Plan: Running plasmashell with it

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: kossebau, broulik, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23682
2020-01-12 02:38:56 +01:00
Björn Feber
629db2f3b5 Add edit mode menu item to desktop widget context menu
Summary:
- much improves discoverability of the ability to move added widgets without clicking and holding (I have seen people having trouble figuring it out)
- makes it more consistent with panel widget context menus
- allows easier access to the edit mode when the desktop is full of widgets

Test Plan: Open the context menu of a widget on the desktop.

Reviewers: #plasma, #vdg, mart, ngraham, davidedmundson

Reviewed By: #plasma, #vdg, ngraham, davidedmundson

Subscribers: davidedmundson, ngraham, broulik, mart, #vdg, kde-frameworks-devel, #plasma

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26043
2020-01-10 14:40:01 +01:00
Marco Martin
1d6870b156 Consistency: colored selected buttons
Summary:
color selected buttons to the highlight color when it has keyboard
focus.
This makes the behavior much more similar to the Breeze desktop style

Test Plan:
selected buttons look blue on Breeze, old themes still work as they did
Before
{F7872340}
After
{F7872341}

QWidget
{F7872344}

Reviewers: #plasma, #vdg, #goal_consistency, ngraham

Reviewed By: #vdg, ngraham

Subscribers: davidedmundson, ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26540
2020-01-09 17:32:23 +01:00
Laurent Montel
b387faa935 Port qrand to QRandomGenerator (qrand is deprecated in qt5.15)
Summary: Port to QRandomGenerator

Reviewers: apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26464
2020-01-07 06:47:10 +01:00
Laurent Montel
3f30f91fb0 Port endl to \n Not necessary to flush as QTextStream uses QFile which flush when it's deleted
Summary: Port endl to \n

Reviewers: dfaure, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26465
2020-01-07 06:46:45 +01:00
l10n daemon script
8232ed1b78 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-01-06 05:54:59 +01:00
l10n daemon script
d1517cee22 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-01-05 05:54:31 +01:00
Kai Uwe Broulik
886fd953fd [ToolTip] Round position
Otherwise screws up font rendering
2020-01-03 19:36:10 +01:00
Aleix Pol
66122410a1 Enable wheel events on Slider {}
Summary:
So far PC3 version of the slider doesn't react to events, this change
enables it.

Test Plan: Used it with a test.

Reviewers: #plasma, broulik, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26055
2019-12-30 18:49:56 +01:00
l10n daemon script
6f183b4ce4 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"
2019-12-25 05:41:48 +01:00
David Edmundson
d25bc3ce21 Sync QWindow flag WindowDoesNotAcceptFocus to wayland plasmashell interface
Summary:
Currently the widget explorer relied on some QML code calling
KWindowSystem::forceActiveWindow which on plasma implicitly set this
hint.

This works for the first show, but the order of events is somewhat
unreliable. It's invoked from QML when the window is ready, but for the
second show this is before the wl_surface is created and it no-ops.

By syncing the flags in applyType() we can guarantee we call this both
when setFlags is called and when the wl_surface is created in the
correct order.

BUG: 415124
BUG: 401172

Test Plan:
Ran plasmashell
Opened widget explorer twice
Had focus each time

Reviewers: #kwin, #plasma, romangg

Reviewed By: #kwin, #plasma, romangg

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26153
2019-12-22 12:37:04 +01:00
Laurent Montel
d345bdd87f Port deprecated QSet::toList method 2019-12-19 13:55:07 +01:00
David Edmundson
6756d00fba [calendar] Check out of bounds array access in QLocale lookup
Summary:
If we have a broken locale setup we don't have any uiLanugages to look
up the relevant locale object for.

In that case use the system locale.

Test Plan:
Had a crash here

#11 0x00007ff982aab0b2 in QList<QString>::at(int) const (this=0x7ffd50b1d928, i=0) at /opt/qt5/include/QtCore/qlist.h:571
#12 0x00007ff982aaaa4a in Calendar::monthName() const (this=0x5640cce026f0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/declarativeimports/calendar/calendar.cpp:202
#13 0x00007ff982aa14e9 in Calendar::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x5640cce026f0, _c=QMetaObject::ReadProperty, _id=9, _a=0x7ffd50b1dd40) at src/declarativeimports/calendar/calendarplugin_autogen/EWIEGA46WW/moc_calendar.cpp:340

Reviewers: #plasma, vkrause

Reviewed By: vkrause

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25960
2019-12-18 12:52:15 +00:00
Luigi Toscano
991ecb5ed6 Update the obsolete projects.kde.org URL
Use the generic redirect commits.kde.org.

Change discussed on the kde-frameworks-devel list:
https://mail.kde.org/pipermail/kde-frameworks-devel/2019-November/097564.html
2019-12-15 23:55:27 +01:00
Kai Uwe Broulik
192a50fe8c [Plasma Dialog] Use QXcbWindowFunctions for setting window types Qt WindowFlags doesn't know
... but Qt XCB does, such as Notification type.
This ensures QXcbWindow keeps the correct window types around so we don't have Qt setting it back
to e.g. Dialog when we change some flags and then having to manually set it back using KWindowSystem.

Only for types that aren't in NET WM like OSD and Critical Notifications will it have to fall back to
the old codepath. It also just uses it directly on Wayland.

Differential Revision: https://phabricator.kde.org/D26000
2019-12-15 16:32:12 +01:00
David Faure
00ddc6c1f0 [plasma-framework] port away from deprecated KF5 APIs
Summary:
KDeclarative::setupBindings() is deprecated, replaced calls with its
implementation (setupContext + static setupEngine call), but see comment
about whether we can be sure this is done only once per engine, as
requested by the setupEngine API. It's 100% equivalent to the old code
though, can't be worse.

KPackage::contentsHash is deprecated, replaced call with implementation.

Depends on D25433 for the KActionCollection::changed signal.

Test Plan: Builds

Reviewers: mart, davidedmundson, broulik, apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25434
2019-12-15 00:01:39 +01:00
Aleix Pol
b9a76966a7 Remove unnecessary qml namespace 2019-12-14 00:18:37 +01:00
Noah Davis
bcc1ba205d Add 32, 48 and 64 px user-desktop icons
Summary: This prevents the icon from becoming blurry at fairly normal panel widths.

Test Plan:
{F7816867, size=full}

- make/ninja install
- rm -r ~/.cache/plasma*
- plasmashell --replace &

Reviewers: #plasma, #vdg, ngraham

Reviewed By: #vdg, ngraham

Subscribers: ngraham, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25897
2019-12-13 14:43:06 -05:00
Aleix Pol
208b94365c Ignore parent scopes that are in the process of being removed
Summary:
When we destroy a colorscope, all children will try to reparent. This patch
makes it so they never pick an object if it's being removed.

Test Plan:
The logout screen greeter and kscreenlocker doesn't crash anymore
upon close.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25953
2019-12-13 17:04:55 +01:00
Aleix Pol
c33fcaa8d7 Consistently define the tooltip delay
Summary: Set the right value on the Kirigami.Units and use it from tooltip.

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25918
2019-12-13 15:03:24 +01:00
David Edmundson
c5a3d7cd54 [PC3] Complete plasma progress bar animation
Summary:
Otherwside if we toggle indeterminate the bar resizes to 50% of the view
and X stops on the current value of the animation. Resulting in
something that looks super odd.

Test Plan: Plasma Components manual uit test looks sane

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25927
2019-12-12 22:18:12 +01:00
David Edmundson
e91ba953ea [PC3] Only show progress bar indicator when the ends won't overlap
Summary:
If the width is smaller than LeftMargin + Right Margin the two ends
overlap and it looks super weird

Test Plan: Progressbar manual unit test looks sane

Reviewers: #plasma

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25926
2019-12-12 22:18:12 +01:00
Nate Graham
5172b920f9 [RFC] Fix Display Configuration icon margins
Summary:
The icon's old margins were too large, causing it to stick out.

BUG: 400087
FIXED-IN: 5.66

Test Plan:
{F7813886, size=full}

{F7813885, size=full}

Reviewers: #vdg, ndavis

Reviewed By: #vdg, ndavis

Subscribers: trickyricky26, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25296
2019-12-12 18:16:21 +01:00
Aleix Pol
a1880d1e56 Fix warning 2019-12-12 13:04:17 +01:00
Aleix Pol
e32d28e548 fix warnings, remove unused captured variables 2019-12-12 11:33:48 +01:00
Kai Uwe Broulik
8f7b2c9ae0 [ColorScope] Work with plain QObjects again
Otherwise colorScope doesn't attach to things like Plasma.Svg.
Also remove superfluous cast as parentItem() returns a QQuickItem *.

Differential Revision: https://phabricator.kde.org/D25887
2019-12-11 16:02:11 +01:00
Kai Uwe Broulik
e44cab6ab5 [Breeze Desktop Theme] Add monochrome user-desktop icon
This ensures the "show desktop" plasmoid remains monochrome in the panel at any size.

Differential Revision: https://phabricator.kde.org/D25885
2019-12-11 15:56:30 +01:00
Aleix Pol
7a9b50c8dc Remove default width from PlasmaComponents3.Button
Reviewed by Marco Martin
2019-12-11 15:36:44 +01:00
Aleix Pol
2649878108 Fix some bits in the Plasma style
Use properties that exist
Remove unused warningy code
Make sure we don't call null objects

Reviewed by Marco
2019-12-11 14:43:37 +01:00
Filip Fila
e4e1613b0f [PC3 ToolButton] Have the label take into account complementary color schemes
Summary:
We've ported the SDDM theme to PC3 and now have black labels in PC3 ToolButtons (keyboard and session button).

The SDDM theme uses a complementary color scheme, which is something the PC2 ToolButton respects and turns the labels white.

Therefore I just copy pasted PC2's label color code to its PC3 counterpart.

BUG: 414929
FIXED-IN: 5.66

Test Plan:
```
import QtQuick 2.13
import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.plasma.core 2.0 as PlasmaCore

PlasmaCore.ColorScope {
    colorGroup: PlasmaCore.Theme.ComplementaryColorGroup

    Rectangle {
        height: 80
        width: 100
        color: "red"

        PlasmaComponents.ToolButton{
            anchors.fill: parent
            text: "sup"
        }
    }
}
```

The label was white instead of black.

Reviewers: #plasma, ngraham, davidedmundson

Reviewed By: #plasma, ngraham, davidedmundson

Subscribers: mart, davidedmundson, fvogt, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25699
2019-12-11 13:50:11 +01:00
Noah Davis
7e52c869de Added background colors to active and inactive icon view
Summary:
Added:
- Semi-transparent blue background color for active window
- Semi-transparent gray background color for inactive but not minimized window

Changed:
- Reduced opacity for minimized background

BUG: 370465
FIXED-IN: 5.66

Test Plan:
Before:
{F7804957}
After:
{F7805236}

Reviewers: #vdg, ngraham, niccolove

Reviewed By: #vdg, ngraham

Subscribers: filipf, manueljlin, ngraham, ndavis, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25340
2019-12-09 13:00:43 -05:00
l10n daemon script
d2fba8a760 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"
2019-12-09 05:18:11 +01:00
Marco Martin
af861eb2a4 move backgroundhints managment in Applet
Summary:
Applet is the more proper way to do it (and will make easier porting
to KF6) this also make it possible for the scripting interface to
access userBackgroundHints

Test Plan: everything behaves the same in plasmashell, the background button in the handle works

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25742
2019-12-05 10:41:57 +01:00
Marco Martin
1da69dd751 use the file selector in the interceptor
we still need at least for kf5 lifetime to use PackageUrlInterceptor
so use the selector there
this fixes a regression where old plasmoids with javascript in /code/
did break
2019-12-03 11:05:47 +01:00
Marco Martin
7a301be293 more use of ColorScope 2019-11-29 14:57:21 +01:00
Marco Martin
09e7a5a6bb also monitor window changes
fixes some scopes not finding their parent and
never getting notified when it changes
2019-11-29 13:44:58 +01:00
Marco Martin
57fdb56790 support for user removing background and automatic shadow
Summary:
add the ability for the user to override the background hints anddecide
about applets having background or a shadow
A new handle button will be added to manually enable/disable background for
plasmoids that support it
if they don't, the ImmutableBackground flag is set in the hints.

PlasmaCore.ColorScope has been expanded to work more like Kirigami.Theme (which will be replaced by) even if it's oòld behavior still works. This makes the complementary colorscope in applets with shadow actually work (and at the same time gives a clearer porting path for kf6)

Test Plan: Tested the functionality and correct save/restore

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, ndavis, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25590
2019-11-29 10:45:08 +01:00
Marco Martin
15e3d10ef8 support file selectors 2019-11-26 10:25:32 +01:00
Marco Martin
c79118e907 support qml file selectors 2019-11-25 18:21:26 +01:00
Marco Martin
24702a5353 remove stray qgraphicsview stuff 2019-11-22 16:18:54 +01:00
Marco Martin
4089bba04a remove dead files
fullscreensheet and fullscreenwindow were leftovers from porting to kf5
and have not been built since years, remove them
2019-11-22 16:14:50 +01:00
David Faure
6de88ef932 Port away from deprecated method authorizeKAction, renamed to authorizeAction 2019-11-20 23:51:59 +01:00
l10n daemon script
e0b70205f7 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"
2019-11-13 05:39:52 +01:00
Yuri Chornoivan
052a81f755 Fix minor issues found by EBN and typos 2019-11-10 12:06:10 +02:00
Marco Martin
b58d7c7752 don't delete and recreate wallpaperinterface if not needed
Summary:
the wallpaperinterface instance already reacts to wallpaper package
change and loads the current one.
containemtninterface deleted it every time the wallpaper changed
and recreated, effectively loading the wallpaper two times every time
the plugin was changed

Test Plan: switching plugins still works, but it's actually visible faster on slow hardware

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25217
2019-11-08 16:28:36 +01:00
Méven Car
000022b668 MobileTextActionsToolBar check if controlRoot is undefined before using it
Summary:
Prevents warning such as

qml/org/kde/plasma/components.3/mobiletextselection/MobileTextActionsToolBar.qml:62: TypeError: Cannot read property 'selectedText' of null
qml/org/kde/plasma/components.3/mobiletextselection/MobileTextActionsToolBar.qml:70: TypeError: Cannot read property 'selectedText' of null
qml/org/kde/plasma/components.3/mobiletextselection/MobileTextActionsToolBar.qml:78: TypeError: Cannot read property 'canPaste' of null

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D25164
2019-11-06 15:20:31 +01:00
l10n daemon script
876dafaedb 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"
2019-11-06 05:33:56 +01:00
Konrad Materka
96b7fc21f5 Add hideOnWindowDeactivate to PlasmaComponents.Dialog
Summary: When using Dialog or QueryDialog it should be possible to set hideOnWindowDeactivate flag.

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D24825
2019-11-04 10:09:16 +01:00
l10n daemon script
29104614ef 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"
2019-11-01 05:25:32 +01:00
l10n daemon script
1928390d1f 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"
2019-10-30 05:30:22 +01:00