-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Set initial size and position of secondary windows #13201
Set initial size and position of secondary windows #13201
Conversation
e.g. sized the same as the original widget that we are extracting into it's own windows and position at the same place, with an offset. Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
Signed-off-by: Marc Dumais <marc.dumais@ericsson.com>
…om/eclipse-theia/theia into secondary-window
…om/eclipse-theia/theia into secondary-window
This prototype implements the initial size and positions of secondary windows. It also adds a preference, called `Secondary Window Placement` allowing the user to choose the placement of the secondary windows between: - originalSize: same size as the widget. - splitScreen: half the size of the Theia application, positioned to the side. - fullScreen: the secondary window will take up the full screen. Signed-off-by: Vlad Arama <vlad.arama@ericsson.com>
…into secondary-window
This commit implements the correct values for the initial size and position of secondary windows. Signed-off-by <vlad.arama@ericsson.com>
…into secondary-window
Signed-off-by: Vlad Arama <vlad.arama@ericsson.com>
Signed-off-by: Vlad Arama <vlad.arama@ericsson.com>
…into secondary-window
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I've tested on Ubuntu with the electron and the browser application and it works very well overall. I've added a few comments where the implementation did not match what I expected as a user.
packages/core/src/browser/window/default-secondary-window-service.ts
Outdated
Show resolved
Hide resolved
This commit does the following changes: - rename `halfSize` to `halfWidth` - set `alwaysOnTop` to false by default Signed-off-by: Vlad Arama <vlad.arama@ericsson.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfaltermeier
Thanks for the review,
I have addressed your comments and the implementation should now match the user's expectations 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, lgtm!
What it does
This PR implements the initial size and positions of secondary windows. It adds a preference called
Secondary Window Placement
allowing the user to choose the placement of the secondary windows between:originalSize
(default): same size as the original widget.halfSize
: half the size of the running Theia applicationfullSize
: the same size as the running Theia application.In addition, another preference (
alwaysOnTop
) is introduced that allows the user to decide if they want the secondary window to always stay above all other windows, including those of different applications.How to test
drawio
extension.Secondary Window Placement
preference.test.drawio
file or create a new terminal and open it as a secondary window.Follow-ups
The secondary window popup might not line up perfectly with the original widget since the API used to get the window dimensions has inconsistencies across different browsers and operating systems.
Review checklist
Reminder for reviewers