From 274073a8624710af166afbb8119565c18b4ef84e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 15 Feb 2021 21:55:20 +0300 Subject: =?UTF-8?q?fixes=20#2738=20(=D0=9D=D0=B5=20=D1=81=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D1=81=D1=8B=D0=B2=D0=B0=D1=8E=D1=82=D1=81=D1=8F=20=D0=B2?= =?UTF-8?q?=20=D0=B4=D0=B5=D1=84=D0=BE=D0=BB=D1=82=20=D0=BD=D0=B5=D0=BA?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D1=80=D1=8B=D0=B5=20=D0=BD=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D1=80=D0=BE=D0=B9=D0=BA=D0=B8=20=D1=88=D1=80=D0=B8=D1=84=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B8=20=D1=86=D0=B2=D0=B5=D1=82=D0=BE=D0=B2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mir_app/src/FontOptions.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/src/FontOptions.cpp b/src/mir_app/src/FontOptions.cpp index 5eca04b2d3..e92b7e7a96 100644 --- a/src/mir_app/src/FontOptions.cpp +++ b/src/mir_app/src/FontOptions.cpp @@ -889,11 +889,11 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, switch (LOWORD(wParam)) { case IDC_FONTLIST: if (HIWORD(wParam) == LBN_SELCHANGE) { - char bEnableFont = 1; - char bEnableClText = 1; - char bEnableClBack = 1; - char bEnableEffect = 1; - char bEnableReset = 1; + bool bEnableFont = true; + bool bEnableClText = true; + bool bEnableClBack = true; + bool bEnableEffect = true; + bool bEnableReset = true; COLORREF clBack = 0xffffffff; COLORREF clText = 0xffffffff; @@ -906,15 +906,15 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, if (IsBadReadPtr(itemData, sizeof(FSUIListItemData))) continue; // prevent possible problems with corrupted itemData if (bEnableClBack && (itemData->colour_id < 0)) - bEnableClBack = 0; + bEnableClBack = false; if (bEnableEffect && (itemData->effect_id < 0)) - bEnableEffect = 0; + bEnableEffect = false; if (bEnableFont && (itemData->font_id < 0)) - bEnableFont = 0; + bEnableFont = false; if (!bEnableFont || bEnableClText && (itemData->font_id < 0)) - bEnableClText = 0; + bEnableClText = false; if (bEnableReset && (itemData->font_id >= 0) && !(font_id_list_w2[itemData->font_id].flags & FIDF_DEFAULTVALID)) - bEnableReset = 0; + bEnableReset = false; if (bEnableClBack && (itemData->colour_id >= 0) && (clBack == 0xffffffff)) clBack = colour_id_list_w2[itemData->colour_id].value; @@ -923,7 +923,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, } mir_free(selItems); } - else bEnableFont = bEnableClText = bEnableClBack = bEnableReset = bEnableEffect = 0; + else bEnableFont = bEnableClText = bEnableClBack = bEnableReset = bEnableEffect = false; EnableWindow(GetDlgItem(hwndDlg, IDC_BKGCOLOUR), bEnableClBack); ShowEffectButton(hwndDlg, bEnableEffect && !bEnableClBack); -- cgit v1.2.3