Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nosq] Android insets API for the ContentDB dialog #15247

Closed
wants to merge 3 commits into from

Conversation

grorp
Copy link
Member

@grorp grorp commented Oct 7, 2024

As discussed in #14510, this PR replaces the hardcoded extra padding in the ContentDB dialog on Android, which may waste valuable screen space depending on your device, with an API to retrieve display inset values

To do

This PR is a Ready for Review.

(I wrote this code back in May)

How to test

ContentDB dialog on desktop => should look the same as before
ContentDB dialog on Android => should respect the camera cutout, and should update in real time when you turn the screen upside-down

The same should apply for /testfullscreenfs in Devtest.

@grorp grorp added @ Script API Feature ✨ PRs that add or enhance a feature @ Mainmenu UI/UX labels Oct 7, 2024

#include "clientdynamicinfo.h"

void push_window_info(lua_State *L, const ClientDynamicInfo &info);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in its own file because I didn't want to introduce more code duplication, but wasn't sure where to put it

@@ -656,7 +669,7 @@ function contentdb.get_formspec_size()

-- Minimum formspec size
local min_x = 15.5
local min_y = 10
local min_y = 9
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was necessary to get a good grid layout on my phone again ¯\(ツ)

@grorp
Copy link
Member Author

grorp commented Oct 16, 2024

Closing since low priority at this time, the workaround is good enough for now.

@grorp grorp closed this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants