Fix UI scaling for small laptop screens (1280x768+)
Reduces default window size from 1280x800 to 1200x700 to fit on 1280x768 laptop screens. Reduces all hardcoded MinSize values for professional cross-resolution support: - Window default: 1200x700 (was 1280x800) - Log scroll: 600x350 (was 700x450) - Deinterlace preview: 640x360 (was 800x450) - Contact sheet viewer: 700x600 with scroll (was 900x700) - Contact sheet image: 640x480 (was 800x600) - Filters settings: 350x400 (was 400x600) - Upscale settings: 400x400 (was 450x600) All content uses scrollable containers for proper scaling. Window is resizable and can be maximized via window manager controls.
This commit is contained in:
parent
9045460dbc
commit
2dd14c727c
34
main.go
34
main.go
|
|
@ -301,7 +301,8 @@ func (s *appState) openLogViewer(title, path string, live bool) {
|
||||||
text.Disable()
|
text.Disable()
|
||||||
bg := canvas.NewRectangle(color.NRGBA{0x15, 0x1a, 0x24, 0xff}) // slightly lighter than app bg
|
bg := canvas.NewRectangle(color.NRGBA{0x15, 0x1a, 0x24, 0xff}) // slightly lighter than app bg
|
||||||
scroll := container.NewVScroll(container.NewMax(bg, text))
|
scroll := container.NewVScroll(container.NewMax(bg, text))
|
||||||
scroll.SetMinSize(fyne.NewSize(700, 450))
|
// Adaptive min size - allows proper scaling on small screens
|
||||||
|
scroll.SetMinSize(fyne.NewSize(600, 350))
|
||||||
|
|
||||||
stop := make(chan struct{})
|
stop := make(chan struct{})
|
||||||
if live {
|
if live {
|
||||||
|
|
@ -3728,11 +3729,15 @@ func runGUI() {
|
||||||
} else {
|
} else {
|
||||||
logging.Debug(logging.CatUI, "app icon not found; continuing without custom icon")
|
logging.Debug(logging.CatUI, "app icon not found; continuing without custom icon")
|
||||||
}
|
}
|
||||||
// Use a generous default window size that fits typical desktops without overflowing.
|
// Adaptive window sizing for professional cross-resolution support
|
||||||
w.Resize(fyne.NewSize(1280, 800))
|
w.SetFixedSize(false) // Allow manual resizing and maximizing
|
||||||
w.SetFixedSize(false) // Allow manual resizing
|
|
||||||
|
// Use conservative default size that fits on small laptop screens (1280x768)
|
||||||
|
// Window can be maximized by user using window manager controls
|
||||||
|
w.Resize(fyne.NewSize(1200, 700))
|
||||||
w.CenterOnScreen()
|
w.CenterOnScreen()
|
||||||
logging.Debug(logging.CatUI, "window initialized with manual resizing and centering enabled")
|
|
||||||
|
logging.Debug(logging.CatUI, "window initialized at 1200x700 (fits 1280x768+ screens), manual resizing enabled")
|
||||||
|
|
||||||
state := &appState{
|
state := &appState{
|
||||||
window: w,
|
window: w,
|
||||||
|
|
@ -6078,7 +6083,8 @@ Metadata: %s`,
|
||||||
|
|
||||||
previewImg := canvas.NewImageFromResource(img)
|
previewImg := canvas.NewImageFromResource(img)
|
||||||
previewImg.FillMode = canvas.ImageFillContain
|
previewImg.FillMode = canvas.ImageFillContain
|
||||||
previewImg.SetMinSize(fyne.NewSize(800, 450))
|
// Adaptive size for small screens
|
||||||
|
previewImg.SetMinSize(fyne.NewSize(640, 360))
|
||||||
|
|
||||||
infoLabel := widget.NewLabel("Left: Original | Right: Deinterlaced")
|
infoLabel := widget.NewLabel("Left: Original | Right: Deinterlaced")
|
||||||
infoLabel.Alignment = fyne.TextAlignCenter
|
infoLabel.Alignment = fyne.TextAlignCenter
|
||||||
|
|
@ -10263,11 +10269,15 @@ func buildThumbView(state *appState) fyne.CanvasObject {
|
||||||
go func() {
|
go func() {
|
||||||
img := canvas.NewImageFromFile(contactSheetPath)
|
img := canvas.NewImageFromFile(contactSheetPath)
|
||||||
img.FillMode = canvas.ImageFillContain
|
img.FillMode = canvas.ImageFillContain
|
||||||
img.SetMinSize(fyne.NewSize(800, 600))
|
// Adaptive size for small screens - use scrollable dialog
|
||||||
|
img.SetMinSize(fyne.NewSize(640, 480))
|
||||||
|
|
||||||
fyne.CurrentApp().Driver().DoFromGoroutine(func() {
|
fyne.CurrentApp().Driver().DoFromGoroutine(func() {
|
||||||
d := dialog.NewCustom("Contact Sheet", "Close", img, state.window)
|
// Wrap in scroll container for large contact sheets
|
||||||
d.Resize(fyne.NewSize(900, 700))
|
scroll := container.NewScroll(img)
|
||||||
|
d := dialog.NewCustom("Contact Sheet", "Close", scroll, state.window)
|
||||||
|
// Adaptive dialog size that fits on 1280x768 screens
|
||||||
|
d.Resize(fyne.NewSize(700, 600))
|
||||||
d.Show()
|
d.Show()
|
||||||
}, false)
|
}, false)
|
||||||
}()
|
}()
|
||||||
|
|
@ -10545,7 +10555,8 @@ func buildFiltersView(state *appState) fyne.CanvasObject {
|
||||||
)
|
)
|
||||||
|
|
||||||
settingsScroll := container.NewVScroll(settingsPanel)
|
settingsScroll := container.NewVScroll(settingsPanel)
|
||||||
settingsScroll.SetMinSize(fyne.NewSize(400, 600))
|
// Adaptive height for small screens - allow content to flow
|
||||||
|
settingsScroll.SetMinSize(fyne.NewSize(350, 400))
|
||||||
|
|
||||||
mainContent := container.NewHSplit(
|
mainContent := container.NewHSplit(
|
||||||
container.NewVBox(leftPanel, videoContainer),
|
container.NewVBox(leftPanel, videoContainer),
|
||||||
|
|
@ -10850,7 +10861,8 @@ func buildUpscaleView(state *appState) fyne.CanvasObject {
|
||||||
)
|
)
|
||||||
|
|
||||||
settingsScroll := container.NewVScroll(settingsPanel)
|
settingsScroll := container.NewVScroll(settingsPanel)
|
||||||
settingsScroll.SetMinSize(fyne.NewSize(450, 600))
|
// Adaptive height for small screens
|
||||||
|
settingsScroll.SetMinSize(fyne.NewSize(400, 400))
|
||||||
|
|
||||||
mainContent := container.NewHSplit(
|
mainContent := container.NewHSplit(
|
||||||
container.NewVBox(leftPanel, videoContainer),
|
container.NewVBox(leftPanel, videoContainer),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user