Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatusBar disappears on resize (smaller) #357

Closed
tig opened this issue Apr 13, 2020 · 6 comments · Fixed by #685
Closed

StatusBar disappears on resize (smaller) #357

tig opened this issue Apr 13, 2020 · 6 comments · Fixed by #685
Labels

Comments

@tig
Copy link
Collaborator

tig commented Apr 13, 2020

Loving the new StatusBar.

However, on-resize, if the console is made smaller (not if made bigger), it disappears.

image

@BDisp
Copy link
Collaborator

BDisp commented Apr 13, 2020

@tig I would love to do that. I have already tried it, but if you check in issue #335 I have already questioned is there any way to get the top and bottom of the window according to the size and position of the scroll bar.

@BDisp
Copy link
Collaborator

BDisp commented Apr 13, 2020

@tig Now I am noticing that the vertical frame is not being well designed in your video. It must be a limitation of PowerShell.

@tig
Copy link
Collaborator Author

tig commented Apr 13, 2020

@tig Now I am noticing that the vertical frame is not being well designed in your video. It must be a limitation of PowerShell.

I think this is an issue with gui.cs on Windows Terminal. See #332

@tig
Copy link
Collaborator Author

tig commented Apr 13, 2020

This seems to work:

		public StatusBar(StatusItem [] items) : base()
		{
			X = 0;
			Y = Application.Driver.Rows - 1; // TODO: using internals of Application
			Width = Dim.Fill ();
			Height = 1;
			Items = items;
			CanFocus = false;
			ColorScheme = Colors.Menu;

			Driver.SetTerminalResized (new Action(() => {
				Y = Driver.Rows - 1;
				Redraw (Frame);
			}));
		}

@tig
Copy link
Collaborator Author

tig commented May 21, 2020

Still does not work in Windows Terminal, cmd.exe, or ConEmu.

https://i.imgur.com/W6CKJdH.png

@tig tig added the bug label May 21, 2020
@BDisp
Copy link
Collaborator

BDisp commented May 21, 2020

Because WindowsDriver don't trigger the buffer event changed on the vertical shrink resizing, there is no way to caught that to resize the buffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants