GuillaumeGomez / process-viewer

A process viewer GUI in rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Process list: Number columns should be right-aligned and in monospace font

genodeftest opened this issue · comments

Usually, numbers are right-aligned in tables. To make that not break the layout, using a monospace font looks nicer.

Setting the font monospace in procs.rs:append_column() after line 129 this way works fine:

renderer.set_property_family(Some("Monospace"));

Text alignment is not possible right now because gtk-rs's gtk::CellRendererTextExt misses support for set_property_alignment, probably because the Gtk.CellRendererText.alignment property has GObject.ParamFlags.EXPLICIT_NOTIFY set.

Ah too bad. Might be worth opening an issue on gtk-rs repository directly. I'll try to take a look if someone else doesn't before.

Ah too bad. Might be worth opening an issue on gtk-rs repository directly. I'll try to take a look if someone else doesn't before.

Ok, reported as gtk-rs/gtk#608

Thanks!

gtk-rs/gtk#608 has been fixed. After they release their next version, this issue can get fixed.

Indeed.

With xalign=1.0, the font doesn't even have to be monospaced.