Simple change of layout #502
Conversation
…hanged from ".constraints([Constraint::Percentage(90), Constraint::Percentage(10)].as_ref())" to ".constraints([Constraint::Percentage(65), Constraint::Percentage(35)].as_ref())" to better suit the smaller space. fn draw_input_and_help_box moved to fn_draw_user_block
|
@Rigellute No, the new layout I propose will display always, no matter the size of the screen. |
|
So sorry for the late response @mucinoab. What I mean to say is that we should pick some breakpoint at which your new layout kicks in. For example, we might say on larger screens (width = 800px) your new layout is active. And the old layout is active for smaller screens. Hope this makes sense? If you don't know what I mean, I could merge this in to a side branch and have a look myself? |
|
@Rigellute |
|
@Rigellute I didn't find a nice way of doing the dynamic change, all my tries were mess, buggy or didn't work at all. :( |
The new layout kicks in is the width is bigger than 150 (defined as SMALL_TERMINAL_WIDTH
|
I added responsiveness and opened a pull request on the fork of @mucinoab . The point of change is defined in the |
Add responsiveness to new layout change
|
@all-contributors please add @mucinoab and @OrangeFran for code |
|
I've put up a pull request to add @mucinoab! 🎉 |
|
@all-contributors please add @OrangeFran for code |
|
I've put up a pull request to add @OrangeFran! 🎉 |
|
@all-contributors please add @OrangeFran for code |
|
I've put up a pull request to add @OrangeFran! 🎉 |
* Change of layout. Constraints of size in fn draw_input_and_help_box changed from ".constraints([Constraint::Percentage(90), Constraint::Percentage(10)].as_ref())" to ".constraints([Constraint::Percentage(65), Constraint::Percentage(35)].as_ref())" to better suit the smaller space. fn draw_input_and_help_box moved to fn_draw_user_block * Add responsiveness to new layout change The new layout kicks in is the width is bigger than 150 (defined as SMALL_TERMINAL_WIDTH * Fix formatting. Co-authored-by: Finn Hediger <finn.hediger@thurweb.ch>
* Change of layout. Constraints of size in fn draw_input_and_help_box changed from ".constraints([Constraint::Percentage(90), Constraint::Percentage(10)].as_ref())" to ".constraints([Constraint::Percentage(65), Constraint::Percentage(35)].as_ref())" to better suit the smaller space. fn draw_input_and_help_box moved to fn_draw_user_block * Add responsiveness to new layout change The new layout kicks in is the width is bigger than 150 (defined as SMALL_TERMINAL_WIDTH * Fix formatting. Co-authored-by: Finn Hediger <finn.hediger@thurweb.ch>
draw_input_and_help_boxmoved todraw_user_blockso the search and help bar is reduced and the main panel is adjusted to fill that space. The constraints of size of both functions were tweaked as well to better fit the new layout.I feel this new layout does a better job at taking advantage of space as the strings we search are usually not that long and after some use of the client the help bar becomes more or less irrelevant.
Here some screenshots
Fullscreen in a 1080p monitor

Halfscreen in a 1080p monitor

Current layout for comparison
