mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
Demos: WidgetGallery, Add MessageBox question icon option
This commit is contained in:
parent
25227ee284
commit
63539d655c
Notes:
sideshowbarker
2024-07-19 06:19:51 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/63539d655ce Pull-request: https://github.com/SerenityOS/serenity/pull/2305
1 changed files with 5 additions and 1 deletions
|
@ -161,7 +161,7 @@ int main(int argc, char** argv)
|
|||
icon_group_box.set_layout<GUI::VerticalBoxLayout>();
|
||||
icon_group_box.layout()->set_margins({ 5, 15, 5, 5 });
|
||||
icon_group_box.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||
icon_group_box.set_preferred_size(0, 120);
|
||||
icon_group_box.set_preferred_size(0, 150);
|
||||
|
||||
auto& radio_none = icon_group_box.add<GUI::RadioButton>("None");
|
||||
radio_none.on_checked = [&](bool) {
|
||||
|
@ -171,6 +171,10 @@ int main(int argc, char** argv)
|
|||
radio_information.on_checked = [&](bool) {
|
||||
msg_box_type = GUI::MessageBox::Type::Information;
|
||||
};
|
||||
auto& question_information = icon_group_box.add<GUI::RadioButton>("Question");
|
||||
question_information.on_checked = [&](bool) {
|
||||
msg_box_type = GUI::MessageBox::Type::Question;
|
||||
};
|
||||
auto& radio_warning = icon_group_box.add<GUI::RadioButton>("Warning");
|
||||
radio_warning.on_checked = [&](bool) {
|
||||
msg_box_type = GUI::MessageBox::Type::Warning;
|
||||
|
|
Loading…
Add table
Reference in a new issue