[baobab/zbrown/tnum] cells: enable tabular numbers font feature
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [baobab/zbrown/tnum] cells: enable tabular numbers font feature
- Date: Fri, 5 Nov 2021 10:30:18 +0000 (UTC)
commit 3512f9e29a6c0e0e0fd50b60073faa5a1cec0cdb
Author: Zander Brown <zbrown gnome org>
Date: Fri Nov 5 10:26:41 2021 +0000
cells: enable tabular numbers font feature
Stops size/contents looking higgledypiggledy as numbers now align with
each other, also reduces movement whilst scanning
src/baobab-cellrenderers.vala | 12 ++++++++++--
1 file 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 {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]