blob: 899cba97793a5bd8b49b3f8972745367e60fb57c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
using Pango;
public class Astal.Label : Gtk.Label {
/**
* Shortcut for setting [[email protected]:ellipsize] to [[email protected]]
*/
public bool truncate {
set { ellipsize = value ? EllipsizeMode.END : EllipsizeMode.NONE; }
get { return ellipsize == EllipsizeMode.END; }
}
/**
* Shortcut for setting [[email protected]:justify] to [[email protected]]
*/
public new bool justify_fill {
set { justify = value ? Gtk.Justification.FILL : Gtk.Justification.LEFT; }
get { return justify == Gtk.Justification.FILL; }
}
construct {
notify["ellipsize"].connect(() => notify_property("truncate"));
notify["justify"].connect(() => notify_property("justify_fill"));
}
}
|