Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDA-4231 (Fix button width for macOS) #1900

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/renderer/components/call-notification.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import classNames from 'classnames';
import { ipcRenderer } from 'electron';
import * as React from 'react';
import { isMac } from '../../common/env';
import {
darkTheme,
getContainerCssClasses,
Expand Down Expand Up @@ -125,6 +126,7 @@ export default class CallNotification extends React.Component<
false,
);
let containerCssClass = `container ${themeClassName} `;
customCssClasses.push(isMac ? 'mac' : 'windows');
containerCssClass += customCssClasses.join(' ');

const acceptText = acceptButtonText
Expand Down
14 changes: 12 additions & 2 deletions src/renderer/styles/call-notification.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
--profile-place-holder-text: @electricity-ui-40;
}

.mac {
--button-width: 80px;
--button-with-other: 104px;
}

.windows {
--button-width: 72px;
--button-with-other: 94px;
}

body {
margin: 0;
}
Expand Down Expand Up @@ -226,7 +236,7 @@ text {
display: flex;
padding: 4px 12px;
justify-content: center;
width: 72px;
width: var(--button-width);
align-items: center;
gap: 8px;
border-radius: 16px;
Expand All @@ -249,7 +259,7 @@ text {
}

.call-type-other {
width: 94px;
width: var(--button-with-other);
}
}

Expand Down