Issue 51: Zoom level changes when chaging color
Status:  Fixed
Owner: ----
Closed:  Feb 2010
Reported by filipe.c...@gmail.com, Feb 15, 2010
To reproduce do the following:

1 - Remove any stored QSettings
2 - Start marave
3 - Type some letters
4 - Change zoom level
5 - Change font color

The zoom level will then reset to default.

I have a feeling the issue here is that marave always expects to find some
stored values in the QSettings or something and they are not properly
initialized when starting fresh, or something like that.
Feb 15, 2010
Project Member #1 roberto.alsina
I can't reproduce this. I am using r266, what version are you on?
Feb 15, 2010
#2 filipe.c...@gmail.com
I'm using r266 on macosx 10.5
This only happens when there are settings saved anywhere, from a fresh install.
I can see if I can track this some more.
Feb 15, 2010
Project Member #3 roberto.alsina
I tried deleting the settings first, still it doesn't happen for me. The only way this could 
happen is if there's a call to self.editor.larger() [or smaller] that didn't call 
self.settings.setValue('fontsize')
Feb 15, 2010
#4 filipe.c...@gmail.com
I think the problem is that fontcolor is not properly initialized.
Feb 15, 2010
#5 filipe.c...@gmail.com
The following patch seems to work for me:

--- main.py     (revision 266)
+++ main.py     (working copy)
@@ -733,6 +733,8 @@
         fontcolor=self.settings.value('fontcolor')
         if fontcolor.isValid():
             self.setfontcolor(QtGui.QColor(fontcolor.toString()))
+       else:
+            self.setfontcolor(QtGui.QColor('black'))
 
     def loadOpacity(self):
         o,ok=self.settings.value('editoropacity').toInt()
Feb 15, 2010
#6 filipe.c...@gmail.com
The bottom issue seems to be that if you have a widget without any stylesheet and
then you change the font size on that widget and then you set its stylesheet to
change some colors, the font size will be lost. If on the other hand you do the font
size change after creating any kind of stylesheet the change is kept even if you then
change the stylesheet. This might very well be a Qt bug with stylesheets. I'm always
a bit afraid of them.
Feb 15, 2010
Project Member #7 roberto.alsina
Why not, it makes sense. Committed in r267. Should I mark this fixed?
Feb 15, 2010
#8 filipe.c...@gmail.com
I think so. At least it works for me.
Feb 15, 2010
Project Member #9 roberto.alsina
Could be a bug with stylesheets on mac since it doesn't happen for me on Linux. Anyway, 
thanks for the help!
Status: Fixed