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
|
@ -22,10 +22,10 @@ mod test;
|
|||
mod windows;
|
||||
|
||||
use crate::{
|
||||
Action, AnyWindowHandle, AsyncWindowContext, BackgroundExecutor, Bounds, DevicePixels,
|
||||
DispatchEventResult, Font, FontId, FontMetrics, FontRun, ForegroundExecutor, GlobalPixels,
|
||||
GlyphId, Keymap, LineLayout, Pixels, PlatformInput, Point, RenderGlyphParams,
|
||||
RenderImageParams, RenderSvgParams, Scene, SharedString, Size, Task, TaskLabel, WindowContext,
|
||||
Action, AnyWindowHandle, AsyncWindowContext, BackgroundExecutor, Bounds, DevicePixels, Font,
|
||||
FontId, FontMetrics, FontRun, ForegroundExecutor, GlobalPixels, GlyphId, Keymap, LineLayout,
|
||||
Pixels, PlatformInput, Point, RenderGlyphParams, RenderImageParams, RenderSvgParams, Scene,
|
||||
SharedString, Size, Task, TaskLabel, WindowContext,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use async_task::Runnable;
|
||||
|
@ -168,7 +168,6 @@ unsafe impl Send for DisplayId {}
|
|||
|
||||
pub(crate) trait PlatformWindow: HasWindowHandle + HasDisplayHandle {
|
||||
fn bounds(&self) -> Bounds<GlobalPixels>;
|
||||
fn is_maximized(&self) -> bool;
|
||||
fn content_size(&self) -> Size<Pixels>;
|
||||
fn scale_factor(&self) -> f32;
|
||||
fn titlebar_height(&self) -> Pixels;
|
||||
|
@ -195,7 +194,7 @@ pub(crate) trait PlatformWindow: HasWindowHandle + HasDisplayHandle {
|
|||
fn toggle_fullscreen(&self);
|
||||
fn is_fullscreen(&self) -> bool;
|
||||
fn on_request_frame(&self, callback: Box<dyn FnMut()>);
|
||||
fn on_input(&self, callback: Box<dyn FnMut(PlatformInput) -> DispatchEventResult>);
|
||||
fn on_input(&self, callback: Box<dyn FnMut(PlatformInput) -> bool>);
|
||||
fn on_active_status_change(&self, callback: Box<dyn FnMut(bool)>);
|
||||
fn on_resize(&self, callback: Box<dyn FnMut(Size<Pixels>, f32)>);
|
||||
fn on_fullscreen(&self, callback: Box<dyn FnMut(bool)>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue