Skip to content

Commit

Permalink
fix: remove Width method and convert msg.Width to uint
Browse files Browse the repository at this point in the history
  • Loading branch information
notjedi committed Sep 3, 2022
1 parent c3d3a8c commit e6e3fd7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 0 additions & 2 deletions styles.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
)

var(
docStyle = lipgloss.NewStyle().Margin(1, 2, 1, 2)

inactiveTab = lipgloss.NewStyle().
Faint(true).
Padding(0, 2)
Expand Down
6 changes: 1 addition & 5 deletions tabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {

switch msg := msg.(type) {
case tea.WindowSizeMsg:
m.Width = msg.Width
m.Width = uint(msg.Width)
// just update width
m.TitleStyle = m.TitleStyle.
Width(msg.Width).
Expand Down Expand Up @@ -100,10 +100,6 @@ func (m *Model) SetTabModels(models []tea.Model) {
m.tabModels = models
}

func (m *Model) Width() uint {
return m.Width
}

func (m *Model) SetWidth(width uint) {
m.Width = width
}
Expand Down

0 comments on commit e6e3fd7

Please sign in to comment.