feat(app): implement basic function
General - 配置界面支持配置对象存储桶 - 快捷键进入截图 - 一键上传截图 & 复制截图链接 MacOS - 状态栏指示器和应用图标
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
//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,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user