FAQ

On Tue, Jun 7, 2016 at 9:38 AM, Andy Brewer wrote:
Basically, GoMobile binaries are always rendered in an 800x800 window. The
window can be resized, but only manually, not through code. Apparently, the
800x800 value is hard coded. Is there a reason for this, or is there an
opportunity for a patch that will allow users to modify the window size so
it can be easily set to common mobile device sizes?
The x/mobile repo is meant for apps that run on mobile devices: phones
and tablets. Unlike desktop apps, mobile apps (whether written in Go
or not) generally don't have a say in what their window size will be,
as they generally run full-screen, and screens have different sizes.
Even Apple devices have different aspect ratios. Accordingly, a good
mobile app's UI should be usable in a range of window sizes, so I am
hesitant to add an API feature that encourages building a
pixel-perfect UI for one specific window size.

I'd consider a patch that changed the hard-coded value to a more
phone-like aspect ratio instead of 1:1. Maybe 4:3 or 5:3 or 3:2 or
16:9 but as you can see there are multiple bike-shedding options and
no single one is obviously 'correct'.

If you must change this for your own workflow, and you're on a Mac,
you want to change the
NSRect rect = NSMakeRect(0, 0, 400, 400);
line in x/mobile/app/darwin_amd64.m. The doubling from 400 to 800 is
done by the OS, because you're presumably on a Retina display.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 9 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJun 6, '16 at 11:51p
activeJun 17, '16 at 10:52p
posts9
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase