feat: disable connect button when host, port and nickname are empty

This commit is contained in:
2022-01-29 00:45:32 +02:00
parent 92d91dc54d
commit 7424de0538
6 changed files with 61 additions and 24 deletions
+2 -2
View File
@@ -225,10 +225,10 @@ func (s *State) SetSize(width, height int) {
s.InputBox.SetSize(width)
s.SidePanel.SetSize(width, height, s.InputBox.Style.GetVerticalFrameSize())
// We floor here because width is an int and some fractions are lost
// We floor because width is an int and some fractions are lost when casting
// and also because we ceil the sidepanel's width
// -3 for the tab bar height
newWidth := int(math.Floor(float64(width)*8.0/10.0) - float64(s.Viewport.Style.GetHorizontalFrameSize()))
newWidth := int(math.Floor(float64(width)*8/10) - float64(s.Viewport.Style.GetHorizontalFrameSize()))
newHeight := height - s.InputBox.Style.GetVerticalFrameSize() - s.Viewport.Style.GetVerticalFrameSize() - 3
s.Viewport.Width = newWidth