Uncomment title font

This commit is contained in:
David Rios authored and Wez Furlong committed 2022-03-26 07:27:54 -07:00
1 parent c55d44aa72
commit eaaf98ad2f
2 files changed
+10 -15

No files matched your search

-2
View File
@@ -1,5 +1,3 @@
use winapi::um::winuser::WM_USER;
pub const TMT_CAPTIONFONT: i32 = 801;
pub const HP_HEADERITEM: i32 = 1;
pub const HIS_NORMAL: i32 = 1;
+10 -13
View File
@@ -753,19 +753,16 @@ impl WindowOps for Window {
let has_focus = unsafe { GetFocus() } == hwnd;
let is_full_screen = window_state.contains(WindowState::FULL_SCREEN);
// let title_font = unsafe {
// let hdc = GetDC(hwnd);
// if hdc.is_null() {
// return Err(anyhow::anyhow!("Could not get device context"));
// }
// let result = match get_title_log_font(hwnd, hdc) {
// Some(lf) => Some(wezterm_font::locator::gdi::parse_log_font(&lf, hdc)?),
// None => None,
// };
// ReleaseDC(hwnd, hdc);
// result
// };
let title_font = None;
let title_font = unsafe {
let hdc = GetDC(hwnd);
anyhow::ensure!(!hdc.is_null(), "Could not get device context");
let result = match get_title_log_font(hwnd, hdc) {
Some(lf) => wezterm_font::locator::gdi::parse_log_font(&lf, hdc).ok(),
None => None,
};
ReleaseDC(hwnd, hdc);
result
};
let hkcu = RegKey::predef(HKEY_CURRENT_USER);
let use_accent = hkcu