Project

General

Profile

Bug #685277

City full bar misdrawn with non-default zoom level

Added by Jacob Nevins 4 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
gui-gtk-3
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The attached screenshot illustrates the most obvious glitch I saw while playing some turns with zoom enabled: when the "city full bar" is enabled, the lines are drawn in the wrong place (which moves as the map is scrolled in a pantograph-like fashion), the darkened box looks too big, etc. (If "View > City Full Bar" is disabled, the alternative display looks more plausible.

This is --with-zoom, "freeciv-gtk3 --tiles trident -- --zoom 2.0". S2_6 commit:c8cad4d8dd.

gtk3_full_citybar_zoom.png (92.4 KB) gtk3_full_citybar_zoom.png Jacob Nevins, 2017-07-23 10:51 AM
m-zoom-full-citybar.patch (15.5 KB) m-zoom-full-citybar.patch Jacob Nevins, 2017-09-10 11:52 AM
30-26-zoom-full-citybar.patch (13 KB) 30-26-zoom-full-citybar.patch Jacob Nevins, 2017-09-10 11:52 AM

Related issues

Related to Freeciv - Bug #696514: canvas_put_line takes unzoomed coordinates, unlike other canvas_put_* functionsNew

History

#1 Updated by Jacob Nevins 2 months ago

  • Status changed from New to In Progress
  • Assignee set to Jacob Nevins

#2 Updated by Jacob Nevins 2 months ago

Attached patch works for me, in Gtk3 with x2 and with non-default.
It doesn't cause regressions in Qt/Gtk2 with and without scaling, or in SDL2 (no zoom or scaling).

It turns out that canvas_put_line() has different semantics wrt zoom than other canvas_put functions. I wasn't quite brave enough to try fixing it now, so I just left some comments, but it probably should be fixed.

I audited/tested other mapview-related uses of canvas_put_line (trade routes, goto lines, link marks) for zoom and found no trouble.

#3 Updated by Jacob Nevins 2 months ago

  • Related to Bug #696514: canvas_put_line takes unzoomed coordinates, unlike other canvas_put_* functions added

#4 Updated by Jacob Nevins 2 months ago

  • Status changed from Resolved to Approved

#5 Updated by Jacob Nevins 2 months ago

  • Status changed from Approved to Closed

Also available in: Atom PDF