mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
SDA-3534 Snipping tool height shouldn't be greater than screen width and height (#1324)
This commit is contained in:
parent
b34a6b3f90
commit
cc2113eed7
@ -1169,9 +1169,9 @@ export class WindowHandler {
|
||||
|
||||
const display = screen.getDisplayMatching(this.mainWindow.getBounds());
|
||||
const workAreaSize = display.workAreaSize;
|
||||
const maxToolHeight = Math.floor(
|
||||
calculatePercentage(workAreaSize.height, 90),
|
||||
);
|
||||
// Snipping tool height shouldn't be greater than min of screen width and height (screen orientation can be portrait or landscape)
|
||||
const minSize = Math.min(workAreaSize.width, workAreaSize.height);
|
||||
const maxToolHeight = Math.floor(calculatePercentage(minSize, 90));
|
||||
const maxToolWidth = Math.floor(
|
||||
calculatePercentage(workAreaSize.width, 90),
|
||||
);
|
||||
@ -1301,7 +1301,6 @@ export class WindowHandler {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
this.snippingToolWindow.once('closed', () => {
|
||||
logger.info(
|
||||
'window-handler, createSnippingToolWindow: Closing snipping window, attempting to delete temp snip image',
|
||||
|
Loading…
Reference in New Issue
Block a user