Bug 159713

Summary: [PATCH] Notes config dialog should use nicer font and color selection widgets
Product: [Plasma] plasma4 Reporter: David Benjamin <davidben>
Component: widget-miscAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch to use widgets in config dialog
screenshot
new patch with style fixes

Description David Benjamin 2008-03-22 21:35:39 UTC
Version:            (using Devel)
Installed from:    Compiled sources

(Is this the right category?)

The below patch makes the notes applet use KFontRequester and KColorButton for configuration.

This also fixes a couple FIXMEs and TODOs, but adds one of it's own:

So, the old code used QColor() as the default color to be used, which makes "an invalid color with the RGB value (0, 0, 0)". This caused problems with the KColorButton's default color display, so I changed it to use Qt::black, but I expect it really should get it from the Plasma theme. I tried using m_textArea->defaultTextColor(), i.e. the one the LineEdit came with, but that appears to use Plasma::Theme::textColor(), which is the default to use on the normal background, which is white on most themes.
Comment 1 David Benjamin 2008-03-22 21:36:20 UTC
Created attachment 24001 [details]
patch to use widgets in config dialog
Comment 2 Chani 2008-03-23 00:31:21 UTC
since it defines its own background colour (that yellow post-it svg), it should define its own foreground colour too. so, I say just use black.

btw, normally I would suggest posting the patch on mattr.info - but reviewboard is down for easter, so you can't. :) I'll try and find time to look at the patch later
Comment 3 Chani 2008-03-23 05:24:51 UTC
that code looks nice! :) can you attach a screenshot of the new config dialog? do you have an svn account?
there are a couple of little style issues I'd like you to fix before committing (suddely I miss reviewboard): the if statement at the end of configAccepted needs {} and the lines added at the end of showConfigurationInterface shouldn't have those spaces inside the ()
Comment 4 David Benjamin 2008-03-23 14:53:21 UTC
Created attachment 24012 [details]
screenshot
Comment 5 David Benjamin 2008-03-23 14:57:39 UTC
Created attachment 24013 [details]
new patch with style fixes

Added the curly braces and removed the spaces. Also slimmed the .ui file a
bit... it seems Qt designer still outputs code if you set something and then
unset it  back to the default.

To answer your question, I don't have an SVN account. (Should I?)
Comment 6 Chani 2008-03-24 06:45:00 UTC
thanks :)
if you keep writing patches you'll want an svn account eventually. :)
I'll commit this one for you in the morning, unless someone else does it first.
Comment 7 Chani 2008-03-25 02:40:41 UTC
SVN commit 789733 by chani:

better config dialog
patch from David Benjamin
BUG: 159713


 M  +22 -11    config.ui  
 M  +25 -23    notes.cpp  
 M  +0 -4      notes.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=789733