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

Detached display width and height #1926

Closed
fredrik-soderberg opened this issue Jun 10, 2021 · 3 comments
Closed

Detached display width and height #1926

fredrik-soderberg opened this issue Jun 10, 2021 · 3 comments

Comments

@fredrik-soderberg
Copy link

When I detach a display in Phoebus, the width and height is calculated from the parent. The width and height shown in the display property panel is not used. Some of our users would prefer to use the values in the property panel. They report that they have to resize a lot of windows all the time when using the detach functionality. What is the main reason for using the current implementation to the determine the width and height? Would it be possible to use the width and height from the display property instead or will it have other consequences/side effects?

@kasemir
Copy link
Collaborator

kasemir commented Jun 11, 2021

Would it be possible ..

Not easily. The 'docking' mechanism has no idea about the content. It doesn't care if the pane contains a display builder runtime or an editor or probe or ...
At the same time, the apps inside the pane have no idea if the pane is one of many tabs, or in a vertically divided tab, or a standalone window.

It's of course possible to change it, but we should NOT change it by making the docking pane check for a display builder runtime as a child, since that would introduce unnecessary coupling. What if you wanted to build a phoebus with only data browser? Couldn't, would now always need to include the display runtime...
So one way to solve this would be to add something like a "Dimensions getSizeHint()" to the app, which the docking lib would ignore most of the time except when it's detaching a pane. Personally, not sure if it's worth it because you might be able to find as many users who would vote for "use the origin window size" option that's currently implemented.

@cjenkscybercom
Copy link
Contributor

@kasemir Started looking into this one again, I see a year later or so (CSSTUDIO-1121) and can see where you're coming from with this implementation-wise.

I'm curious if you've had any additional thoughts on this, since I'm working on (potentially) implementing it.

@cjenkscybercom
Copy link
Contributor

@kasemir It so far wasn't a lot to change, and the ramifications are opt-in...So I made a PR. Would you mind please taking a closer look at it? Thanks!

#2387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants