Bug 335213 - Plasmoid notes should not respect theme font color
Summary: Plasmoid notes should not respect theme font color
Status: RESOLVED FIXED
Alias: None
Product: kdeplasma-addons
Classification: Unmaintained
Component: notes (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-22 19:12 UTC by Luiz Angelo De Luca
Modified: 2014-10-28 18:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.1
Sentry Crash Report:


Attachments
screenshot (42.54 KB, image/png)
2014-05-29 04:15 UTC, Bhushan Shah
Details
note on black (10.07 KB, image/png)
2014-05-29 22:04 UTC, Luiz Angelo De Luca
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Angelo De Luca 2014-05-22 19:12:00 UTC
Hello,

Note Plasmoid has its own bgcolor, some light and some dark. It is currently using theme color that will result in a non-functional note if a dark font is used on black or light font is used on light bgcolors.

It should not follow theme font color and force a default font color based on bgcolor.
BTW, currently there is no way to change notes font color per note.


Reproducible: Always

Steps to Reproduce:
1.Create a plasmoid note
2.write some text

Actual Results:  
3. Either a dark background color or a light one will result in a unreadable note

Expected Results:  
3. note font color should be defined according to the background color

The workarround is to change bgcolor to a friendlier color (that is aready working using right mouse menu)
Comment 1 Bhushan Shah 2014-05-24 05:03:38 UTC
Plasma does not have an notes plasmoid in the release.
Comment 2 Luiz Angelo De Luca 2014-05-26 20:24:27 UTC
OK, thanks. No support for add-on.

But who would be the one to fix this?
Comment 3 Sebastian Kügler 2014-05-26 22:12:17 UTC
Well, anybody can fix this.

It's just that we, as the core team, have decided to concentrate on core functionality first, and not work on plasmoids in kdeplasma-addons (since those are not considered essential). 

Anybody can have a look at the bug and fix it. We'll release the Notes Plasmoid in a follow-up release, once it has reached a satisfying quality-level. Fixing this bug would work towards that goal.

The Status field doesn't reflect this right now, we've added a new category plasma-addons, which containes these non-essential things, and can be used for tracking bugs. I'm moving this bug there, and reopen it.

Maybe you want to give it a try, scratching your own itch? :) Others in the team can likely provide pointers where to start, just ask on #plasma-devel on Freenode's IRC.

Cheers!
Comment 4 Bhushan Shah 2014-05-27 04:57:42 UTC
Hello,

Can you give me screenshot? which notes plasmoid you are talking about? because one in kdeplasma-addons don't have this problem..? Maybe you are using one of examples in plasma-framework?

Thanks
Comment 5 Luiz Angelo De Luca 2014-05-27 19:47:56 UTC
As Sebastian suggested, I tried to look the problem myself. However, no luck until now.
Brushan, the plasmoid is this:

share/plasma/plasmoids/org.kde.plasma.notes/contents/ui/notes.qml

And it is from kdeplasma-addons5 in opensuse OBS packages

I have no experience on QML but I tried ;-)

The idea is to define a fixed color (like black) for all colors except translucent and black. For those two, I guess white is better ('m not sure for translucent though. A font with shadow or border would be ideal).

I tried to find a way to change text but I guess I have no access to the property. It looks like notes.qml uses:

/usr/lib64/qt5/qml/org/kde/plasma/components/TextArea.qml
from plasma-framework-4.99.0git~20140526~0596cf1-24.1.x86_64

And it has nothing like:

        property alias textcolor: textEdit.color

So, I guess in QML world, textArea.flickArea.textEdit.color is kept private. If I manually add it, I can change color from notes.qml.

The equivalent component in Qt53 does has this property (and even direct access to textEdit:
http://qt-project.org/doc/qt-5/qml-qtquick-controls-textarea.html#textColor-prop

(BTW, isn't plasma/components/TextArea.qml a limited reimplementation/old copy of QML TextArea? Do we really need this dup code?)

As TextArea.qml is away from addons, I guess I might not be the one to propose a change.
Besides notes, I only found TextArea ref in: share/plasma/shells/org.kde.plasma.plasmoidviewershell/contents/views/Konsole.qml
Comment 6 Bhushan Shah 2014-05-29 04:15:00 UTC
Created attachment 86892 [details]
screenshot

Really I can not reproduce this.. I have yellow note with black font color like this..

Can you give me screenshot?
Comment 7 Luiz Angelo De Luca 2014-05-29 22:03:24 UTC
You have no problem because you use a theme that has uses black as text color and you used the default not background (that is yellow). Change the notes color to black and see if you can read anything.

For me, the theme uses a dark gray color as font. I'll attach a screenshot.
Comment 8 Luiz Angelo De Luca 2014-05-29 22:04:27 UTC
Created attachment 86912 [details]
note on black
Comment 9 Kai Uwe Broulik 2014-10-28 18:47:44 UTC
Git commit 2b32701b2e53f622f5a22c16b9081e29a4462866 by Kai Uwe Broulik.
Committed on 28/10/2014 at 18:47.
Pushed by broulik into branch 'Plasma/5.1'.

Make text color white on black note
FIXED-IN: 5.1.1

M  +1    -1    applets/notes/package/contents/ui/main.qml

http://commits.kde.org/kdeplasma-addons/2b32701b2e53f622f5a22c16b9081e29a4462866