mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:47:35 +00:00
Serendipity: Make main window resizable (#5675)
If it is not resizable, the "What's new" page may be hard to read.
This commit is contained in:
parent
7f9f916470
commit
a6f957a36b
2 changed files with 16 additions and 14 deletions
|
@ -20,14 +20,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
fixed_height: 160
|
min_height: 160
|
||||||
layout: @GUI::HorizontalBoxLayout {
|
layout: @GUI::HorizontalBoxLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Frame {
|
@GUI::Frame {
|
||||||
name: "tip_frame"
|
name: "tip_frame"
|
||||||
fixed_width: 340
|
min_width: 340
|
||||||
fixed_height: 160
|
min_height: 160
|
||||||
layout: @GUI::HorizontalBoxLayout {
|
layout: @GUI::HorizontalBoxLayout {
|
||||||
margins: [0, 0, 16, 0]
|
margins: [0, 0, 16, 0]
|
||||||
}
|
}
|
||||||
|
@ -67,46 +67,48 @@
|
||||||
|
|
||||||
@Web::OutOfProcessWebView {
|
@Web::OutOfProcessWebView {
|
||||||
name: "web_view"
|
name: "web_view"
|
||||||
fixed_width: 340
|
min_width: 340
|
||||||
fixed_height: 160
|
min_height: 160
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
|
fixed_width: 5
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
name: "navigation_column"
|
name: "navigation_column"
|
||||||
fixed_width: 120
|
fixed_width: 120
|
||||||
fixed_height: 160
|
min_height: 160
|
||||||
layout: @GUI::VerticalBoxLayout {
|
layout: @GUI::VerticalBoxLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Button {
|
@GUI::Button {
|
||||||
name: "new_button"
|
name: "new_button"
|
||||||
text: "What's New"
|
text: "What's New"
|
||||||
fixed_width: 115
|
min_width: 115
|
||||||
fixed_height: 24
|
min_height: 24
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Button {
|
@GUI::Button {
|
||||||
name: "help_button"
|
name: "help_button"
|
||||||
text: "Help Contents"
|
text: "Help Contents"
|
||||||
fixed_width: 115
|
min_width: 115
|
||||||
fixed_height: 24
|
min_height: 24
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Button {
|
@GUI::Button {
|
||||||
name: "next_button"
|
name: "next_button"
|
||||||
text: "Next Tip"
|
text: "Next Tip"
|
||||||
fixed_width: 115
|
min_width: 115
|
||||||
fixed_height: 24
|
min_height: 24
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
|
fixed_height: 5
|
||||||
}
|
}
|
||||||
|
|
||||||
@GUI::Widget {
|
@GUI::Widget {
|
||||||
|
|
|
@ -63,11 +63,11 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
auto window = GUI::Window::construct();
|
auto window = GUI::Window::construct();
|
||||||
window->resize(480, 250);
|
window->set_minimum_size(480, 250);
|
||||||
window->center_on_screen();
|
window->center_on_screen();
|
||||||
|
|
||||||
window->set_title("Welcome");
|
window->set_title("Welcome");
|
||||||
window->set_resizable(false);
|
window->set_resizable(true);
|
||||||
window->set_window_type(GUI::WindowType::ToolWindow);
|
window->set_window_type(GUI::WindowType::ToolWindow);
|
||||||
window->set_main_widget<SerendipityWidget>();
|
window->set_main_widget<SerendipityWidget>();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue