Author Topic: Split view initial font size incorrect  (Read 16168 times)

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Split view initial font size incorrect
« on: January 09, 2011, 06:47:44 am »
Every time I split the view the new editor pane is in a different font size than I am using with the first editor pane. Not really a big deal, but I thought I would mention it. And yes, I already know I can resize the font with Ctrl - mouse wheel.




Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #1 on: January 09, 2011, 09:19:34 am »
Which version of C::B do yo use ?
If I remember right there was an issue in older versions.

The splitted editor is always opened with the default font-size.
If you manually have changed the actuall font-size of an editor (via menu or Ctrl+mousewheel or whatever), the splitted editor does not use this size.


Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Split view initial font size incorrect
« Reply #2 on: January 09, 2011, 09:31:03 am »
Quote from: jens
Which version of C::B do yo use ?
10.05

Quote from: jens
If you manually have changed the actuall font-size of an editor (via menu or Ctrl+mousewheel or whatever), the splitted editor does not use this size.
Wouldn't it make more sense to use the same font size that the user has selected through the menu?

I'm using Courier New bold at font size 10, and split editors show up with a font size that is two mouse wheel clicks larger.



Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #3 on: January 09, 2011, 09:44:58 am »
Quote from: jens
Which version of C::B do yo use ?
10.05

Quote from: jens
If you manually have changed the actuall font-size of an editor (via menu or Ctrl+mousewheel or whatever), the splitted editor does not use this size.
Wouldn't it make more sense to use the same font size that the user has selected through the menu?

I'm using Courier New bold at font size 10, and split editors show up with a font size that is two mouse wheel clicks larger.



Why do you not change your default font-size ?

Zomming an editor is soemthing you normally only do temporary.

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Split view initial font size incorrect
« Reply #4 on: January 09, 2011, 10:09:13 am »
Quote from: jens
Why do you not change your default font-size ?

Zomming an editor is soemthing you normally only do temporary.
I don't understand why you say I should change my default font size. I already have changed my font size to 10 and when I split an editor, shouldn't I get the same font size that I have already set before?

I'm not zooming an editor at all so I don't know why you spoke of that.


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #5 on: January 09, 2011, 10:22:44 am »
Quote from: jens
Why do you not change your default font-size ?

Zomming an editor is soemthing you normally only do temporary.
I don't understand why you say I should change my default font size. I already have changed my font size to 10 and when I split an editor, shouldn't I get the same font size that I have already set before?

I'm not zooming an editor at all so I don't know why you spoke of that.



Because the only way to get such behaviour is, if I zoom the editor before splitting.
Otherwise it takes the default font-size used for editors (the same all editors have, if opened).

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Split view initial font size incorrect
« Reply #6 on: January 09, 2011, 11:42:59 am »
Quote from: jens
Because the only way to get such behaviour is, if I zoom the editor before splitting.
Maybe for you, but I'm not zooming the editor at all.

Steps to reproduce :
1. Set font size to 10 using Settings->Editor->Choose (font)
2. Split open editor.
3. Resulting split editor is font size 12 or so, but not 10.

Shouldn't I expect both editors to be at font size 10?


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #7 on: January 09, 2011, 12:44:51 pm »
You should, and I can not reproduce it.
It works fine here on linux.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Split view initial font size incorrect
« Reply #8 on: January 09, 2011, 02:22:50 pm »
UberNewb: if you're on windows or debian try the latest nightly, the bug might be fixed after 10.05 (if I guess correctly that Jens is using HEAD).

And please next time post your system's software versions (OS/CB/compiler)

p.s. works for me too, C::B r6900 debuggers branch, gentoo linux 64bit...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: Split view initial font size incorrect
« Reply #9 on: January 09, 2011, 03:38:00 pm »
I can reproduce UberNewb's steps an have different size on splitted view too. rev6912, MinGW-TDM-4.5.1, win7.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #10 on: January 09, 2011, 03:59:37 pm »
win7 64bit
all other is 32-bit
TDM MinGW 4.4
wx2.8.10
C::B svn r6911
Courier New 8pt or 10 pt ,bold or normal

I still can not reproduce

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Split view initial font size incorrect
« Reply #11 on: January 09, 2011, 04:41:22 pm »
winxp 32bit
C::B svn r6912
Courier New 8pt or 10 pt

...can't reproduce, too?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: Split view initial font size incorrect
« Reply #12 on: January 09, 2011, 05:44:20 pm »
You are right. I think the scond view has default fonst size. But the first view has the "previously used" size.
To reproduce:
- open only one file, zoom in (as much as possible, to be sure it is not the default)
- close open file (optional)
- open a file or ctrl-shift-n to create a new empty file. it has the previosly used size and not the default.
- split. the second view has default size
« Last Edit: January 09, 2011, 05:46:22 pm by danselmi »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #13 on: January 10, 2011, 06:33:07 am »
The problem is the zoom-factor for the editor.
The last changed zoomfactor is stored globally and used for all new editor (except for split-view).
I made a change yesterday, that saves the zoom-factor on a per editor base in the projects layout-file.
It also saves the split-state (not the splitter position yet, but this should be easy) and the zoom-factor of both controls in split-view.

