Revert "windows: better looking titlebar" and follow-up (#9392)
This reverts #9053 and #9375 because they introduced a regression on `main` that broke the titlebars on macOS:  Two things are off: - Left padding is missing - Titlebar height is less than it was before, which means the traffic-light buttons are not centered vertically What @as-cii and I noticed while looking into this: the `cfg!(macos)` macros that were used don't work like that. You need to check for `cfg!(target = "macos")` etc. Means that on macOS we never used the macOS-specific code because the condition was always false. Overall height, we're not sure about. Release Notes: - N/A
This commit is contained in:
parent
5ae145145e
commit
5bf0c8ed2d
15 changed files with 121 additions and 687 deletions
|
@ -72,7 +72,7 @@ use task::SpawnInTerminal;
|
|||
use theme::{ActiveTheme, SystemAppearance, ThemeSettings};
|
||||
pub use toolbar::{Toolbar, ToolbarItemEvent, ToolbarItemLocation, ToolbarItemView};
|
||||
pub use ui;
|
||||
use ui::Label;
|
||||
use ui::{px, Label};
|
||||
use util::ResultExt;
|
||||
use uuid::Uuid;
|
||||
pub use workspace_settings::{AutosaveSetting, WorkspaceSettings};
|
||||
|
@ -4753,6 +4753,10 @@ fn parse_pixel_size_env_var(value: &str) -> Option<Size<GlobalPixels>> {
|
|||
Some(size((width as f64).into(), (height as f64).into()))
|
||||
}
|
||||
|
||||
pub fn titlebar_height(cx: &mut WindowContext) -> Pixels {
|
||||
(1.75 * cx.rem_size()).max(px(32.))
|
||||
}
|
||||
|
||||
struct DisconnectedOverlay;
|
||||
|
||||
impl Element for DisconnectedOverlay {
|
||||
|
@ -4766,7 +4770,7 @@ impl Element for DisconnectedOverlay {
|
|||
.bg(background)
|
||||
.absolute()
|
||||
.left_0()
|
||||
.top(cx.titlebar_height())
|
||||
.top(titlebar_height(cx))
|
||||
.size_full()
|
||||
.flex()
|
||||
.items_center()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue