1
0
mirror of https://github.com/mrusme/neonmodem.git synced 2024-12-04 14:46:37 -05:00

Consolidated values

This commit is contained in:
マリウス 2023-01-01 21:12:02 -05:00
parent 8e9102e951
commit 8bd83d75c1
No known key found for this signature in database
GPG Key ID: 272ED814BF63261F

View File

@ -286,8 +286,10 @@ func (m Model) View() string {
Width(m.viewport.Width - 2). Width(m.viewport.Width - 2).
Render(title) Render(title)
m.textarea.SetWidth(m.viewport.Width - 2) textareaWidth := m.viewport.Width - 2
m.textarea.SetHeight(6) textareaHeight := 6
m.textarea.SetWidth(textareaWidth)
m.textarea.SetHeight(textareaHeight)
bottombar := m.ctx.Theme.DialogBox.Bottombar. bottombar := m.ctx.Theme.DialogBox.Bottombar.
Width(m.viewport.Width - 2). Width(m.viewport.Width - 2).
@ -300,14 +302,17 @@ func (m Model) View() string {
bottombar, bottombar,
) )
tmp := helpers.PlaceOverlay(5, m.ctx.Screen[1]-21, replyWindowX := 5
replyWindowY := m.ctx.Screen[1] - 21
tmp := helpers.PlaceOverlay(replyWindowX, replyWindowY,
m.ctx.Theme.DialogBox.Window.Focused.Render(replyWindow), m.ctx.Theme.DialogBox.Window.Focused.Render(replyWindow),
view.String(), true) view.String(), true)
m.viewcacheTextareaXY[0] = 6 m.viewcacheTextareaXY[0] = replyWindowX + 1
m.viewcacheTextareaXY[1] = m.ctx.Screen[1] - 19 m.viewcacheTextareaXY[1] = replyWindowY + 2
m.viewcacheTextareaXY[2] = m.viewport.Width - 2 m.viewcacheTextareaXY[2] = textareaWidth
m.viewcacheTextareaXY[3] = 6 m.viewcacheTextareaXY[3] = textareaHeight
view = strings.Builder{} view = strings.Builder{}
view.WriteString(tmp) view.WriteString(tmp)