Compare commits
3 Commits
b58932f02b
...
v0.8.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d071bd1d3 | |||
| dfc5c4514a | |||
| 51afca6a3f |
@@ -65,7 +65,7 @@ func (this *containerBox) Remove (child tomo.Object) {
|
||||
if index < 0 { return }
|
||||
|
||||
box.setParent(nil)
|
||||
this.children = slices.Delete(this.children, index, index)
|
||||
this.children = slices.Delete(this.children, index, index + 1)
|
||||
this.invalidateLayout()
|
||||
this.invalidateMinimum()
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ func (this *windowLink) NotifyMinimumSizeChange () {
|
||||
|
||||
func (this *Backend) NewWindow (kind tomo.WindowKind, bounds image.Rectangle) (tomo.Window, error) {
|
||||
this.assert()
|
||||
window, err := this.newWindow(bounds, false)
|
||||
window, err := this.newWindow(bounds, kind == tomo.WindowKindMenu)
|
||||
if err != nil { return nil, err }
|
||||
window.setKind(kind)
|
||||
return window, nil
|
||||
@@ -244,7 +244,7 @@ func (this *window) NewChild (kind tomo.WindowKind, bounds image.Rectangle) (tom
|
||||
leader := this.leader
|
||||
|
||||
child, err := this.backend.newWindow (
|
||||
bounds.Add(this.metrics.innerBounds.Min), false)
|
||||
bounds.Add(this.metrics.innerBounds.Min), kind == tomo.WindowKindMenu)
|
||||
if err != nil { return nil, err }
|
||||
|
||||
child.leader = leader
|
||||
@@ -473,7 +473,7 @@ func windowKindToType (kind tomo.WindowKind) string {
|
||||
case tomo.WindowKindNormal: return "NORMAL"
|
||||
case tomo.WindowKindPlain: return "DOCK"
|
||||
case tomo.WindowKindUtility: return "UTILITY"
|
||||
case tomo.WindowKindToolbar: return "TOOLBAR"
|
||||
case tomo.WindowKindToolbar: return "MENU"
|
||||
case tomo.WindowKindMenu: return "POPUP_MENU"
|
||||
case tomo.WindowKindModal: return "NORMAL"
|
||||
default: return strings.ReplaceAll(strings.ToUpper(string(kind)), " ", "_")
|
||||
|
||||
Reference in New Issue
Block a user