Re: [Lazarus] Editor font height in IDE options

2011-08-09 Thread cobines
2011/8/9 Martin laza...@mfriebe.de:
 the editor option files has version numbers.

 it only gets new written, if the user makes achange.

 the loader must always be able to load the old version, and convert.

 But if a user does change his options, then it should write size...

I didn't use version. I load EditorFontHeight, if it doesn't exist I
load EditorFontSize. On write I delete EditorFontHeight and write
EditorFontSize.

--
cobines

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-09 Thread Martin

On 09/08/2011 10:58, cobines wrote:

2011/8/9 Martinlaza...@mfriebe.de:

the editor option files has version numbers.

it only gets new written, if the user makes achange.

the loader must always be able to load the old version, and convert.

But if a user does change his options, then it should write size...

I didn't use version. I load EditorFontHeight, if it doesn't exist I
load EditorFontSize. On write I delete EditorFontHeight and write
EditorFontSize.


ok, I will look at it, I am a bit tied up right now

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread Myriam Armengol
Hi,

In the IDE there is a combobox where you can choose editor font

 height. Is it needed by anyone to set height not size? Normally in
 applications you set font size. I understand the difference between
 height and size. It may be confusing for someone who doesn't that they
 are two different ways of setting font size.


+1
I'd vote for removing the height combobox, it's confusing and unnecessary in
a simple text editor. (Publishing is another story)

Gerard.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread Martin

On 08/08/2011 17:16, cobines wrote:

Hello.

In the IDE there is a combobox where you can choose editor font
height. Is it needed by anyone to set height not size? Normally in
applications you set font size. I understand the difference between
height and size. It may be confusing for someone who doesn't that they
are two different ways of setting font size.

At least on Windows and Linux/Gtk2,Qt you can choose size from the
font dialog. After I choose a font with a font dialog the combobox
text has a negative value, but in the combobox list there are positive
values. It's not consistent.
Either use always negative or always positive.

I would be for removing the combobox altogether. I tried to find some
information why it is there but I haven't found any.



Is that about ta un-needed drop-down, or about the inconsistency between 
height and size.


In other words, if the drop-down was size (instead of height) would it 
still be undesired?
IMHO it's a quicker way to adapt the font size, if one does not want to 
change the font itself. Because if you want to see the preview, you have 
to open the dialog, select the size, close the dialog with ok, so the 
preview synedit shows the font size. (I did definetly use the drop down 
to try each potential font, in different sizes, and see how it looks ,


The preview in the font dialog itself is not helpful imho.

-
About the size/height inconsistency = that is known, there even is a 
bug report.


To fix it, it needs to be analysed what is stored internally and in the 
editoroptions.xml.


And be ensured that compatibility is kept too.






--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread cobines
2011/8/8 Martin laza...@mfriebe.de:
 In other words, if the drop-down was size (instead of height) would it still
 be undesired?

If it was size it would be useful. It would be consistent to what you
set in the dialog and it would be less confusing because there would
be only one method of setting size.

Currently, for example, I set font size 18pt in the dialog. I decide
it is too small. The height combo says -29. What value should I put
into height to quickly view a bit larger font? I don't want to
calculate that :)

So, instead of removing, maybe change it to represent size. (Hence my
previous question, does anyone need to set height). In this case I
think an edit box with +/- buttons would be more useful than the
combo.

--
cobines

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread Martin

On 08/08/2011 18:00, cobines wrote:

2011/8/8 Martinlaza...@mfriebe.de:

In other words, if the drop-down was size (instead of height) would it still
be undesired?

If it was size it would be useful. It would be consistent to what you
set in the dialog and it would be less confusing because there would
be only one method of setting size.



http://bugs.freepascal.org/view.php?id=17694  AND related issues...

As I said, the hold back, is to check on each widgetset, what affacts 
what, and what is stored in the options.


Then to make sure all get moved to size = including NEWLY saved 
options. But to support any old setting and convert them correctly


Otherwhise, of the options contain height, but the IDE only shows size, 
other confusion may arise...


AND under no circumstances should a change just reset about everybodies 
settings


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread Reinier Olislagers
On 8-8-2011 19:12, Martin wrote:
 On 08/08/2011 18:00, cobines wrote:
 2011/8/8 Martinlaza...@mfriebe.de:
 In other words, if the drop-down was size (instead of height) would
 it still
 be undesired?
 If it was size it would be useful. It would be consistent to what you
 set in the dialog and it would be less confusing because there would
 be only one method of setting size.
snip
 AND under no circumstances should a change just reset about everybodies
 settings
Why not? Lazarus is still in beta.

Why not simply provide a reasonable new default for the height and just
mention in the release notes that users have to set a new value if they
want to...

It's not like it's a breaking API change for the FCL

My slightly pragmatic two cents,

Reinier

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread cobines
2011/8/8 Martin laza...@mfriebe.de:
 As I said, the hold back, is to check on each widgetset, what affacts what,
 and what is stored in the options.


In config file there is EditorFontHeight.  It is used in such contexts:

Font.Height:=EditorOpts.EditorFontHeight

   XMLConfig.SetDeleteValue('EditorOptions/Display/EditorFontHeight'
  ,fEditorFontHeight, SynDefaultFontHeight);

To me it is clear it is always the font height saved to config file.

 Then to make sure all get moved to size = including NEWLY saved options.
 But to support any old setting and convert them correctly

Conversion size-height as far as I can see is in TFont.SetHeight()
and TFont.SetSize().

I'll make a patch so that there is something to test.

--
cobines

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread cobines
I have attached a patch to the issue #17694:

http://bugs.freepascal.org/view.php?id=17694

Tested on Windows native, Linux Gtk2, Linux Qt and I don't see any
problem with the conversion. Please someone test other widgetsets.

--
cobines

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor font height in IDE options

2011-08-08 Thread Martin

On 08/08/2011 20:46, cobines wrote:

2011/8/8 Martinlaza...@mfriebe.de:

As I said, the hold back, is to check on each widgetset, what affacts what,
and what is stored in the options.


In config file there is EditorFontHeight.  It is used in such contexts:

Font.Height:=EditorOpts.EditorFontHeight

XMLConfig.SetDeleteValue('EditorOptions/Display/EditorFontHeight'
   ,fEditorFontHeight, SynDefaultFontHeight);

To me it is clear it is always the font height saved to config file.


Then to make sure all get moved to size =  including NEWLY saved options.
But to support any old setting and convert them correctly

Conversion size-height as far as I can see is in TFont.SetHeight()
and TFont.SetSize().

I'll make a patch so that there is something to test.


the editor option files has version numbers.

it only gets new written, if the user makes achange.

the loader must always be able to load the old version, and convert.

But if a user does change his options, then it should write size...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus