diff options
author | Zander Brown <zbrown@gnome.org> | 2021-11-05 10:26:41 +0000 |
---|---|---|
committer | Zander Brown <zbrown@gnome.org> | 2021-11-05 10:26:41 +0000 |
commit | 3512f9e29a6c0e0e0fd50b60073faa5a1cec0cdb (patch) | |
tree | f857ceb2791781c35082ffcfa626f4c1d25e68f3 /src | |
parent | 46021de1f024f2fbbd24b5604f3ae71886e5a332 (diff) | |
download | baobab-3512f9e29a6c0e0e0fd50b60073faa5a1cec0cdb.tar.gz |
cells: enable tabular numbers font feature
Stops size/contents looking higgledypiggledy as numbers now align with
each other, also reduces movement whilst scanning
Diffstat (limited to 'src')
-rw-r--r-- | src/baobab-cellrenderers.vala | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/baobab-cellrenderers.vala b/src/baobab-cellrenderers.vala index c7580bc..9b16b19 100644 --- a/src/baobab-cellrenderers.vala +++ b/src/baobab-cellrenderers.vala @@ -108,7 +108,15 @@ namespace Baobab { } - public class CellRendererSize : Gtk.CellRendererText { + public class CellRendererTabular : Gtk.CellRendererText { + construct { + var attrs = new Pango.AttrList(); + attrs.insert (new Pango.AttrFontFeatures ("tnum=1")); + attributes = attrs; + } + } + + public class CellRendererSize : CellRendererTabular { public Scanner.State state { set; get; } public new uint64 size { @@ -118,7 +126,7 @@ namespace Baobab { } } - public class CellRendererItems : Gtk.CellRendererText { + public class CellRendererItems : CellRendererTabular { public Scanner.State state { set; get; } public int items { |