From 1744b08dd8841723ee267b943e4fda7a921d85e2 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 5 Aug 2014 20:47:56 -0400 Subject: Made standalone labels aligned to the top-left on GTK+. --- redo/label_unix.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'redo/label_unix.go') diff --git a/redo/label_unix.go b/redo/label_unix.go index 445556c..0790539 100644 --- a/redo/label_unix.go +++ b/redo/label_unix.go @@ -13,9 +13,6 @@ import ( // extern void checkboxToggled(GtkToggleButton *, gpointer); import "C" -// TODOs: -// - standalone label on its own: should it be centered or not? - type label struct { _widget *C.GtkWidget misc *C.GtkMisc @@ -41,7 +38,10 @@ func newLabel(text string) Label { } func newStandaloneLabel(text string) Label { - return finishNewLabel(text, true) + l := finishNewLabel(text, true) + // standalone labels are always at the top left + C.gtk_misc_set_alignment(l.misc, 0, 0) + return l } func (l *label) Text() string { -- cgit v1.2.3