mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:07:35 +00:00
Taskbar: Make quicklaunch buttons larger and reduce spacing
The end result is almost identical, but now it's a little easier to hit the buttons with the cursor. :^)
This commit is contained in:
parent
e5ddcadd3c
commit
3ba6dceee3
1 changed files with 5 additions and 5 deletions
|
@ -96,7 +96,7 @@ void TaskbarWindow::create_quick_launch_bar()
|
||||||
auto& quick_launch_bar = main_widget()->add<GUI::Frame>();
|
auto& quick_launch_bar = main_widget()->add<GUI::Frame>();
|
||||||
quick_launch_bar.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
|
quick_launch_bar.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
|
||||||
quick_launch_bar.set_layout<GUI::HorizontalBoxLayout>();
|
quick_launch_bar.set_layout<GUI::HorizontalBoxLayout>();
|
||||||
quick_launch_bar.layout()->set_spacing(3);
|
quick_launch_bar.layout()->set_spacing(0);
|
||||||
quick_launch_bar.layout()->set_margins({ 3, 0, 3, 0 });
|
quick_launch_bar.layout()->set_margins({ 3, 0, 3, 0 });
|
||||||
quick_launch_bar.set_frame_thickness(0);
|
quick_launch_bar.set_frame_thickness(0);
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ void TaskbarWindow::create_quick_launch_bar()
|
||||||
|
|
||||||
auto& button = quick_launch_bar.add<GUI::Button>();
|
auto& button = quick_launch_bar.add<GUI::Button>();
|
||||||
button.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
|
button.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed);
|
||||||
button.set_preferred_size(22, 22);
|
button.set_preferred_size(24, 24);
|
||||||
button.set_button_style(Gfx::ButtonStyle::CoolBar);
|
button.set_button_style(Gfx::ButtonStyle::CoolBar);
|
||||||
|
|
||||||
button.set_icon(Gfx::Bitmap::load_from_file(app_icon_path));
|
button.set_icon(Gfx::Bitmap::load_from_file(app_icon_path));
|
||||||
|
@ -142,12 +142,12 @@ void TaskbarWindow::create_quick_launch_bar()
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!first)
|
if (!first)
|
||||||
total_width += 3;
|
total_width += quick_launch_bar.layout()->spacing();
|
||||||
first = false;
|
first = false;
|
||||||
total_width += 22;
|
total_width += button.preferred_width();
|
||||||
}
|
}
|
||||||
|
|
||||||
quick_launch_bar.set_preferred_size(total_width, 22);
|
quick_launch_bar.set_preferred_size(total_width, 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TaskbarWindow::on_screen_rect_change(const Gfx::IntRect& rect)
|
void TaskbarWindow::on_screen_rect_change(const Gfx::IntRect& rect)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue