Bug 159713 - [PATCH] Notes config dialog should use nicer font and color selection widgets
Summary: [PATCH] Notes config dialog should use nicer font and color selection widgets
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-misc (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-22 21:35 UTC by David Benjamin
Modified: 2008-03-25 02:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to use widgets in config dialog (4.94 KB, patch)
2008-03-22 21:36 UTC, David Benjamin
Details
screenshot (87.76 KB, image/png)
2008-03-23 14:53 UTC, David Benjamin
Details
new patch with style fixes (4.67 KB, patch)
2008-03-23 14:57 UTC, David Benjamin
Details

Note You need to log in before you can comment on or make changes to this bug.
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