Bug 99853

Summary: Knotes looks too plain and need more style
Product: [Unmaintained] knotes Reporter: Fri13 <friiduh>
Component: generalAssignee: Michael Brade <brade>
Status: RESOLVED FIXED    
Severity: wishlist CC: digitalfudge, luke_worth
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Modified knote screenshot (in focus and out of focus)
patch against knote-3.3.2
new patch against current SVN
Pushpin image - as xpm
pushpin - as png

Description Fri13 2005-02-20 12:54:08 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Mandrake RPMs
OS:                Linux

When KDE 3.4 is supporting vector graphichs it should be nice if Knotes support that too.

The graphic how knotes looks, is just fine. But i like to see "wallpaper" for knotes.
Like you could make svg background for notes and make them to look nicer.

Then you could get knotes look like more real or more personal.
Comment 1 Wolfram R. Sieber 2005-03-12 21:38:29 UTC
...and it would be even more comfortable/personal than the original paper notes. :) But, please, leave them just yellow, in the default settings.
Comment 2 Frank Aune 2005-05-09 13:30:41 UTC
Actually, I think the first step for making knotes more appealing would be to make the note look more like a piece of paper on screen. Take a look at Apples stickies note-tool in their new Tiger OSX:

http://images.apple.com/macosx/features/dashboard/images/indexstickies20050412.jpg

I think it adds a very nice touch to the whole appearance.
Comment 3 Debajyoti Bera 2005-05-15 20:01:43 UTC
Sometime back I patched knotes to give it a different look. Please find the details here http://dbera.blogspot.com/2005/04/colourful-knotes.html (I was using kde 3.3.2 so I have patch against that - the patch is linked in one of its comments).
I wanted to share the new look but I was not sure if there is a performance impact on slow machines (I couldnt test it in a slow machine; it runs without any artifact on my 2 GHz celeron) and next, when I enabled xcompmgr shadows, the pushpin etc. started looking ugly (due to all the masking involved surrounding the window).
If there is any interest then I can work on it more to make it compatible with xcomposite transparency or add config options to make it usable.
Comment 4 Michael Brade 2005-05-15 23:53:46 UTC
> If there is any interest then I can work on it more to make it compatible
> with xcomposite transparency or add config options to make it usable.

Yes, definitely! As I told you in private mail already, it would be great if 
we could get this into KDE 3.5. If you don't have KDE SVN, I can fix and 
apply your patch the next two days. I'm just not too sure about the 
pushpin... and did you succeed in moving the fold to the bottom right corner?

Cheers,
  Michael
Comment 5 Debajyoti Bera 2005-05-16 05:25:43 UTC
Created attachment 11052 [details]
Modified knote screenshot (in focus and out of focus)

As suggested by Michael, I moved the fold to the right corner. However, due to
the presence of the resize grip, the fold and the resize grip and not displayed
at the same time. The resize grip is displayed when the note is in focus (and
then the fold is not shown) and vice versa when the note is out of focus. This
behaviour doesnot interfere with the rich text tool bar which is shown at the
bottom.
Comment 6 Debajyoti Bera 2005-05-16 05:28:44 UTC
Created attachment 11053 [details]
patch against knote-3.3.2

Attaching the patch after all modifications. Please note that the patch is
against knote-3.3.2.
Comment 7 Fri13 2005-05-16 10:33:49 UTC
I like to see if this type of grapics could be made for knotes.

http://koti.mbnet.fi/fri13/index.html

Comment 8 Fri13 2005-05-16 10:34:42 UTC
*** This bug has been confirmed by popular vote. ***
Comment 9 Michael Brade 2005-05-16 12:23:09 UTC
Bera, you're the man!! This is the best idea to implement the fold, I am
impressed and would not have had it, probably :-) I'll try to work through
the patch and apply it to SVN now, stay tuned. And I will make the pushpin's
position dependent on the close button position to have it always on the
opposite side.
Comment 10 Debajyoti Bera 2005-05-16 15:52:58 UTC
> http://koti.mbnet.fi/fri13/images/knotes_backround_shadow_screenshot.jpg

