SDA-4553 - Apply client zoom for toast notifications (#2138)

SDA-4555 - Hide scroll bar for toast notifications
This commit is contained in:
Kiran Niranjan 2024-04-27 15:13:57 +05:30 committed by GitHub
parent 3b39725f9d
commit 8c066b963f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 23 additions and 1 deletions

View File

@ -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;

View File

@ -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

View File

@ -2,6 +2,10 @@
@import 'variables';
@import 'notifications-animations';
::-webkit-scrollbar {
display: none;
}
.black-text {
--text-color: #000000;
--button-bg-color: #52575f;

View File

@ -2,6 +2,10 @@
@import 'variables';
@import 'notifications-animations';
::-webkit-scrollbar {
display: none;
}
.black-text {
--text-color: #000000;
--button-bg-color: #52575f;