mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +00:00
Applications+DevTools: Remove fixed sizes from Splitters
And adjust some GML properties. Since a808cfa
, splitters grow
opportunistically. Setting them to fixed sizes now quite literally
fixes them in place. Fixes immovable splitters missed in the
aforementioned commit.
This commit is contained in:
parent
6cedb1b9d9
commit
cce9172cd4
8 changed files with 18 additions and 14 deletions
|
@ -14,6 +14,8 @@
|
|||
}
|
||||
|
||||
@GUI::HorizontalSplitter {
|
||||
opportunistic_resizee: "First"
|
||||
|
||||
@HexEditor::HexEditor {
|
||||
name: "editor"
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@GUI::HorizontalSplitter {
|
||||
@GUI::TreeView {
|
||||
name: "mailbox_list"
|
||||
fixed_width: 250
|
||||
preferred_width: 250
|
||||
}
|
||||
|
||||
@GUI::VerticalSplitter {
|
||||
|
|
|
@ -28,9 +28,11 @@ PDFViewerWidget::PDFViewerWidget()
|
|||
auto& toolbar = toolbar_container.add<GUI::Toolbar>();
|
||||
|
||||
auto& splitter = add<GUI::HorizontalSplitter>();
|
||||
splitter.layout()->set_spacing(4);
|
||||
|
||||
m_sidebar = splitter.add<SidebarWidget>();
|
||||
m_sidebar->set_fixed_width(0);
|
||||
m_sidebar->set_preferred_width(200);
|
||||
m_sidebar->set_visible(false);
|
||||
|
||||
m_viewer = splitter.add<PDFViewer>();
|
||||
m_viewer->on_page_change = [&](auto new_page) {
|
||||
|
@ -73,7 +75,7 @@ void PDFViewerWidget::initialize_toolbar(GUI::Toolbar& toolbar)
|
|||
auto open_outline_action = GUI::Action::create(
|
||||
"Toggle &Sidebar", { Mod_Ctrl, Key_S }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/sidebar.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) {
|
||||
m_sidebar_open = !m_sidebar_open;
|
||||
m_sidebar->set_fixed_width(m_sidebar_open ? 200 : 0);
|
||||
m_sidebar->set_visible(m_sidebar_open ? true : false);
|
||||
},
|
||||
nullptr);
|
||||
open_outline_action->set_enabled(false);
|
||||
|
@ -214,11 +216,11 @@ void PDFViewerWidget::open_file(Core::File& file)
|
|||
if (document->outline()) {
|
||||
auto outline = document->outline();
|
||||
m_sidebar->set_outline(outline.release_nonnull());
|
||||
m_sidebar->set_fixed_width(200);
|
||||
m_sidebar->set_visible(true);
|
||||
m_sidebar_open = true;
|
||||
} else {
|
||||
m_sidebar->set_outline({});
|
||||
m_sidebar->set_fixed_width(0);
|
||||
m_sidebar->set_visible(false);
|
||||
m_sidebar_open = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ SoundPlayerWidgetAdvancedView::SoundPlayerWidgetAdvancedView(GUI::Window& window
|
|||
|
||||
m_playlist_widget = PlaylistWidget::construct();
|
||||
m_playlist_widget->set_data_model(playlist().model());
|
||||
m_playlist_widget->set_fixed_width(150);
|
||||
m_playlist_widget->set_preferred_width(150);
|
||||
|
||||
m_player_view->set_layout<GUI::VerticalBoxLayout>();
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
|
|||
|
||||
auto& top_bar = container.add<GUI::Frame>();
|
||||
top_bar.set_layout<GUI::HorizontalBoxLayout>().set_spacing(1);
|
||||
top_bar.set_fixed_height(26);
|
||||
top_bar.set_preferred_height(26);
|
||||
auto& current_cell_label = top_bar.add<GUI::Label>("");
|
||||
current_cell_label.set_fixed_width(50);
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
}
|
||||
|
||||
@GUI::HorizontalSplitter {
|
||||
fixed_resizee: "Second"
|
||||
opportunistic_resizee: "First"
|
||||
|
||||
@GUI::TextEditor {
|
||||
name: "editor"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue