Core no longer naievely constrains canvas resize dimensions
This commit is contained in:
parent
91e60900ad
commit
375205a4d2
@ -207,7 +207,6 @@ func (window *Window) resizeChildToFit () {
|
|||||||
minimumHeight := child.MinimumHeightFor(window.metrics.width)
|
minimumHeight := child.MinimumHeightFor(window.metrics.width)
|
||||||
minimumWidth, _ := child.MinimumSize()
|
minimumWidth, _ := child.MinimumSize()
|
||||||
|
|
||||||
|
|
||||||
icccm.WmNormalHintsSet (
|
icccm.WmNormalHintsSet (
|
||||||
window.backend.connection,
|
window.backend.connection,
|
||||||
window.xWindow.Id,
|
window.xWindow.Id,
|
||||||
@ -219,7 +218,7 @@ func (window *Window) resizeChildToFit () {
|
|||||||
|
|
||||||
if window.metrics.height >= minimumHeight &&
|
if window.metrics.height >= minimumHeight &&
|
||||||
window.metrics.width >= minimumWidth {
|
window.metrics.width >= minimumWidth {
|
||||||
|
|
||||||
window.child.Resize (
|
window.child.Resize (
|
||||||
window.metrics.width,
|
window.metrics.width,
|
||||||
window.metrics.height)
|
window.metrics.height)
|
||||||
@ -254,7 +253,6 @@ func (window *Window) childDrawCallback (region tomo.Canvas) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (window *Window) childMinimumSizeChangeCallback (width, height int) {
|
func (window *Window) childMinimumSizeChangeCallback (width, height int) {
|
||||||
println("x thinks:",width, height)
|
|
||||||
icccm.WmNormalHintsSet (
|
icccm.WmNormalHintsSet (
|
||||||
window.backend.connection,
|
window.backend.connection,
|
||||||
window.xWindow.Id,
|
window.xWindow.Id,
|
||||||
|
@ -113,7 +113,6 @@ func (control CoreControl) PushAll () {
|
|||||||
// AllocateCanvas resizes the canvas, constraining the width and height so that
|
// AllocateCanvas resizes the canvas, constraining the width and height so that
|
||||||
// they are not less than the specified minimum width and height.
|
// they are not less than the specified minimum width and height.
|
||||||
func (control *CoreControl) AllocateCanvas (width, height int) {
|
func (control *CoreControl) AllocateCanvas (width, height int) {
|
||||||
width, height, _ = control.ConstrainSize(width, height)
|
|
||||||
control.core.canvas = tomo.NewBasicCanvas(width, height)
|
control.core.canvas = tomo.NewBasicCanvas(width, height)
|
||||||
control.BasicCanvas = control.core.canvas
|
control.BasicCanvas = control.core.canvas
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,6 @@ func (layout Vertical) MinimumSize (
|
|||||||
width += theme.Padding() * 2
|
width += theme.Padding() * 2
|
||||||
height += theme.Padding() * 2
|
height += theme.Padding() * 2
|
||||||
}
|
}
|
||||||
println(width, height)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user