I will open another thread for this, to discuss it, because it does more than just simple changes to the behaviour.
I will add a link to the new thread  if it is created.

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Split view initial font size incorrect
« Reply #14 on: January 10, 2011, 11:41:15 am »
Quote from: oBFusCATed
UberNewb: if you're on windows or debian try the latest nightly, the bug might be fixed after 10.05 (if I guess correctly that Jens is using HEAD).

And please next time post your system's software versions (OS/CB/compiler)
I downloaded the nightly build version 6906 and I can still reproduce the same problem. I remember at one point in Code Blocks history that a split window would open in the same font size as selected in the menu, but I don't remember when it started using a different font.

I'm using Windows Vista 32 bit, CodeBlocks svn 6906, and MinGW 3.4.5.

No matter what zoom I use or what font size I select in the menu, the split view always opens up using font size 12.

Quote from: jens
The problem is the zoom-factor for the editor.
The last changed zoomfactor is stored globally and used for all new editor (except for split-view).
I made a change yesterday, that saves the zoom-factor on a per editor base in the projects layout-file.
It also saves the split-state (not the splitter position yet, but this should be easy) and the zoom-factor of both controls in split-view.

Wouldnt' it be easier to just open new split editors in the font size selected in the menu?

Is there any way to edit a configuration file so I can fix this locally?


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #15 on: January 10, 2011, 12:15:52 pm »
To see whether it's related to the zoom-factor or not, close all editor except for one.
Keep it unsplit.
Reset zoom via "Edit -> Special commands -> Zoom -> Reset".
Close C::B and reopen it.
Don't zoom any editor.
Check whether the problem is gone.

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Split view initial font size incorrect
« Reply #16 on: January 10, 2011, 12:37:20 pm »
Still using svn6906...

Quote from: jens
To see whether it's related to the zoom-factor or not, close all editor except for one.
Keep it unsplit.
Reset zoom via "Edit -> Special commands -> Zoom -> Reset".
I followed these three steps and when I clicked on Reset, the font size changed to 12 again.

Quote from: jens
Close C::B and reopen it.
Don't zoom any editor.
Check whether the problem is gone.
Then I followed these three steps and now both the original editor and the split editor open in font size 12, which is not what the menu is set to (it is set to 10).

No matter what I do, whether zooming the editor or not, when I split an editor it always opens in font size 12.

If I zoom in and enlarge the font of an unsplit editor and then open a new file, it opens in the same size as the previous editor, not at the font size set in the menu (10). Maybe this is the behaviour that you want, I don't know. If it is, what is the point of setting the font size in the menu then?





Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #17 on: January 10, 2011, 12:46:44 pm »
Why are you sure, that it is 12 point and not 10 point ?

I just tested it on XP with C::B and another editor, both use 12pt Courier New and both have the exaxt same pixelsize.

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Split view initial font size incorrect
« Reply #18 on: January 10, 2011, 01:15:30 pm »
I tried playing around with the settings some more, and I noticed that no matter what font size I set in the menu, when I split an editor it opens two font sizes larger than the original editor.

Quote from: jens
Why are you sure, that it is 12 point and not 10 point ?
Not perfectly sure, no.

I tested against notepad and my preferred font size is Courier New, bold, 8pt. But the fact is still that the split window opens with a font that is always two sizes larger. (Ctrl+MouseWheel scroll twice).


Wait...
I set my font size to 8 in the menu and then adjusted each editor (main and split) to my preferred font size of 8pt (verified by checking against Notepad). And now when I split the editor it opens using my preferred font size. I must have zoomed at one point.

I'm sorry, I think I've led you all on a wild goose chase.  :(

So I tested it some more, and now I can verify that setting a font size in the menu and then splitting an editor opens the split editor at the correct font size. I guess my zoom is back to zero now.

Again, sorry about the mix up. (Going to go hide in the corner somewhere... :()

Edit :
I guess my problem was that I assumed the zoom level would be reset every time I picked a new font size in the menu. In the future, it might prevent this kind of problem from occurring if the zoom level is reset upon font changes in the menu.


« Last Edit: January 10, 2011, 01:22:57 pm by UberNewb »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Split view initial font size incorrect
« Reply #19 on: January 11, 2011, 05:37:48 pm »
The problem is the zoom-factor for the editor.
The last changed zoomfactor is stored globally and used for all new editor (except for split-view).
I made a change yesterday, that saves the zoom-factor on a per editor base in the projects layout-file.
It also saves the split-state (not the splitter position yet, but this should be easy) and the zoom-factor of both controls in split-view.

I will open another thread for this, to discuss it, because it does more than just simple changes to the behaviour.
I will add a link to the new thread  if it is created.

Patch to test can be found here: http://forums.codeblocks.org/index.php/topic,14027.0.html