Skip to content

Commit

Permalink
Don't set all top bar buttons to checkable
Browse files Browse the repository at this point in the history
Some of them can only be clicked (e.g. End Turn).

See longturn#940.
  • Loading branch information
lmoureaux committed Mar 25, 2022
1 parent bbcc7f8 commit 71e3038
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/gui-qt/page_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,23 @@ pageGame::pageGame(QWidget *parent)
sw_cities->setIcon(fcIcons::instance()->getIcon(QStringLiteral("cities")));
sw_cities->setWheelUp(center_next_enemy_city);
sw_cities->setWheelDown(center_next_player_city);
sw_cities->setCheckable(true);
sw_diplo = new top_bar_widget(
_("Nations"), QStringLiteral("PLR"), popup_players_dialog);
sw_diplo->setIcon(fcIcons::instance()->getIcon(QStringLiteral("nations")));
sw_diplo->setWheelUp(center_next_player_capital);
sw_diplo->setWheelDown(key_center_capital);
sw_diplo->setCheckable(true);
sw_science = new top_bar_widget(
_("Research"), QStringLiteral("SCI"), top_bar_left_click_science);
sw_science->setIcon(
fcIcons::instance()->getIcon(QStringLiteral("research")));
sw_science->setCheckable(true);
sw_economy = new top_bar_widget(
_("Economy"), QStringLiteral("ECO"), economy_report_dialog_popup);
sw_economy->setIcon(
fcIcons::instance()->getIcon(QStringLiteral("economy")));
sw_economy->setCheckable(true);
sw_endturn = new top_bar_widget(
_("Turn Done"), QLatin1String(""), top_bar_finish_turn);
sw_endturn->setIcon(
Expand Down
1 change: 0 additions & 1 deletion client/gui-qt/top_bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ top_bar_widget::top_bar_widget(const QString &label, const QString &pg,
setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setContextMenuPolicy(Qt::CustomContextMenu);
setCheckable(true);

timer = new QTimer;
timer->setSingleShot(false);
Expand Down

0 comments on commit 71e3038

Please sign in to comment.