summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-06-15 15:33:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-06-15 15:33:12 +0300
commit65171c0d60c0846affe796b9e22d4f005ef82bee (patch)
tree01d5cc68c0b0bd80f01f21fff77ce8e74f216039
parentf59d0ddb712b9da16706eaadfb2f0ab5906a560a (diff)
CDlgBase::m_bFixedSize - flag added not to apply hidpi patch to dialogs
-rw-r--r--include/m_gui.h1
-rw-r--r--src/mir_core/src/Windows/CDlgBase.cpp10
2 files changed, 9 insertions, 2 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index 3728037ab4..e217c6ba15 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -490,6 +490,7 @@ protected:
bool m_isModal = false;
bool m_bInitialized = false;
bool m_forceResizable = false;
+ bool m_bFixedSize = false;
bool m_bSucceeded = false; // was IDOK pressed or not
bool m_bExiting = false; // window received WM_CLOSE and gonna die soon
diff --git a/src/mir_core/src/Windows/CDlgBase.cpp b/src/mir_core/src/Windows/CDlgBase.cpp
index b8b0d5ce11..91b5237884 100644
--- a/src/mir_core/src/Windows/CDlgBase.cpp
+++ b/src/mir_core/src/Windows/CDlgBase.cpp
@@ -102,14 +102,20 @@ void CDlgBase::Close()
void CDlgBase::Create()
{
- mir_ptr<DLGTEMPLATE> pDlgTemplate(LoadThemedDialogTemplate(MAKEINTRESOURCE(m_idDialog), GetInst()));
- CreateDialogIndirectParam(GetInst(),pDlgTemplate,m_hwndParent,GlobalDlgProc,(LPARAM)this);
+ if (!m_bFixedSize) {
+ mir_ptr<DLGTEMPLATE> pDlgTemplate(LoadThemedDialogTemplate(MAKEINTRESOURCE(m_idDialog), GetInst()));
+ CreateDialogIndirectParam(GetInst(), pDlgTemplate, m_hwndParent, GlobalDlgProc, (LPARAM)this);
+ }
+ else CreateDialogParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this);
}
int CDlgBase::DoModal()
{
m_isModal = true;
+ if (m_bFixedSize)
+ return DialogBoxParam(GetInst(), MAKEINTRESOURCE(m_idDialog), m_hwndParent, GlobalDlgProc, (LPARAM)this);
+
mir_ptr<DLGTEMPLATE> pDlgTemplate(LoadThemedDialogTemplate(MAKEINTRESOURCE(m_idDialog), GetInst()));
return DialogBoxIndirectParam(GetInst(), pDlgTemplate, m_hwndParent, GlobalDlgProc, (LPARAM)this);
}