1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-gtk.git synced 2024-11-01 03:54:16 +00:00
cchat-gtk/internal/ui/window.go

31 lines
649 B
Go
Raw Normal View History

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