Files
mamamiyear ceecbb6af4 feat(app): implement basic function
General
- 配置界面支持配置对象存储桶
- 快捷键进入截图
- 一键上传截图 & 复制截图链接

MacOS
- 状态栏指示器和应用图标
2026-06-01 21:17:29 +08:00

22 lines
599 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//go:build !darwin
package display
import "github.com/kbinani/screenshot"
// Primary returns the dimensions of display 0. We currently assume a 1× DPR
// because Wails on Windows / Linux already paints in physical pixels, so
// CSS coordinates and capture coordinates coincide. If a user ever runs at
// non-1× we will add a platform-specific scale lookup.
func Primary() Info {
if screenshot.NumActiveDisplays() == 0 {
return Info{CSSWidth: 1440, CSSHeight: 900, Scale: 1}
}
b := screenshot.GetDisplayBounds(0)
return Info{
CSSWidth: b.Dx(),
CSSHeight: b.Dy(),
Scale: 1,
}
}