Bug 381255

Summary: KMessageWidget::Positive's green background makes links difficult to see
Product: [Frameworks and Libraries] frameworks-kwidgetsaddons Reporter: KDE Neon user <emailmeat>
Component: generalAssignee: Christoph Feck <cfeck>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, kdelibs-bugs, nate, simonandric5
Priority: NOR Keywords: accessibility, usability
Version: 5.39.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=419960
Latest Commit: Version Fixed In:
Attachments: Blue link is hard to see against a green background

Description KDE Neon user 2017-06-16 00:05:56 UTC
When you upload an image to Imgur with the "Export Image - Share" menu, the success message ("You can find the shared image at: http...") uses a green background color that makes it hard to see the blue link with the default KDE Neon colors.
Comment 1 Nate Graham 2017-10-23 13:04:02 UTC
This is actually a more general issue with the KMessageWidget class. We should fix it there IMHO, so all clients that draw URLs can get the fix.
Comment 2 Nate Graham 2017-10-23 13:48:15 UTC
Created attachment 108524 [details]
Blue link is hard to see against a green background
Comment 3 Christoph Feck 2017-11-08 18:44:14 UTC
Right now it is impossible to customize the colors of links in a QLabel. A possible workaround is to use a QTextBrowser.

https://stackoverflow.com/questions/5497799/how-do-i-customise-the-appearance-of-links-in-qlabels-using-style-sheets
Comment 4 Nate Graham 2017-11-08 18:49:18 UTC
Preserving the traditional blue color of an unvisited link is a good idea from a UX standpoint, though, since it's instantly recognizable.

Ideas:
- Stop using KMessageWidget to communicate status in Spectacle
- Move the link outside of the KMessageWidget in Spectacle
- Change KMessageWidget's visual style to allow clearer text presentation. Perhaps the blue/green/red color could only extend to the border, with the center following the theme's standard color scheme?
Comment 5 Nate Graham 2017-11-08 18:53:36 UTC
- Give links a white shadow or outline to make the text stand out from the colored background (I tried this using a CSS stylesheet but it didn't work because text-shadow is a CSS3 property, and Qt's stylesheet support only goes to CSS2, so rendering the shadow would have done be done in C++)
Comment 6 Nate Graham 2017-11-30 14:42:26 UTC
FYI Christoph, we are going to be using the "usability" keyword to track the bugs we're targeting for https://phabricator.kde.org/T6831. I've triaged all existing bugs with that keyword and added some more, including this one. Would you mind if we kept that here?
Comment 7 Christoph Feck 2018-02-07 15:31:02 UTC
*** Bug 389981 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2018-05-08 13:14:37 UTC
Git commit 00bce130d35e9dc398709e690a05f8dde70f52b3 by Nathaniel Graham.
Committed on 08/05/2018 at 13:14.
Pushed by ngraham into branch 'master'.

Make KMessageWidget match Kirigami inlineMessage's style

Summary:
This patch makes the venerable and wonderful `KMessageWidget` match the slick style of Kirigami's new `inlineMessage` control. As a by-product, it fixes a few usability bugs.

I didn't implement the drop shadow here because I couldn't get it to look right.
Related: bug 385299

Test Plan:
Spectacle, Breeze light, information:
{F5828175}

Spectacle, Breeze dark, information:
{F5828176}

Spectacle, Breeze light, positive:
{F5828177}

Spectacle, Breeze dark, positive:
{F5828178}

Dolphin, Breeze light, negative:
{F5828180}

Dolphin, Breeze dark, negative:
{F5828179}

Dolphin, Breeze light, warning:
{F5838438}

Konsole, Breeze light with dark profile theme, warning:
{F5838446}

Konsole, Breeze dark with light profile theme, information:
{F5838445}

Konsole, Breeze light, information:
{F5838437}

Kate, Breeze light, positive:
{F5838428}

Kate, Breeze dark, information:
{F5838429}

Reviewers: hein, #plasma, #vdg, elvisangelaccio, cfeck

Reviewed By: hein, #plasma, cfeck

Subscribers: broulik, anemeth, abetts, cfeck, mart, fabianr, elvisangelaccio, jnoack, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D12508

M  +34   -46   src/kmessagewidget.cpp
M  +2    -0    src/kmessagewidget.h

https://commits.kde.org/kwidgetsaddons/00bce130d35e9dc398709e690a05f8dde70f52b3