After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687415 - Line numbers not completely visible when using huge font
Line numbers not completely visible when using huge font
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 675348 687517 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-11-02 08:27 UTC by Sebastian Bergmann
Modified: 2013-09-03 18:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot demonstrating the problem (43.00 KB, image/png)
2012-11-02 08:27 UTC, Sebastian Bergmann
  Details
GutterRendererLines: recalculate size on view style updated (2.31 KB, patch)
2013-09-03 17:48 UTC, Sébastien Wilmet
accepted-commit_now Details | Review

Description Sebastian Bergmann 2012-11-02 08:27:49 UTC
Created attachment 227875 [details]
Screenshot demonstrating the problem

The line numbers are not completely visible.
Comment 1 Rob Marshall 2013-04-23 23:20:23 UTC
I'm seeing this problem on 3.6.1 (Ubuntu 12.10) as well. On some files, although reloading a file seemed to clear it up once, the line number gutter (or whatever it's called) isn't sized correctly and the numbers get truncated.
Comment 2 Sébastien Wilmet 2013-05-19 18:11:03 UTC
*** Bug 675348 has been marked as a duplicate of this bug. ***
Comment 3 Sébastien Wilmet 2013-08-04 09:59:51 UTC
*** Bug 687517 has been marked as a duplicate of this bug. ***
Comment 4 Frank Dana 2013-08-04 12:37:51 UTC
The bug I'd added this data to was closed as duplicate, so I guess I'll  migrate my comments here. (Also reported as redhat bugzilla #991735...)

Description of problem:
When the font size is increased in gedit (either interactively or in the
preferences), the line numbering size is increased to match. However, the
line-number strip width remains constant, so at larger font sizes the line
numbering becomes cut off.

Steps to Reproduce:
1. Open a file in gedit
2. Enable "Display line numbers" in Preferences > View, if necessary
3. Increase font size significantly, either in Preferences or (if "Text Size"
plugin is enabled) by repeatedly pressing Ctrl and +

Actual results:
Line numbers grow larger, and are increasingly cut off by the window border.

Expected results:
Line number strip dynamically resizes to fit width of its contents.

Additional info:
The wrong-size line numbering strip (which happens in both directions; if the
font is decreased it remains far too wide) occurs on a per-tab basis when
multiple files are open, and persists in each tab until a resize of the strip
occurs. Such a resize can be triggered (for the current tab only) by increasing
or decreasing the line count in the open file by an order of magnitude (e.g.
from 995 to 1001 lines). Note that the nominal width of the strip is 2 digits,
so the shortest length transition that will cause a resize is from 99 to 100
lines, or vice versa.
Comment 5 Sébastien Wilmet 2013-09-03 17:48:34 UTC
Created attachment 254002 [details] [review]
GutterRendererLines: recalculate size on view style updated

This fixes a bug with the line numbers, when we change the font size of
the text view (the gutter width was not updated).
Comment 6 Ignacio Casal Quinteiro (nacho) 2013-09-03 18:06:45 UTC
Review of attachment 254002 [details] [review]:

Looks good.
Comment 7 Sébastien Wilmet 2013-09-03 18:46:12 UTC
Commit pushed. It will be available for the 3.10 version.