signal-desktop/stylesheets/_titlebar.scss

35 lines
1 KiB
SCSS
Raw Normal View History

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
body {
2023-01-01 11:41:40 +00:00
// Overridden by ts/background.ts
--zoom-factor: 1;
// These should match the logic in `ts/types/Settings.ts`'s `getTitleBarVisibility`.
//
// It'd be great if we could use the `:fullscreen` selector here, but that does not seem
// to work with Electron, at least on macOS.
--title-bar-drag-area-height: 0px; // Needs to have a unit to work with `calc()`.
&.os-macos:not(.full-screen) {
--title-bar-drag-area-height: calc(28px / var(--zoom-factor));
}
--window-height: 100vh;
2022-07-05 16:44:53 +00:00
--window-width: 100vw;
--unscaled-window-border: 0px;
--window-border: calc(var(--unscaled-window-border) / var(--zoom-factor));
--titlebar-height: 0px;
&.os-has-custom-titlebar {
2022-07-05 16:44:53 +00:00
&:not(.maximized) {
--unscaled-window-border: 1px;
}
--titlebar-height: calc(28px / var(--zoom-factor));
2022-07-05 16:44:53 +00:00
--window-width: calc(100vw - 2 * var(--window-border));
--window-height: calc(
2023-03-01 23:45:29 +00:00
100vh - var(--titlebar-height) - var(--window-border)
2022-07-05 16:44:53 +00:00
);
}
}