mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-25 02:10:32 -06:00
SDA-4553 - Apply client zoom for toast notifications (#2138)
SDA-4555 - Hide scroll bar for toast notifications
This commit is contained in:
parent
3b39725f9d
commit
8c066b963f
@ -52,6 +52,7 @@ import {
|
||||
updateFeaturesForCloudConfig,
|
||||
updateLocale,
|
||||
windowExists,
|
||||
ZOOM_FACTOR_CHANGE,
|
||||
} from './window-utils';
|
||||
|
||||
import { getCommandLineArgs } from '../common/utils';
|
||||
@ -381,6 +382,19 @@ ipcMain.on(
|
||||
const mainWebContents = windowHandler.getMainWebContents();
|
||||
if (mainWebContents && !mainWebContents.isDestroyed()) {
|
||||
mainWebContents.setZoomFactor(arg.zoomLevel as number);
|
||||
const notificationWindows = BrowserWindow.getAllWindows().filter(
|
||||
(win) =>
|
||||
(win as ICustomBrowserWindow).winName &&
|
||||
(win as ICustomBrowserWindow).winName ===
|
||||
apiName.notificationWindowName,
|
||||
);
|
||||
notificationWindows.map((notificationWindow) => {
|
||||
const notificationWebContents = notificationWindow?.webContents;
|
||||
if (!notificationWindow || !windowExists(notificationWindow)) {
|
||||
return;
|
||||
}
|
||||
notificationWebContents.send(ZOOM_FACTOR_CHANGE, arg.zoomLevel);
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -90,7 +90,7 @@ const TITLE_BAR_EVENTS = [
|
||||
'enter-full-screen',
|
||||
'leave-full-screen',
|
||||
];
|
||||
const ZOOM_FACTOR_CHANGE = 'zoom-factor-change';
|
||||
export const ZOOM_FACTOR_CHANGE = 'zoom-factor-change';
|
||||
|
||||
/**
|
||||
* Checks if window is valid and exists
|
||||
|
@ -2,6 +2,10 @@
|
||||
@import 'variables';
|
||||
@import 'notifications-animations';
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.black-text {
|
||||
--text-color: #000000;
|
||||
--button-bg-color: #52575f;
|
||||
|
@ -2,6 +2,10 @@
|
||||
@import 'variables';
|
||||
@import 'notifications-animations';
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.black-text {
|
||||
--text-color: #000000;
|
||||
--button-bg-color: #52575f;
|
||||
|
Loading…
Reference in New Issue
Block a user