aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.go2
-rw-r--r--ui/view-login.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 66a3524..858e407 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -66,7 +66,7 @@ func (ui *GomuksUI) Init() {
ViewLogin: ui.NewLoginView(),
ViewMain: ui.NewMainView(),
}
- ui.app.Root = ui.views[ViewLogin]
+ ui.SetView(ViewLogin)
}
func (ui *GomuksUI) Start() error {
diff --git a/ui/view-login.go b/ui/view-login.go
index 1cef96f..e0268d0 100644
--- a/ui/view-login.go
+++ b/ui/view-login.go
@@ -87,9 +87,11 @@ func (ui *GomuksUI) NewLoginView() mauview.Component {
AddComponent(view.usernameLabel, 1, 1, 1, 1).
AddComponent(view.passwordLabel, 1, 3, 1, 1).
AddComponent(view.homeserverLabel, 1, 5, 1, 1)
+ view.FocusNextItem()
ui.loginView = view
view.container = mauview.Center(mauview.NewBox(view).SetTitle("Log in to Matrix"), 45, 13)
+ view.container.SetAlwaysFocusChild(true)
return view.container
}