aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/manage_tunnels.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ui/manage_tunnels.go17
1 files changed, 10 insertions, 7 deletions
diff --git a/ui/manage_tunnels.go b/ui/manage_tunnels.go
index c7673776..14c5afe9 100644
--- a/ui/manage_tunnels.go
+++ b/ui/manage_tunnels.go
@@ -61,11 +61,18 @@ func (mtw *ManageTunnelsWindow) setup() error {
tunnelsContainer, _ := walk.NewComposite(splitter)
tunnelsContainer.SetLayout(walk.NewVBoxLayout())
+ mtw.tunnelsView, _ = NewTunnelsView(tunnelsContainer)
+ mtw.tunnelsView.ItemActivated().Attach(mtw.onEditTunnel)
+ mtw.tunnelsView.CurrentIndexChanged().Attach(mtw.updateConfView)
+
// ToolBar actions
{
- // TODO: Currently hijacking the window ToolBar,
- // Adding the toolbar to the bottom of the control may be better
- tunnelsToolBar := mtw.ToolBar()
+ // HACK: Because of https://github.com/lxn/walk/issues/481
+ // we need to put the ToolBar into its own Composite.
+ toolBarContainer, _ := walk.NewComposite(tunnelsContainer)
+ toolBarContainer.SetLayout(walk.NewHBoxLayout())
+
+ tunnelsToolBar, _ := walk.NewToolBar(toolBarContainer)
importAction := walk.NewAction()
importAction.SetText("Import tunnels from file...")
@@ -102,10 +109,6 @@ func (mtw *ManageTunnelsWindow) setup() error {
settingsMenuAction.SetText("Export")
}
- mtw.tunnelsView, _ = NewTunnelsView(tunnelsContainer)
- mtw.tunnelsView.ItemActivated().Attach(mtw.onEditTunnel)
- mtw.tunnelsView.CurrentIndexChanged().Attach(mtw.updateConfView)
-
currentTunnelContainer, _ := walk.NewComposite(splitter)
currentTunnelContainer.SetLayout(walk.NewVBoxLayout())