summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-05 20:47:56 -0400
committerPietro Gagliardi <[email protected]>2014-08-05 20:47:56 -0400
commit1744b08dd8841723ee267b943e4fda7a921d85e2 (patch)
tree6cbab355a8b201855cae4174823ee7cc7dae5219
parent03f2873f686ac6d18ddf1d1e6e68b097e33533d4 (diff)
Made standalone labels aligned to the top-left on GTK+.
-rw-r--r--redo/label_unix.go8
1 files changed, 4 insertions, 4 deletions
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 {