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

Chess: Fix button size in the piece promotion dialog

Fixes #4865.
This commit is contained in:
Andreas Kling 2021-01-09 15:05:31 +01:00
parent 0a3b834346
commit cf750b5d3f

View file

@ -44,6 +44,7 @@ PromotionDialog::PromotionDialog(ChessWidget& chess_widget)
for (auto& type : Vector({ Chess::Type::Queen, Chess::Type::Knight, Chess::Type::Rook, Chess::Type::Bishop })) { for (auto& type : Vector({ 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.set_icon(chess_widget.get_piece_graphic({ chess_widget.board().turn(), type }));
button.on_click = [this, type](auto) { button.on_click = [this, type](auto) {
m_selected_piece = type; m_selected_piece = type;