MCPcopy Index your code
hub / github.com/lxn/walk / clientSizeFromSizePixels

Method clientSizeFromSizePixels

window.go:1854–1861  ·  view source on GitHub ↗

clientSizeFromSizePixels calculates client size from size in native pixels.

(size Size)

Source from the content-addressed store, hash-verified

1852
1853// clientSizeFromSizePixels calculates client size from size in native pixels.
1854func (wb *WindowBase) clientSizeFromSizePixels(size Size) Size {
1855 window := wb.window
1856 s := window.SizePixels()
1857 cs := window.ClientBoundsPixels().Size()
1858 ncs := Size{s.Width - cs.Width, s.Height - cs.Height}
1859
1860 return Size{size.Width - ncs.Width, size.Height - ncs.Height}
1861}
1862
1863// SetClientSize sets the size of the inner bounding box of the *WindowBase,
1864// excluding decorations.

Callers 2

startLayoutMethod · 0.80
WndProcMethod · 0.80

Calls 3

SizePixelsMethod · 0.65
SizeMethod · 0.65
ClientBoundsPixelsMethod · 0.65

Tested by

no test coverage detected