Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use the capital for the tooltip of the city top bar button #1280

Merged
merged 2 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions client/page_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ void pageGame::updateSidebarTooltips()

if (client.conn.playing && !client_is_global_observer()
&& C_S_RUNNING == client_state()) {
sw_science->setTooltip(science_dialog_text());
sw_science->setToolTip(science_dialog_text());
str = QString(nation_plural_for_player(client_player()));
str = str + '\n' + get_info_label_text(false);
sw_map->setTooltip(str);
sw_map->setToolTip(str);
str = QString(_("Tax: %1% Science: %2% Luxury: %3%\n"))
.arg(client.conn.playing->economic.tax)
.arg(client.conn.playing->economic.luxury)
Expand All @@ -311,14 +311,14 @@ void pageGame::updateSidebarTooltips()
&tax);
fc_snprintf(buf, sizeof(buf), _("Income: %d Total Costs: %d"), tax,
building_total + unit_total);
sw_economy->setTooltip(buf);
sw_economy->setToolTip(buf);
if (player_primary_capital(client_player())) {
sw_cities->setTooltip(
text_happiness_cities(player_primary_capital(client_player())));
auto cities = city_list_size(client_player()->cities);
sw_cities->setToolTip(QString(_("Cities: %1 total")).arg(cities));
}
} else {
sw_science->hide();
sw_map->setTooltip(QLatin1String(""));
sw_map->setToolTip(QLatin1String(""));
sw_economy->hide();
}
sw_indicators->setToolTip(get_info_label_text_popup());
Expand Down
8 changes: 0 additions & 8 deletions client/top_bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,6 @@ top_bar_widget::~top_bar_widget() { delete timer; }
*/
void top_bar_widget::setCustomLabels(const QString &l) { setText(l); }

/**
Sets tooltip for sidewidget
*/
void top_bar_widget::setTooltip(const QString &tooltip)
{
setToolTip(tooltip);
}

/**
* Paint event for top bar widget
*/
Expand Down
1 change: 0 additions & 1 deletion client/top_bar.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class top_bar_widget : public QToolButton {
void setLabel(const QString &str);
void setLeftClick(pfcn func);
void setRightClick(pfcn func);
void setTooltip(const QString &tooltip);
void setWheelDown(pfcn func);
void setWheelUp(pfcn func);

Expand Down