Skip to content

SpaceDrawer: Draw tabs so that their endpoints align

Rewi Haar requested to merge Cnidarian/gtksourceview:master into master

Previously, tabs were drawn with padding of 1/8 of the width of the actual tab character. However, because tabs aren't always the same width (even in the same document), this could cause their endpoints to not line up. This resolves this issue by making the padding on either side of the symbol instead proportional to the height of the tab, which is fixed for a given font size.

Before (misaligned):

spacedrawer-monospace-before spacedrawer-proportional-before

After (aligned):

spacedrawer-monospace-after spacedrawer-proportional-after

Merge request reports