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

Method sizeFromClientSizePixels

window.go:1844–1851  ·  view source on GitHub ↗

sizeFromClientSizePixels calculates size from client size in native pixels.

(clientSize Size)

Source from the content-addressed store, hash-verified

1842
1843// sizeFromClientSizePixels calculates size from client size in native pixels.
1844func (wb *WindowBase) sizeFromClientSizePixels(clientSize Size) Size {
1845 window := wb.window
1846 s := window.SizePixels()
1847 cs := window.ClientBoundsPixels().Size()
1848 ncs := Size{s.Width - cs.Width, s.Height - cs.Height}
1849
1850 return Size{clientSize.Width + ncs.Width, clientSize.Height + ncs.Height}
1851}
1852
1853// clientSizeFromSizePixels calculates client size from size in native pixels.
1854func (wb *WindowBase) clientSizeFromSizePixels(size Size) Size {

Callers 5

SetClientSizePixelsMethod · 0.95
SetBoundsPixelsMethod · 0.80
RestoreStateMethod · 0.80
startLayoutMethod · 0.80
WndProcMethod · 0.80

Calls 3

SizePixelsMethod · 0.65
SizeMethod · 0.65
ClientBoundsPixelsMethod · 0.65

Tested by

no test coverage detected