1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

LibVT: Make TerminalWidget's automatic size policy updates optional

When embedding a TerminalWidget, you might not want it to automatically
update its own size policy based on the exact terminal buffer size.

This behavior is now passed as a flag to the TerminalWidget constructor
which makes it behave nicely both inside HackStudio and in Terminal.
This commit is contained in:
Andreas Kling 2019-10-21 20:28:30 +02:00
parent 43ccb28852
commit da0958a882
4 changed files with 10 additions and 6 deletions

View file

@ -162,7 +162,7 @@ int main(int argc, char** argv)
window->set_double_buffering_enabled(false);
RefPtr<CConfigFile> config = CConfigFile::get_for_app("Terminal");
auto terminal = TerminalWidget::construct(ptm_fd, config);
auto terminal = TerminalWidget::construct(ptm_fd, true, config);
window->set_main_widget(terminal);
window->move_to(300, 300);
terminal->apply_size_increments_to_window(*window);