-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Implement Vertical GUI (Portrait Mode) #2273
Conversation
as a personal suggestion, I would bind KEY_INFOBOX area as you made in Status Screen menu (so centered at the bottom). That means the temp info in the Heat menu (and all the other menus providing infobox) will be centered at the bottom of the screen. |
@digant73 Thank you for your suggestion. Placing the Temperature in the Heat menu (and similars) on the bottom is possible and I agree it would look cleaner but it will put the "back" button in a different location than the main menu (and most other menus). The benefit of the current implementation is, that the back button is always in the same position, regardless of the menu. One way I can imagine to prevent this back button problem is to generally place the back button in the 6th icon (second row, right most icon). But this will only be consistent if there are no menus with more than 6 icons including "back" (except the main menu). I think this could clean up the interface, even in all other menus. This is surely a point worth discussing. |
Fix typo
Fix typo
Add Portrait Mode TFT24
@radry above just a brief review. |
I reworked the UI and also implemented @digant73 suggestion:
How is this? If you like it I will push it to the PR after cleaning up the code as mentioned by @digant73 |
nice ! i like it |
@radry The menus with the infobox area (e.g. Heat, Status Screen etc...) are now OK. Main menu: Move menu: Level menu: Fort the Printing menu, please provide a screenshot (and possibly consider to apply the changes in my first post). Also, the portrait mode is an alternative to the standard mode, so I would convert all the "#ifdef PORTRAIT...#else...#endif" to "#ifndef PORTRAIT...#else...#endif" |
That's already how it is, look at the screenshots.
working on it
The code for "TFT70_V3_0" is also in there with |
@radry I would update the pictures in the main section with the final layouts. |
@radry Nice work., but I am afraid to say that this implementation will be incompatible with the new menu API. Hardcoded menu layouts are being replaced with an easy-to-use grid system for all standard menus in my upcoming PRs. |
@guruathwal An other approach would be to keep the current menu API branch as legacy that receives all bugfixes not related to GUI, while the new menu API is continued as "2.0" version branch. |
@bigtreetech Please let me know what else you require to merge this PR. |
Requirements
Currently vertical GUI is only implemented for TFT24.
Adding all other screens is easy since the base code is all the same but requires an actual screen to test it (which I don't have).
Only screen and controller specific files have to be changed/added.
How to do this is described below.
Compile:
To use TFT24 in portrait mode you need to compile for "BIGTREE_TFT24_V1.1_P" (Default enviroment is set to this in this commit).
Config.ini:
set "rotated_ui" to 2 or 3
Theme/Icons:
logo.bmp must have a portrait resolution (for TFT24 that's 240x320 instead of 320x240). Do not simply rotate it, the logo must still stay the same orientation.
Description
This is a first implementation of a vertical GUI (Portrait Mode).
How is it implemented:
My way of approaching this is as follows:
Treat the vertical orientation as if it's its own screen. That means to use a screen in vertical orientation, it needs to be compiled for portrait mode. It can then only be used in portrait mode. To use landscape mode you just use the regular .bin and reset the settings.
Most code that handles vertical GUI is filtered by
#ifdef PORTRAIT
and thus only compiled when target is a Portrait mode screen (PORTRAIT is defined in Vartiants/pins_TFTxxxx which has its own version for vertical orientation).This keeps the resulting .bin small.
How it looks
UPDATE 06.12.2021
Status Screen
Heat Menu
Main Menu
Move
Level
Printing
List Layout
How to add portrait mode to other screens
Coming Soon
Benefits
Adds vertical GUI
Related Issues
#524
#1830
#1170