-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Add portrait support for TS35 #25629
Conversation
doesn't TFT_ROTATE_90 already do this? |
@ellensp ellensp
Upd.: added an example of displaying the screen in the description of the PR. |
On that topic, from a quick scan it looks like only |
I don't quite understand why binding to specific pixel values was originally chosen instead of binding to specific areas of the screen. However, I know - it happened historically :) Now it is obvious that the files |
I see you amswered your own question. We get these implementations from the vendors who are first to use these devices in their machines, and they tend to be a little myopic, only writing the code they need in the immediate moment. It then falls on the community to generalize and extend their code to other compatible devices. We have rough APIs like MarlinUI and ExtUI that are meant to be extended as new needs arise, but most coders try to stay within the lines rather than extend and improve those APIs. I would encourage all contributors to jump in and rework any APIs that are insufficient for today's needs, being mindful that we still want those APIs to decompose into something tiny when built with minimal options so they can still run on smaller AVR devices. |
And speed and size, we don't have any resources to work with abstract things like "area of screen". Probably best thing we can do is make something akin to css style sheets with preprocessor defines for different resolutions and orientations, then use these values in actual dwrawing routines. |
Each type of screen requires a different approach. Fluid layout is useful when you have a window that can be resized at runtime, but for Marlin we just need to statically generate code at build-time that responds to configuration settings and uses the available space efficiently. Where we have a generous amount of space (BIQU BX) we can display larger fonts and more information. It's just a matter of finding the time to build out each screen layout. And, it will help to keep combining the shared code so we can focus on just the parts that need individual customization. |
This is why i think css-like stuff. I think jmz at some point just went "screw it i just finish this easy way", this is why it's all copypaste code in color_ui. |
All these "screen areas" are calculated at compile time. At least I tried to minimize runtime calculations (thanks for macro hell). It's just moving away from the pixel to a more abstract relative value. |
de391db
to
0f34163
Compare
Hi @uncellon , |
Hi! |
Is there any design layout? Like Figma, for example? I'm looking at this "move axis" screen and it seems a bit chaotic. If there's a standard here, I'll just apply the layout. |
@jmz52 may have something, but you mostly just have to use existing code/layouts (you should also be able to test using the Simulator for faster development, but I’m not sure how well it’ll handle rotated UIs). |
Description
This PR adds base portrait orientation support for MKS TS35 display (in TFT_COLOR_UI interface).
Using the TS35 display in portrait orientation (rotated 90/270 degrees in the config file) now looks like this:
I reworked the current X and Y offsets of the horizontal layout and added support for vertical layout with and without touchscreen support.
Below I have attached an archive with examples of how the interface looks now.
Examples.zip
Requirements
Benefits
Configurations
Configuration.zip
Related Issues