diff options
author | 2019-09-26 17:39:58 +0200 | |
---|---|---|
committer | 2019-09-27 06:04:27 +0200 | |
commit | 489acedaf6bb69ec9e8bdabb01bff9b088d4cbed (patch) | |
tree | 038c60ede176006be8f8ec8903500eef610fc9fb /groupbox.go | |
parent | DPI: Merge `SizePixels` to `Size` (diff) | |
download | wireguard-windows-489acedaf6bb69ec9e8bdabb01bff9b088d4cbed.tar.xz wireguard-windows-489acedaf6bb69ec9e8bdabb01bff9b088d4cbed.zip |
DPI: Merge `RectanglePixels` to `Rectangle`
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'groupbox.go')
-rw-r--r-- | groupbox.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/groupbox.go b/groupbox.go index 9d265ee2..51e62d70 100644 --- a/groupbox.go +++ b/groupbox.go @@ -121,7 +121,7 @@ func (gb *GroupBox) AsContainerBase() *ContainerBase { return gb.composite.AsContainerBase() } -func (gb *GroupBox) ClientBoundsPixels() RectanglePixels { +func (gb *GroupBox) ClientBoundsPixels() Rectangle { cb := windowClientBounds(gb.hWndGroupBox) if gb.Layout() == nil { @@ -136,7 +136,7 @@ func (gb *GroupBox) ClientBoundsPixels() RectanglePixels { } padding := gb.IntFrom96DPI(1) - return RectanglePixels{cb.X + padding, cb.Y + gb.headerHeight, cb.Width - 2*padding, cb.Height - gb.headerHeight - 2*padding} + return Rectangle{cb.X + padding, cb.Y + gb.headerHeight, cb.Width - 2*padding, cb.Height - gb.headerHeight - 2*padding} } func (gb *GroupBox) updateHeaderHeight() { @@ -361,7 +361,7 @@ func (gb *GroupBox) WndProc(hwnd win.HWND, msg uint32, wParam, lParam uintptr) u } else { x = gb.headerHeight * 2 / 3 } - gb.checkBox.SetBoundsPixels(RectanglePixels{x, gb.headerHeight, s.Width, s.Height}) + gb.checkBox.SetBoundsPixels(Rectangle{x, gb.headerHeight, s.Width, s.Height}) } gbcb := gb.ClientBoundsPixels() @@ -434,7 +434,7 @@ func (li *groupBoxLayoutItem) PerformLayout() []LayoutResultItem { return []LayoutResultItem{ { Item: li.children[0], - Bounds: RectanglePixels{X: li.compositePos.X, Y: li.compositePos.Y, Width: li.geometry.Size.Width - li.compositePos.X*2, Height: li.geometry.Size.Height - li.compositePos.Y - IntFrom96DPI(5, li.ctx.dpi)}, + Bounds: Rectangle{X: li.compositePos.X, Y: li.compositePos.Y, Width: li.geometry.Size.Width - li.compositePos.X*2, Height: li.geometry.Size.Height - li.compositePos.Y - IntFrom96DPI(5, li.ctx.dpi)}, }, } } |