clientSizeFromSizePixels calculates client size from size in native pixels.
(size Size)
| 1852 | |
| 1853 | // clientSizeFromSizePixels calculates client size from size in native pixels. |
| 1854 | func (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. |
no test coverage detected