Window Size restriction
For application windows smaller than 41x36px, the Windows O/S will not apply the 'Aero Snap' when a window is dragged, to or from, a maximized state. To avoid unexpected behavior, by default, OpenFin windows are limited to a minimum size of 41x36px.
Enabling small windows
To allow windows to be sized 41x36px OpenFin provides the `smallWindow` parameter that can be added to the window options when creating a new window. For example:
async function createWindow() {
const winOption = {
name:'child',
defaultWidth: 300,
defaultHeight: 300,
url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
frame: false,
smallWindow: true,
autoShow: true
};
return await fin.Window.create(winOption);
}
createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
Caveats
For windows with the `smallWindow` parameter applied, the Windows O/S will not apply the 'Aero Snap' when a window is dragged, to or from, a maximized state.
References
More information regarding Window API creation options can be found here, feel free to reach out with any other questions you may have.
Comments
0 comments
Please sign in to leave a comment.