-
Notifications
You must be signed in to change notification settings - Fork 96
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
fix: DisplayRuntime window doesn't use width set by display properties #2387
Conversation
One thing I'm wondering @kasemir is if the dimensions should be bound to a Property on the runtime instance...But as I thought about it, the window dimensions are set when it is undocked so I don't imagine there's much need for it? As it already works, you need to refresh the display anyway when you make any changes to it in the Editor. So, I am guessing fetching them once is sufficient here. |
For the most part, that looks great! You used The detached display will now open with a configurable size, but still in a pretty random location. |
I think that's fine as it is. Set when pane is created and then leave it. |
Yep, missed it in that one file. Turns out IntelliJ has yet another exception specifically for java.awt and a few other libraries. I nuked em, but forgot to check the other files. That said, I'll use Dimension2D instead thank you! |
Wait, @kasemir using javafx.geometry.Dimension2D would introduce a dependency on javafx-graphics in the phoebus-core module; do we want this? |
Good point. We don't want "AWT" per se, but it kinda comes for free. |
Maybe the AWT Dimension is fine. We're not touching the AWT event loop which could conflict with the JFX event loop, we're just using that POD type. |
Exactly, it should just be a DTO. |
Let's return a rectangle or bounds, that is X, Y, WIDTH, HEIGHT. |
Yep! |
Sanity-check -- Do we want to actually implement position in this work as well @kasemir ? |
…ossible to also specify window position in addition to size if later needed.
For the "target=window" we now support "target=window@.." to set location and size. |
@kasemir I've implemented the position stuff now, using position if not the default values (0 and 0). But I do wonder, what if people want to use the upper left corner (0,0) of their display? |
Aaaah, I take that back...To implement this, those boolean properties need to be hints. I mean, if we want to generify it and e.g. make it So, can you let me know then @kasemir if there's anything else to do with this, or if this branch is good as-is? |
I think this will do. Yes, can't get exact 0, 0 position, need to use 0, 1 or 1, 0 but this is close enough. I don't think we need much tighter control or more placement hints because the general trend is towards viewing the displays via a web runtime, and then doing that on a laptop, tablet, phone. So in general trying to place something "just so" for a specific monitor will become a futile effort when every user has a different device. Showing one screen at a time, "full screen", will become the most portable viewing mode. Opening "tabs" may sometimes be an option, but opening additional panels in specific locations really only works when you're in the control room on the exact same display setup. |
As discussed in #1926