mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
Merge pull request #1257 from RaiKoHoff/Dev_RC_Fixes
Selecting external toolbar from config
This commit is contained in:
commit
78f37b5f9e
@ -1932,9 +1932,10 @@ void CreateBars(HWND hwnd, HINSTANCE hInstance)
|
||||
hbmp = _LoadBitmapFile(s_tchToolbarBitmap);
|
||||
|
||||
BITMAP bmp;
|
||||
ZeroMemory(&bmp, sizeof(BITMAP));
|
||||
GetObject(hbmp, sizeof(BITMAP), &bmp);
|
||||
|
||||
bool const dimOk = (bmp.bmWidth >= (bmp.bmHeight * NUMTOOLBITMAPS));
|
||||
bool const dimOk = (bmp.bmWidth >= (bmp.bmHeight * NUMTOOLBITMAPS)) && hbmp;
|
||||
|
||||
if (!dimOk) {
|
||||
InfoBoxLng(MB_ICONWARNING, NULL, IDS_MUI_ERR_BITMAP, s_tchToolbarBitmap,
|
||||
@ -7443,7 +7444,7 @@ void LoadSettings()
|
||||
WCHAR tchHighDpiToolBar[32] = { L'\0' };
|
||||
StringCchPrintf(tchHighDpiToolBar, COUNTOF(tchHighDpiToolBar), L"%ix%i HighDpiToolBar", ResX, ResY);
|
||||
s_iToolBarTheme = IniSectionGetInt(pIniSection, tchHighDpiToolBar, -1);
|
||||
s_iToolBarTheme = StrIsNotEmpty(s_tchToolbarBitmap) ? 2 : clampi(s_iToolBarTheme, -1, 1);
|
||||
s_iToolBarTheme = clampi(s_iToolBarTheme, -1, StrIsEmpty(s_tchToolbarBitmap) ? 1 : 2);
|
||||
if (s_iToolBarTheme < 0) { // undefined: determine high DPI (higher than Full-HD)
|
||||
s_iToolBarTheme = IsFullHDOrHigher(Globals.hwndMain, ResX, ResY) ? 1 : 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user