Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #854005

Gtk city dialog popups use variable-width font (because of nonexistent style "city_info_label")

Added by Jacob Nevins almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
gui-gtk-3
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The explanatory popups on the city dialog showing e.g. where trade points come from use fixed-width formatting, but in the Gtk clients, they are displayed with a variable-pitch font, so they end up poorly aligned.

This is because they use a nonexistent style "city_info_label", set with gtk_widget_set_name(label, "city_info_label"). In general, these widgets names are joined up with the font option 'target' names in options.c, via the style definition in gui_update_font(). But, there is no option with the target name "city_info_label".

I'm inclined to just set it to "city_label", the same fixed-width style used for the text on which you click to get these popups. Screenshots show before/after of Gtk3 client (Gtk2 and Gtk3.22 are similar).

(The Happiness tab popups have a similar issue, with nonexistent style name "city_happiness_label". But since the happiness popups don't rely on fixed-width formatting, I'm inclined not to change them to a fixed-width font. Perhaps we can just remove the style name, but I've left it for now, with a comment.)

gtk2_pre.png (162 KB) gtk2_pre.png gui-gtk2, S2_6, current behaviour Jacob Nevins, 2019-12-27 07:40 PM
gtk2_post.png (99.8 KB) gtk2_post.png gui-gtk2, S2_6, after patch Jacob Nevins, 2019-12-27 07:41 PM
m-gtk-citydlg-popup-style.patch (3.87 KB) m-gtk-citydlg-popup-style.patch Jacob Nevins, 2019-12-27 07:56 PM
30-26-gtk-citydlg-popup-style.patch (3.9 KB) 30-26-gtk-citydlg-popup-style.patch Jacob Nevins, 2019-12-27 07:56 PM
250
250

Related issues

Related to Freeciv - Bug #857341: Use fixed-width font for city dialog tooltipsClosed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Jacob Nevins almost 2 years ago

Screenshots show before/after of Gtk3 client (Gtk2 and Gtk3.22 are similar).

Er, they actually show the Gtk2 client. But Gtk3.0/3.22 are similar.

#3 Updated by Jacob Nevins almost 2 years ago

  • Status changed from Resolved to Closed

#4 Updated by Jacob Nevins over 1 year ago

  • Related to Bug #857341: Use fixed-width font for city dialog tooltips added

Also available in: Atom PDF