From 0dd27daff4ba4bdad99b12b85b630ab21c84fa9e Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Tue, 1 Mar 2011 11:18:13 +0100 Subject: systemadm: add a wrappable label and use it for status lines The new WrapLabel is there to work around a deficiency in GTK, namely the fact that it is hard to make labels which are both resizable and wrappable. The code is a port from libview. --- src/systemadm.vala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/systemadm.vala') diff --git a/src/systemadm.vala b/src/systemadm.vala index 6126eca221..68652d0064 100644 --- a/src/systemadm.vala +++ b/src/systemadm.vala @@ -46,12 +46,11 @@ public class LeftLabel : Label { } } -public class RightLabel : Label { +public class RightLabel : WrapLabel { + public RightLabel(string? text = null) { - set_text_or_na(text); - set_alignment(0, 0); - set_ellipsize(EllipsizeMode.START); set_selectable(true); + set_text_or_na(text); } public void set_text_or_na(string? text = null) { -- cgit v1.2.3-54-g00ecf