* I initially thought of implementing the fold in this natural way - but without the advanced Qt4.0 capabilities it is hard to make it that good. The current fold looks pretty amateur to me :P but thats the best I could make without a lot of effort (if I implement that fold, then I would want it to unfold when the note is in focus and refold when fold goes out of focus... whoooo... dreamnotes)

* transparent background, compositing - need messing with compositing. given that XComposite is not that usable I wouldnt use them in my normal environment.

* SVG background ... hmm... interesting - would be easy to scale too. I will think about it.

* one thing for sure, the note looks good only with shadows. Sigh ... XComposite is slow for normal work on my 845GL.

Michael : Careful when trying to move the note on the right :P. The code needs significant change - mostly all of the code relating to the masking etc. will change. I can try to do it. If anybody can come up with any bettter idea so that moving the pin wont be needed then that will be the best.
Comment 11 Michael Brade 2005-05-17 00:32:45 UTC
> Michael : Careful when trying to move the note on the right :P.

Bah, no problem, I've done it already :) The solution was simple: don't mask 
the left or the right side of a note, only the top. This gets rid of the 
label-hacks as well. And to put the pushpin to right I mirrored it 
horizonally -- looks awesome! I just have a problem with the color handling, 
I didn't understand/read enough about them yet, will do so tomorrow.
Comment 12 Debajyoti Bera 2005-05-17 01:09:38 UTC
Awesome. Is it in SVN (I dont think so)? Can you send me the modified patch :P ? Cant wait to see it.

Which color handling were you talking about ? palette colors ?

We need a config option probably ... How about 
[X] Enable "new" look-n-feel => turn on the pushpin, fold, gradient.
Comment 13 Debajyoti Bera 2005-05-18 15:14:36 UTC
This is in relation to the original bug-request. Implementing wallpaper. 

In the patch, the gradient is simulated by a wallpaper which is generated on the fly so it wont be difficult to have an external pixmap as the wallpaper (I dont know about SVG though; otherwise we might have to do the scaling/tiling manually). 
The only problem is if we want the wallpaper to stay fixed while scrolling (as in konsole). As long as 
http://lists.trolltech.com/qt-interest/2004-12/thread00076-0.html 
is not fixed, manually maintaining the wallpaper underneath a scrolling text might be slow and expensive. 

Any thoughts, anybody ?
Comment 14 Fri13 2005-05-18 16:31:07 UTC
It should stay as fixed position and text would be only thing what is moving.
Comment 15 Michael Brade 2005-05-18 23:05:14 UTC
> Awesome. Is it in SVN (I dont think so)? Can you send me the modified
> patch :P ? Cant wait to see it. 

Heh :) Yeah, generally yes, but not yet... it's messed up regarding layout and 
colormanagement and yesterday and today I didn't have time at all to fix it. 
Will do so tomorrow and send you the patch in the evening.

> Which color handling were you talking about ? palette colors ?

Yes, for one thing, the other one being the background handling which I'm not 
sure about yet. The QTextEdit flickers when scrolling, for instance.

> We need a config option probably ... How about
> [X] Enable "new" look-n-feel => turn on the pushpin, fold, gradient.

I don't think so anymore. Because I intend to not change the layout and the 
colors too much, just add gradient, fold, and pushpin. And that's heaps 
better than it was before. Hm.... but thinking about it while writing this 
--- do you think there could be people not liking the grandients?

Regarding the wallpaper, yes, I do think we should provide this, even if only 
for KDE 4.0. By then trolltech will most certainly have fixed the slowness of 
QTextEdit :)

Cheers,
  Michael
