Bug 317352 - Line numbers don't scale correctly with editor font size
Summary: Line numbers don't scale correctly with editor font size
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: MacPorts macOS
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 323377 334534 338573 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-25 20:40 UTC by MH
Modified: 2014-08-26 14:04 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11


Attachments
Kate screenshot with small font size (95.66 KB, image/png)
2013-03-25 20:42 UTC, MH
Details
Kate screenshot with large font size (207.93 KB, image/png)
2013-03-25 20:43 UTC, MH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MH 2013-03-25 20:40:42 UTC
Macports installation of kate, Anput Kate gives: Version 3.10.1 "Using KDE Development Platform 4.10.1"

The displayed line numbers' vertical positions don't correspond to the correct lines, they mostly appear too small. When enlarging or shrinking the font size, the resulting offset changes, and for some particular scalings (at rather large font sizes) the line numbers and lines match. Attached are 2 screenshots with different font sizes, both showing different offsets.

Changing the font doesn't mitigate this for me. I think there might be a connection to this bug (https://bugs.kde.org/show_bug.cgi?id=296845). Looking at the suggestions there, I changed the KDE theme from Oxygen to the one seen in the screenshots without any improvement. I didn't manage to change the UI font. There seems to be nothing like a "system settings" or "desktop preferences" package available via Macports. Please let me know how to do this if necessary.

Reproducible: Always

Steps to Reproduce:
1. Launch kate
2. Open any file (> 1 line)
3. Show line numbers
Actual Results:  
Line numbers show offset/wrong vertical scaling for most font sizes

Expected Results:  
Line numbers align with corresponding lines
Comment 1 MH 2013-03-25 20:42:12 UTC
Created attachment 78383 [details]
Kate screenshot with small font size
Comment 2 MH 2013-03-25 20:43:10 UTC
Created attachment 78384 [details]
Kate screenshot with large font size
Comment 3 Christoph Cullmann 2013-04-07 10:04:36 UTC
Hmm, here on Linux they scale perfectly :/ Somebody any idea? In the code it looks like we really use exactly the same font for the line numbers than for the text in the view, no idea why it doesn't scale equally on mac :/
Comment 4 Christoph Feck 2013-04-23 23:52:37 UTC
Bug 302748 has a possible explanation. As far as I see, you do not use the same fontHeight initialization in KateIconBorder.
Comment 5 Dominik Haumann 2013-07-14 15:33:01 UTC
Git commit 053778c40d2336349b2fb74d5bc579325d3a62d8 by Dominik Haumann.
Committed on 14/07/2013 at 15:32.
Pushed by dhaumann into branch 'master'.

fix offset when drawing line numbers

also ok to backport to 4.10

FIXED-IN: 4.11

M  +2    -2    part/view/kateviewhelpers.cpp

http://commits.kde.org/kate/053778c40d2336349b2fb74d5bc579325d3a62d8
Comment 6 Dominik Haumann 2013-07-14 15:34:29 UTC
Git commit efea9f06be0e51e3a091a2948bcc48f365f0bdc8 by Dominik Haumann.
Committed on 14/07/2013 at 15:32.
Pushed by dhaumann into branch 'KDE/4.11'.

fix offset when drawing line numbers

also ok to backport to 4.10

FIXED-IN: 4.11

M  +2    -2    part/view/kateviewhelpers.cpp

http://commits.kde.org/kate/efea9f06be0e51e3a091a2948bcc48f365f0bdc8
Comment 7 Dominik Haumann 2013-07-14 15:35:09 UTC
Git commit 3a421e21b6cc62c5088d02dcc436feac115b5ba9 by Dominik Haumann.
Committed on 14/07/2013 at 15:32.
Pushed by dhaumann into branch 'KDE/4.10'.

fix offset when drawing line numbers

also ok to backport to 4.10

FIXED-IN: 4.11

M  +2    -2    part/view/kateviewhelpers.cpp

http://commits.kde.org/kate/3a421e21b6cc62c5088d02dcc436feac115b5ba9
Comment 8 Dominik Haumann 2013-08-11 16:00:01 UTC
*** Bug 323377 has been marked as a duplicate of this bug. ***
Comment 9 Christoph Feck 2014-05-08 23:29:18 UTC
*** Bug 334534 has been marked as a duplicate of this bug. ***
Comment 10 Gavin Bowlby 2014-05-08 23:35:56 UTC
Christoph:

Sorry for opening a bug report for a known problem.

Any suggestions on how I can get a Kate version > 3.10.2 on my Win7 KDE system?

thanks,
Gavin Bowlby


On Thursday, May 8, 2014 4:29 PM, Christoph Feck <christoph@maxiom.de> wrote:
 
https://bugs.kde.org/show_bug.cgi?id=317352

Christoph Feck <christoph@maxiom.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gavin_bowlby@yahoo.com

--- Comment #9 from Christoph Feck <christoph@maxiom.de> ---
*** Bug 334534 has been marked as a duplicate of this bug. ***
Comment 11 Christoph Feck 2014-08-26 14:04:01 UTC
*** Bug 338573 has been marked as a duplicate of this bug. ***