1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-gtk.git synced 2024-10-31 19:44:23 +00:00
cchat-gtk/internal/ui/window.go

31 lines
649 B
Go

package ui
import (
"github.com/diamondburned/cchat-gtk/internal/ui/messages"
"github.com/diamondburned/cchat-gtk/internal/ui/service"
"github.com/gotk3/gotk3/gtk"
)
type window struct {
*gtk.Paned
Services *service.View
MessageView *messages.View
}
func newWindow() *window {
services := service.NewView()
services.SetSizeRequest(leftMinWidth, -1)
services.Show()
mesgview := messages.NewView()
mesgview.Show()
pane, _ := gtk.PanedNew(gtk.ORIENTATION_HORIZONTAL)
pane.Pack1(services, false, false)
pane.Pack2(mesgview, true, false)
pane.SetPosition(leftCurrentWidth)
pane.Show()
return &window{pane, services, mesgview}
}