Comment 16 Debajyoti Bera 2005-05-19 03:45:10 UTC
The QTextEdit flickers :-( ... ? I think, users wouldnt like if the background also moved with the text (as Fri13 pointed out above) so the only other option is to get rid away the scrollbar :-/ or warn the user somehow. But again, if the  note has a large enough visible area, then the scrolling will always flicker (unless QT4.0...).

I think there will be some people who would like it the old way (there are always such people - they might argue the pushpin/fold is too childish). Moreover, I think the way the gradient is implemented it might be bad for slow machines. So I think a single option to enable/disable the new look wont be a bad idea. 

I have very less idea about how these configs, are they too cumbersome to implement ? If not, then I vote for a config option.
Comment 17 Fri13 2005-05-19 15:28:31 UTC
Config option for old current style and two new style could be good idea.

Knotes "themes" should be configured as desktop wallpaper is now. If you like plain color, you choose only one color or two color as same. Then if you like wallpaper, you pick one. And if you like gradient style you select two colors what you want (backround and "effect").

This way you could have old way for slower machines or who want keep knotes plain. And then you could add backround picture or use gradient.
Comment 18 Michael Brade 2005-05-19 15:34:12 UTC
*** Bug 64515 has been marked as a duplicate of this bug. ***
Comment 19 Michael Brade 2005-05-19 15:34:38 UTC
*** Bug 59985 has been marked as a duplicate of this bug. ***
Comment 20 Michael Brade 2005-05-19 21:44:27 UTC
> The QTextEdit flickers :-( ... ?

Yeah, not too bad, but I haven't been able to fix it. I think that's ok for 
now.

> I think, users wouldnt like if the  background also moved with the text (as
> Fri13 pointed out above) so the only other option is to get rid away the
> scrollbar :-/ or warn the user somehow. But again, if the  note has a large
> enough visible area, then the scrolling will always flicker (unless 
> QT4.0...). 

Yes, I guess. But no, we can't really get rid of the scrollbar, that's up to 
the user to decide. If he puts in too much text, we can't help (unless Qt 
4 :))

> I have very less idea about how these configs, are they too cumbersome to
> implement ? If not, then I vote for a config option.

No, I'll add one before committing to SVN. 

But now for your pleasure, here's the patch the way I finished it today. I'm 
almost happy with it, just two minor things are not perfect yet:
 - the resize handle's background has the wrong color
 - the rich text toolbar has no frame when it is shown
Oh, and the pushpin has to be converted to png before it can go to SVN.

Will fix these in due time.

Cheers,
  Michael
Comment 21 Michael Brade 2005-05-19 21:45:42 UTC
Created attachment 11107 [details]
new patch against current SVN
Comment 22 Debajyoti Bera 2005-05-20 01:57:29 UTC
Created attachment 11109 [details]
Pushpin image - as xpm

pushpin image as xpm.
Comment 23 Debajyoti Bera 2005-05-20 02:02:02 UTC
Created attachment 11110 [details]
pushpin - as png

There is only one problem in having a separate png image of the pushpin ... the
dimensions of the image is very critical to its positioning otherwise it might
start overlapping text. Thats the reason I hardcoded the image as xpm data in
the code. If you think this wont be a practical problem, then here is the png
image.

Using separate png, however, gives a user to add custom pushpins (provided they
can match the dimensions - is it required to do a sanity check on the pushpin
image size before using it ?).
Comment 24 Michael Brade 2005-05-20 12:04:21 UTC
Thanks! But no, dimensions are no problem, we provide the correct image and
if a user changes it, his problem. Maybe he even wants to have the smaller
or bigger size :) You can change everything in KDE, even the menu structure,
but don't blame the developers if screw your system that way ;)

Cheers,
  Michael
Comment 25 Michael Brade 2005-05-31 00:44:10 UTC
SVN commit 419970 by brade:

Beautiful and fancy new look&feel for KNotes. Thanks to Bera for the idea and the initial
patch on which this patch is based. The style is now configurable in the global notes
configuration. While I was on it I improved updateLayout() method quite a bit and
removed old and wrong code.

The bugreports asked for a background image and maybe SVG, but this is stuff for
KDE 4. I've put it on my TODO. Also, the gradients flicker a bit, which has to
wait for Qt 4 as well.

I just realized that I forgot to replace the xpm with png, will do so the next days,
I'm too tired right now.

BUG: 99853


 M  +6 -0      ChangeLog  
 M  +2 -1      TODO  
 M  +222 -37   knote.cpp  
 M  +14 -2     knote.h  
 M  +22 -1     knoteconfigdlg.cpp  
 M  +2 -1      knoteconfigdlg.h  
 M  +14 -1     knotesapp.cpp  
 M  +2 -1      knotesapp.h  
 M  +10 -0     knotesglobalconfig.kcfg  
 M  +3 -1      main.cpp  
 M  +1 -1      main.h  
 A             pushpin.xpm