mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
ui: rename Config.Val to Pixels
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -216,8 +216,8 @@ func Main() {
|
||||
}
|
||||
cfg := getConfig()
|
||||
opts := singleWindow.opts
|
||||
w := cfg.Val(opts.Width)
|
||||
h := cfg.Val(opts.Height)
|
||||
w := cfg.Pixels(opts.Width)
|
||||
h := cfg.Pixels(opts.Height)
|
||||
title := C.CString(opts.Title)
|
||||
defer C.free(unsafe.Pointer(title))
|
||||
C.gio_main(view, title, C.CGFloat(w), C.CGFloat(h))
|
||||
|
||||
@@ -237,8 +237,8 @@ func createNativeWindow(opts *WindowOptions) (*window, error) {
|
||||
C.free(unsafe.Pointer(title))
|
||||
|
||||
_, _, cfg := w.config()
|
||||
w.width = cfg.Val(opts.Width)
|
||||
w.height = cfg.Val(opts.Height)
|
||||
w.width = cfg.Pixels(opts.Width)
|
||||
w.height = cfg.Pixels(opts.Height)
|
||||
if conn.decor != nil {
|
||||
// Request server side decorations.
|
||||
w.decor = C.zxdg_decoration_manager_v1_get_toplevel_decoration(conn.decor, w.topLvl)
|
||||
|
||||
@@ -220,8 +220,8 @@ func createNativeWindow(opts *WindowOptions) (*window, error) {
|
||||
}
|
||||
defer unregisterClass(cls, hInst)
|
||||
wr := rect{
|
||||
right: int32(cfg.Val(opts.Width) + .5),
|
||||
bottom: int32(cfg.Val(opts.Height) + .5),
|
||||
right: int32(cfg.Pixels(opts.Width)),
|
||||
bottom: int32(cfg.Pixels(opts.Height)),
|
||||
}
|
||||
dwStyle := uint32(_WS_OVERLAPPEDWINDOW)
|
||||
dwExStyle := uint32(_WS_EX_APPWINDOW | _WS_EX_WINDOWEDGE)
|
||||
|
||||
Reference in New Issue
Block a user