summaryrefslogtreecommitdiff
path: root/place.go
diff options
context:
space:
mode:
Diffstat (limited to 'place.go')
-rw-r--r--place.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/place.go b/place.go
index 2cffe34..b77a505 100644
--- a/place.go
+++ b/place.go
@@ -34,7 +34,7 @@ func (tk *guiWidget) Position() (int, int) {
}
func (w *guiWidget) placeBox(startW int, startH int) {
- if w.node.WidgetType != widget.Box {
+ if w.WidgetType() != widget.Box {
return
}
@@ -77,7 +77,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
tk.startW = startW
tk.startH = startH
- switch tk.node.WidgetType {
+ switch tk.WidgetType() {
case widget.Window:
tk.full.w0 = startW
tk.full.h0 = startH
@@ -148,7 +148,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
// tk.color = nil
// tk.defaultColor = nil
/*
- if tk.node.IsEnabled() {
+ if tk.IsEnabled() {
tk.setColorButtonDense()
} else {
tk.setColorDisable()
@@ -168,7 +168,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
}
func (tk *guiWidget) isWindowDense() bool {
- if tk.node.WidgetType == widget.Window {
+ if tk.WidgetType() == widget.Window {
return tk.window.dense
}
if tk.parent == nil {
@@ -178,7 +178,7 @@ func (tk *guiWidget) isWindowDense() bool {
}
func (tk *guiWidget) isInGrid() bool {
- if tk.node.WidgetType == widget.Grid {
+ if tk.WidgetType() == widget.Grid {
return true
}
if tk.parent == nil {
@@ -189,7 +189,7 @@ func (tk *guiWidget) isInGrid() bool {
func (w *guiWidget) placeGrid(startW int, startH int) (int, int) {
// w.showWidgetPlacement("grid0:")
- if w.node.WidgetType != widget.Grid {
+ if w.WidgetType() != widget.Grid {
return 0, 0
}
@@ -320,8 +320,8 @@ func textSize(n *tree.Node) (int, int) {
*/
func (tk *guiWidget) gocuiSetWH(sizeW, sizeH int) {
- w := len(tk.node.GetLabel())
- lines := strings.Split(tk.node.GetLabel(), "\n")
+ w := len(tk.GetLabel())
+ lines := strings.Split(tk.GetLabel(), "\n")
h := len(lines)
if tk.Hidden() {