use isDense() everywhere
This commit is contained in:
parent
bf250b5ac6
commit
9669a63c5d
2
place.go
2
place.go
|
@ -143,7 +143,7 @@ func (tk *guiWidget) placeWidgets(startW int, startH int) (int, int) {
|
||||||
// tk.dumpWidget(fmt.Sprintf("PlaceGroup(%d,%d)", maxW, newH))
|
// tk.dumpWidget(fmt.Sprintf("PlaceGroup(%d,%d)", maxW, newH))
|
||||||
return maxW, newH
|
return maxW, newH
|
||||||
case widget.Button:
|
case widget.Button:
|
||||||
if tk.isWindowDense() && tk.isInGrid() {
|
if tk.isDense() && tk.isInGrid() {
|
||||||
tk.frame = false
|
tk.frame = false
|
||||||
// tk.color = nil
|
// tk.color = nil
|
||||||
// tk.defaultColor = nil
|
// tk.defaultColor = nil
|
||||||
|
|
6
size.go
6
size.go
|
@ -67,7 +67,7 @@ func (tk *guiWidget) Size() (int, int) {
|
||||||
case widget.Checkbox:
|
case widget.Checkbox:
|
||||||
return len(tk.String()) + 2, 3 // TODO: compute this based on 'window dense'
|
return len(tk.String()) + 2, 3 // TODO: compute this based on 'window dense'
|
||||||
case widget.Button:
|
case widget.Button:
|
||||||
if tk.isWindowDense() {
|
if tk.isDense() {
|
||||||
return len(tk.String()) + 2, 0
|
return len(tk.String()) + 2, 0
|
||||||
}
|
}
|
||||||
return len(tk.String()) + 2, 3 // TODO: compute this based on 'window dense'
|
return len(tk.String()) + 2, 3 // TODO: compute this based on 'window dense'
|
||||||
|
@ -244,7 +244,7 @@ func (tk *guiWidget) setFullSize() bool {
|
||||||
if tk.WidgetType() == widget.Button {
|
if tk.WidgetType() == widget.Button {
|
||||||
tk.full.h1 = tk.full.h0 + 1
|
tk.full.h1 = tk.full.h0 + 1
|
||||||
}
|
}
|
||||||
if tk.isWindowDense() && tk.isInGrid() {
|
if tk.isDense() && tk.isInGrid() {
|
||||||
tk.full.h1 = tk.full.h0
|
tk.full.h1 = tk.full.h0
|
||||||
}
|
}
|
||||||
if changed {
|
if changed {
|
||||||
|
@ -309,7 +309,7 @@ func (tk *guiWidget) buttonFullSize() rectType {
|
||||||
tk.full.h1 = r.h1
|
tk.full.h1 = r.h1
|
||||||
|
|
||||||
// total hack. fix this somewhere eventually correctly
|
// total hack. fix this somewhere eventually correctly
|
||||||
if tk.isWindowDense() { // total hack. fix this somewhere eventually correctly
|
if tk.isDense() { // total hack. fix this somewhere eventually correctly
|
||||||
tk.full.h0 += 1 // total hack. fix this somewhere eventually correctly
|
tk.full.h0 += 1 // total hack. fix this somewhere eventually correctly
|
||||||
tk.full.h1 = tk.full.h0 // total hack. fix this somewhere eventually correctly
|
tk.full.h1 = tk.full.h0 // total hack. fix this somewhere eventually correctly
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,7 +193,7 @@ func (tk *guiWidget) drawView() {
|
||||||
switch tk.WidgetType() {
|
switch tk.WidgetType() {
|
||||||
case widget.Button:
|
case widget.Button:
|
||||||
if tk.IsEnabled() {
|
if tk.IsEnabled() {
|
||||||
if tk.isWindowDense() && tk.isInGrid() {
|
if tk.isDense() && tk.isInGrid() {
|
||||||
tk.setColorButtonDense()
|
tk.setColorButtonDense()
|
||||||
} else {
|
} else {
|
||||||
tk.setColorButton()
|
tk.setColorButton()
|
||||||
|
|
Loading…
Reference in New Issue