diff options
Diffstat (limited to 'src/rhlibrary/app_window.go')
-rw-r--r-- | src/rhlibrary/app_window.go | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/rhlibrary/app_window.go b/src/rhlibrary/app_window.go index fe4dda8..cf1a97a 100644 --- a/src/rhlibrary/app_window.go +++ b/src/rhlibrary/app_window.go @@ -81,13 +81,32 @@ func NewAppWindow(player *player.PlayerChan, width, height int) (aw *AppWindow, } grid.SetOrientation(gtk.ORIENTATION_VERTICAL) - if err = aw.drawSelector(grid); err != nil { + if err = aw.drawPlayer(grid); err != nil { return } - if err = aw.drawPlayer(grid); err != nil { + if err = aw.drawSelector(grid); err != nil { return } - aw.win.Add(grid) + + var frame *gtk.Frame + if frame, err = gtk.FrameNew(""); err != nil { + return nil, err + } + var cp *gtk.CssProvider + if cp, err = gtk.CssProviderNew(); err != nil { + return nil, err + } + if err = cp.LoadFromData(".frame { border: 0px; padding: 15px; }"); err != nil { + return nil, err + } + var sc *gtk.StyleContext + if sc, err = frame.GetStyleContext(); err != nil { + return nil, err + } + sc.AddProvider(cp, 600) // TOOD: hardcoded value + + frame.Add(grid) + aw.win.Add(frame) aw.win.SetDefaultSize(width, height) return |