internal/uidriver: Add comments

Updates #1575
This commit is contained in:
Hajime Hoshi 2021-04-17 18:17:24 +09:00
parent 1ca0ecc10f
commit 6df87a0383
2 changed files with 2 additions and 2 deletions

View File

@ -631,6 +631,7 @@ func (u *UserInterface) SetCursorShape(shape driver.CursorShape) {
func (u *UserInterface) DeviceScaleFactor() float64 { func (u *UserInterface) DeviceScaleFactor() float64 {
if !u.isRunning() { if !u.isRunning() {
// TODO: Use the initWindowPosition. This requires to convert the units correctly (#1575).
return devicescale.GetAt(u.initMonitor.GetPos()) return devicescale.GetAt(u.initMonitor.GetPos())
} }

View File

@ -245,8 +245,7 @@ func (w *window) SetSize(width, height int) {
} }
func (w *window) SizeLimits() (minw, minh, maxw, maxh int) { func (w *window) SizeLimits() (minw, minh, maxw, maxh int) {
minw, minh, maxw, maxh = w.ui.getWindowSizeLimitsInDP() return w.ui.getWindowSizeLimitsInDP()
return
} }
func (w *window) SetSizeLimits(minw, minh, maxw, maxh int) { func (w *window) SetSizeLimits(minw, minh, maxw, maxh int) {