Moved hard coded top position of screen share indicator window to a variable topPositionOfIndicatorScreen

This commit is contained in:
Johan Kwarnmark 2019-11-01 11:02:40 +01:00
parent a577cd1ef9
commit d0e8cb2b31

View File

@ -665,6 +665,8 @@ export class WindowHandler {
(displayId && electron.screen.getAllDisplays().filter((d) => (displayId && electron.screen.getAllDisplays().filter((d) =>
displayId.includes(d.id.toString()))[0]) || electron.screen.getPrimaryDisplay(); displayId.includes(d.id.toString()))[0]) || electron.screen.getPrimaryDisplay();
const topPositionOfIndicatorScreen = 16;
const screenRect = indicatorScreen.workArea; const screenRect = indicatorScreen.workArea;
// Set stream id as winKey to link stream to the window // Set stream id as winKey to link stream to the window
let opts = { let opts = {
@ -690,7 +692,7 @@ export class WindowHandler {
if (opts.width && opts.height) { if (opts.width && opts.height) {
opts = Object.assign({}, opts, { opts = Object.assign({}, opts, {
x: screenRect.x + Math.round((screenRect.width - opts.width) / 2), x: screenRect.x + Math.round((screenRect.width - opts.width) / 2),
y: screenRect.y + 16, y: screenRect.y + topPositionOfIndicatorScreen,
}); });
} }