1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 12:17:44 +00:00

Userland: Use default initializer instead of an empty string for Buttons

This commit is contained in:
Karol Kosek 2023-02-12 10:37:38 +01:00 committed by Linus Groh
parent d32d4029d3
commit f802920a3a
3 changed files with 3 additions and 4 deletions

View file

@ -16,8 +16,7 @@ class ProcessorParameterToggle : public GUI::CheckBox {
public:
ProcessorParameterToggle(DSP::ProcessorBooleanParameter& parameter)
: CheckBox("")
, m_parameter(parameter)
: m_parameter(parameter)
{
on_checked = [this](auto checked) {
if (m_currently_setting_from_ui)

View file

@ -44,7 +44,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
auto& current_cell_label = top_bar.add<GUI::Label>("");
current_cell_label.set_fixed_width(50);
auto& help_button = top_bar.add<GUI::Button>("");
auto& help_button = top_bar.add<GUI::Button>();
help_button.set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-help.png"sv).release_value_but_fixme_should_propagate_errors());
help_button.set_tooltip("Functions Help");
help_button.set_fixed_size(20, 20);

View file

@ -23,7 +23,7 @@ PromotionDialog::PromotionDialog(ChessWidget& chess_widget)
main_widget->set_layout<GUI::HorizontalBoxLayout>();
for (auto const& type : { Chess::Type::Queen, Chess::Type::Knight, Chess::Type::Rook, Chess::Type::Bishop }) {
auto& button = main_widget->add<GUI::Button>("");
auto& button = main_widget->add<GUI::Button>();
button.set_fixed_height(70);
button.set_icon(chess_widget.get_piece_graphic({ chess_widget.board().turn(), type }));
button.on_click = [this, type](auto) {