mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/ui: refactoring: adjust the width earlier
This commit is contained in:
parent
c7deed6e72
commit
f0dbf86799
@ -1241,8 +1241,8 @@ func (u *userInterfaceImpl) setWindowSizeInDIP(width, height int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
width, height = u.adjustWindowSizeBasedOnSizeLimitsInDIP(width, height)
|
width, height = u.adjustWindowSizeBasedOnSizeLimitsInDIP(width, height)
|
||||||
if width < 1 {
|
if m := u.minimumWindowWidth(); width < m {
|
||||||
width = 1
|
width = m
|
||||||
}
|
}
|
||||||
if height < 1 {
|
if height < 1 {
|
||||||
height = 1
|
height = 1
|
||||||
@ -1335,10 +1335,6 @@ func (u *userInterfaceImpl) setWindowSizeInDIPImpl(width, height int, fullscreen
|
|||||||
// Get the original window position and size before changing the state of fullscreen.
|
// Get the original window position and size before changing the state of fullscreen.
|
||||||
origX, origY := u.origWindowPos()
|
origX, origY := u.origWindowPos()
|
||||||
|
|
||||||
if mw := u.minimumWindowWidth(); width < mw {
|
|
||||||
width = mw
|
|
||||||
}
|
|
||||||
|
|
||||||
wasFullscreen := u.isFullscreen()
|
wasFullscreen := u.isFullscreen()
|
||||||
if u.isNativeFullscreenAvailable() && u.isNativeFullscreen() {
|
if u.isNativeFullscreenAvailable() && u.isNativeFullscreen() {
|
||||||
u.setNativeFullscreen(false)
|
u.setNativeFullscreen(false)
|
||||||
|
Loading…
Reference in New Issue
Block a user