Project

General

Profile

Layouting for mobile and desktop

Added by Kasper Loopstra over 6 years ago

I'm trying to make a fairly simple Wt app (a few buttons, and a treetable) work for both mobile and desktop clients. Right now, it does work, but the mobile version loads with a really, really large viewport. That means that the user has to zoom in a lot before text is anywhere near readable, and touch buttons are really hard to hit. It looks like it's ignoring the fact that a pixel on a (modern) smartphone is a lot smaller than one on a desktop.

Anything I've done with BoxLayouts hasn't really helped (didn't change the initial zoom issue at all). I'm using the Bootstrap v3 theme and Wt 3.7. I've also tried resetting the viewport meta-header, but that gives me "WApplication: WApplication::addMetaHeader() with no effect", wherever I try to change the header.

If there is a way to achieve a layout that is readable both on mobile and on desktop without writing a lot of CSS that would be really nice, but any help getting a single layout working properly would be very welcome. What is the best approach to get this working?


Replies (2)

RE: Layouting for mobile and desktop - Added by Stefan Bn almost 4 years ago

Currently I'm facing the same issue at the current stage of my Wt development.

What is the Wt-best-practice to achieve well-sized widgets on mobile devices using responsive Bootstrap v3 in Wt?

Thanks!

Stefan

Just to keep all related threads to this subject together:

https://redmine.webtoolkit.eu/boards/1/topics/1772?r=1776#message-1776

https://redmine.webtoolkit.eu/issues/348

RE: Layouting for mobile and desktop - Added by Stefan Bn over 3 years ago

Answer to myself and anyone who might need it:

In your wt_config.xml set this option to true:

<progressive-bootstrap>true</progressive-bootstrap>

With that I get perfect results for mobile and desktop scenarios all together!

    (1-2/2)