diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-11-07 08:57:59 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2019-11-08 07:04:43 +0100 |
commit | c17a5cec1901dd23f4c39ec2ae47a060fbb06895 (patch) | |
tree | f812b588124121f9938ca8a8d2d991b6f2f9a6ae /src/gui/kernel/qplatforminputcontextfactory.cpp | |
parent | 3e529369eb16704aa0d601a7f4b8e490dc8b772c (diff) |
Android: Implement MaximizeUsingFullscreenGeometryHint
This flag tells the app to use as much of the screen as possible
while still keeping system UI visible, and can be supported on Android
by using translucent system UI, similar to iOS.
What this does:
1. It changes the current fullscreen/not-fullscreen logic to
allow three states: fullscreen, fullscreen with translucent
decorations and not-fullscreen.
2. In order for it to work, we have to send the actual
screen geometry and available geometry, at least in the case
where the user needs to know the available geometry to
know the safe area of the window. So we get the real screen
metrics and pass these to the QPA plugin (API level 17, so
we can do that now that the minimum version is 21.)
3. Note that getting the insets and calculating the useable
area does not work for non-fullscreen windows, since Android
is quite inconsistent in this respect. So in this case we
just use the window size and origin of 0,0 for the available
geometry.
4. Since we are touching this code anyway, this patch also tries to use
more consistent wording (calling it "available geometry" everywhere
instead of desktop geometry in some places and just geometry in
others, etc.)
[ChangeLog][Android] Qt::MaximizeUsingFullscreenGeometryHint window
flag is now supported, and will make the window fullscreen, but keep
the system UI on-screen, with a translucent background color.
Fixes: QTBUG-74202
Change-Id: I7a59a6c6fb51ebbdb86e7149e794726e67001279
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/gui/kernel/qplatforminputcontextfactory.cpp')
0 files changed, 0 insertions, 0 deletions