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
|
@ -42,29 +42,3 @@ impl HiLoWord for LPARAM {
|
|||
(self.0 & 0xFFFF) as i16
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn get_window_long(hwnd: HWND, nindex: WINDOW_LONG_PTR_INDEX) -> isize {
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
unsafe {
|
||||
GetWindowLongPtrW(hwnd, nindex)
|
||||
}
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
unsafe {
|
||||
GetWindowLongW(hwnd, nindex) as isize
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) unsafe fn set_window_long(
|
||||
hwnd: HWND,
|
||||
nindex: WINDOW_LONG_PTR_INDEX,
|
||||
dwnewlong: isize,
|
||||
) -> isize {
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
unsafe {
|
||||
SetWindowLongPtrW(hwnd, nindex, dwnewlong)
|
||||
}
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
unsafe {
|
||||
SetWindowLongW(hwnd, nindex, dwnewlong as i32) as isize
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue