feat(v2): T-308A window 80% of screen, 2x3 gallery, Esc close, button states
- Window opens at 80% of the primary display (Windows GetSystemMetrics). - Gallery is now 2 columns x 3 rows and the right panel is narrower. - Esc closes the full-image viewer (key focus + filter). - Start/Stop grey out per running state (gtx.Disabled drops input); a hard ReportIssue resets running so Start re-enables. Cross-compiles for Windows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//go:build windows
|
||||
|
||||
package ui
|
||||
|
||||
// SM_CXSCREEN / SM_CYSCREEN return the primary display size in pixels.
|
||||
const (
|
||||
smCXScreen = 0
|
||||
smCYScreen = 1
|
||||
)
|
||||
|
||||
var procGetSystemMetrics = user32.NewProc("GetSystemMetrics")
|
||||
|
||||
// screenSize returns the primary display size in pixels, or (0, 0) if unavailable.
|
||||
func screenSize() (int, int) {
|
||||
width, _, _ := procGetSystemMetrics.Call(uintptr(smCXScreen))
|
||||
height, _, _ := procGetSystemMetrics.Call(uintptr(smCYScreen))
|
||||
return int(width), int(height)
|
||||
}
|
||||
Reference in New Issue
Block a user