summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZander Brown <zbrown@gnome.org>2021-11-05 10:26:41 +0000
committerZander Brown <zbrown@gnome.org>2021-11-05 10:26:41 +0000
commit3512f9e29a6c0e0e0fd50b60073faa5a1cec0cdb (patch)
treef857ceb2791781c35082ffcfa626f4c1d25e68f3 /src
parent46021de1f024f2fbbd24b5604f3ae71886e5a332 (diff)
downloadbaobab-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.vala12
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 {