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
Notes: sideshowbarker 2024-07-19 00:00:21 +09:00

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 })) {
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) {
m_selected_piece = type;