mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix(tui): splash: re-render logo when screen size changes
This commit is contained in:
@@ -133,10 +133,11 @@ func (s *splashCmp) Init() tea.Cmd {
|
||||
|
||||
// SetSize implements SplashPage.
|
||||
func (s *splashCmp) SetSize(width int, height int) tea.Cmd {
|
||||
wasSmallScreen := s.isSmallScreen()
|
||||
rerenderLogo := width != s.width
|
||||
s.height = height
|
||||
s.width = width
|
||||
if rerenderLogo {
|
||||
if rerenderLogo || wasSmallScreen != s.isSmallScreen() {
|
||||
s.logoRendered = s.logoBlock()
|
||||
}
|
||||
// remove padding, logo height, gap, title space
|
||||
|
||||
Reference in New Issue
Block a user