openstreetmap / merkaartor

Home of Merkaartor, an openstreetmap mapping program.
http://merkaartor.be/
Other
290 stars 79 forks source link

Minimum window size (1002 pixels) is too large for smaller screens (800 pixels). #297

Open dreirund opened 2 months ago

dreirund commented 2 months ago

I use Merkaartor release version 0.19.0 on Artix GNU/Linux, installed from the Arch Linux repositories.

The minimum window size (on my system) is 736x1002 pixels, which in height is more than my laptop's display resolution (1280x800).

I cannot resize the window to fit on my screen.

So I hereby request to support also smaller screens, ideally VGA (640x480), or, if really not possible, 800x600 I think is the minimum that should be supported nowadays, to also suit small portable Linux devices.

Here is the output of xwininfo for the merkaartor window resized to smallest possible size:

xwininfo: Window id: 0x5200011 "untitled - Merkaartor v0.19.0-64bit"

  Absolute upper-left X:  134
  Absolute upper-left Y:  -37
  Relative upper-left X:  1
  Relative upper-left Y:  11
  Width: 736
  Height: 1002
  Depth: 24
  Visual: 0x415
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x5200005 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +134+-37  -410+-37  -410--165  +134--165
  -geometry 736x1002+134+-37

Regards!

Krakonos commented 3 days ago

This is caused by the status bar. The minimum window width depends on the text length there. Hiding viewport coordinates here would fix the issue, not sure if it's acceptable? It could be made into a setting. There are a couple of other misc items that can be made optional.

dreirund commented 3 days ago

This is caused by the status bar. The minimum window width depends on the text length there.

This is unexpected to the user.

The status bar text should then be truncated (and indicated with "…" that it is been truncated), with optional scroll arrows or a mouseover that shows the whole status bar in multiline.

Status bar content should not restrict window shrinkage.

Krakonos commented 2 days ago

Agreed. Unfortunately, the QStatusBar component isn't too flexible. I did find a way to somewhat shrink the window. I can now get 490x618 or so (depends on the exact coordinates, fonts etc.), I find this sufficient. Check PR #303 if it works for your use-case. Also if you don't mind me asking, what device are you trying to run on? Most modern devices have more resolution.

image