BUG: 385097
This revision further improves the quality of images in notifications
that was addressed in revision D9993. When I first looked into this, I
tried setting ScaleType on the PreviewJob but it had no effect. I found
that the preview images were being scaled to the small vertical size
that was requested, and this resulted in my first revision. I should
have tried setting ScaleType in addition.
Notification with unpatched libnotificationshelperplugin.so
{F5677396}
Notification with patch applied
{F5677397}
Test Plan:
Take screenshot with Spectacle with unpatched
libnotificationshelperplugin.so installed and observe the blurry
preview image in the notification.
Install the patched libnotificationshelperplugin.so and restart
plasmashell.
Take another screenshot with Spectacle and observe the much improved
quality of the preview image in the notification.
Reviewers: #plasma_workspaces, #plasma, broulik, ngraham
Subscribers: #plasma, #plasma_workspaces, plasma-devel, broulik, ngraham
Tags: #plasma, #spectacle
Differential Revision: https://phabricator.kde.org/D10146
Summary:
BUG: 385097
FIXED-IN: 5.12.0
This patch to plasma-workspace is to improve the quality of images in notifications as reported in [[ https://bugs.kde.org/show_bug.cgi?id=385097 | Bug 385097 ]].
It is still not perfect because KIO::PreviewJob is used to create the thumbnail, and it only produces two sizes, 128px and 256px, so it is likely that a small image will be scaled up, blurring it somewhat.
I took two screenshots of the same Dolphin window. Here is the before, without the patch:
{F5665511}
And the after, with the patch:
{F5665513}
Better, but still not perfect.
Test Plan: Take screenshots with Spectacle with and without the patched libnotificationshelperplugin library and observe the image quality in the notification. plasmashell must be restarted when the library file is changed for it to take effect.
Reviewers: #plasma_workspaces, #plasma, broulik
Reviewed By: #plasma_workspaces, #plasma, broulik
Subscribers: broulik, ngraham, plasma-devel, #plasma_workspaces, #plasma
Tags: #spectacle, #plasma
Differential Revision: https://phabricator.kde.org/D9993
Qt's Drag attached property doesn't like it at all when it gets deleted during drag. (QTBUG-65701)
Even though we try very hard to keep the popup open, when you have multiple notification applets, their dialogs don't know each
other but access a shared data engine.
This means that, since there can only we one hovered dialog at a time, another notification applet might still dismiss the
notification and have our dialog close.
By using a singleton NotificationHelper we 1.) decouple the Drag from the item and 2.) share the "is dragging" state between applets.
BUG: 388684
FIXED-IN: 5.12.0
Differential Revision: https://phabricator.kde.org/D9754
Makes it more obvious there's a menu with more options.
You can still right-click the thumbnail area as before.
Differential Revision: https://phabricator.kde.org/D9255
Summary:
drop most of the positioning code, drop the animation of the
window position. position the popup in the signal handler of
visibleChanged as we are sure there the size is final and the
first expose event didn't arrive yet.
at that point we are sure the size is the final and correct one
the animation is supposed to be done by the morphingpopups effect
instead.
Test Plan:
notification positions are always correct now, both on X11 and
Wayland.
Unfortunately on x11 the notification typ doesn't seem to pass,
so they are correctly animated only in wayland
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: apol, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6216
Since it represents a file, right clicking it should provide similar options found in a file manager.
This allows to open the application with an application other than the default, e.g. if you
want to edit the screenshot right away. It also offers a "Copy to clipboard" action as well as
service actions, such as send as email.
Differential Revision: https://phabricator.kde.org/D4838
When a notification contains URLs, they will be shown as a large preview (in case of one
thumbnail) or multiple in a strip (similar to what Klipper does).
The previews can be clicked to open the file and can be dragged anywhere (e.g. to a
webbrowser or chat window).
Differential Revision: https://phabricator.kde.org/D3539
For some reason I have not yet fully identified, the notification popup
can get its y coord reset to 0 on resizing. This is a workaround but
fixes an annoying problem.
Now with the geometry being correct right after the popup is
being displayed, it can be placed directly to its exact intended
position (compared to sliding from default position because the
geometry was not known).
This should fix any issues left with the popups flying across
the screen and removes tons of code as a bonus.
REVIEW: 126668
This patch does this:
* moves the screen handling code from the import into
the applet baseclass, which can access the containment
available screen rect and watch for screen changes
* fixes the applet config dialog's custom screen position
setting which has a bug of always being enabled
* consolidates duplicated code in the helper import
into functions
* ensures that popups have correct positions when on
screen that does not start with y=0 (and x=0 in some
cases too)
REVIEW: 126408
CCBUG: 353966
CCBUG: 356461
This slot gets triggered also on popup hiding, which is unwanted.
Should also prevent a crash when unloading notifications applet while
there is an active popup on screen.
BUG: 356402
FIXED-IN: 5.5.1
The notifications popup positioning recently regressed
by some other changes (looks like Qt) and the popups
would fly across the screen.
The proper solution is using KWin effect but given how
close the release is, this needs to be dealt with in a
different way.
The main problem is calculating the initial popup size
because as long as the Dialog is invisible, it has an
incorrect geometry, so it needs to be positioned right
after it's being displayed. The Dialog however gets the
sizes even later, so the code now calls a slot from Dialog
that ensures the sizes are correct before the initial
placement on screen. It's not ideal but I'm out of ideas
otherwise. Plus it should be only temporary until the
KWin effect will replace it.
Besides that, it moves the custom position handling from the
QML into the C++ applet class, making it easier.
REVIEW: 126221
BUG: 355069
FIXED-IN: 5.5.0
It can happen that a notification is placed in the show queue and then
it's closed (eg. programatically) before it was even shown. In this case
the notification must be cleared from the show queue otherwise it will
get displayed and hidden but the popup is never freed for reuse,
resulting in notificaions starting at higher position from the panel.
BUG: 342605
It can happen that a notification is placed in the show queue and then
it's closed (eg. programatically) before it was even shown. In this case
the notification must be cleared from the show queue otherwise it will
get displayed and hidden but the popup is never freed for reuse,
resulting in notificaions starting at higher position from the panel.
BUG: 342605
There were situations when the same notification popup could be be
inserted twice into the available popups list, breaking the positioning
as it would create more notifications than it was able to but they would
never get closed and would offset the whole stack.
One of such scenarios was when user manually closed the popup with the
close button. After it was hidden, the hiding timer still went on to
fire and close it again, causing the above.
Should be all fixed now.
BUG: 342605
When a job finishes, it has an Open button. But we need to check if we
actually have a valid URL first. QUrl::fromUserInput().isValid() seems
like a perfect fit, but as it's not available in QML, I've added it as a
singleton to the notifications helper.
Reviewed-by: Kai Uwe Broulik
This prevents some apps to spam lots of notifications when all it needs
is actually just one single notification.
Imagine you're switching songs in your playlist quickly and each song
change sends new notification, but when you get to the tenth song, you
still see the notification from the 3rd song (because timeouts) and you
don't really care about all those songs changes still in the queue as
you see it in the playlist anyway.
So this patch limits certain apps to have only one single notification
which is always updated. So far Clementine and Spotify is there.
Switching songs or changing playback status creates only one single
popup.
Additionally, the list gets added entries from a config file too.
REVIEW: 118796