Browse Source

double check ensure visible when creating window, helps with window scaling on first open

scott brogden 6 years ago
parent
commit
c6dbc72625
1 changed files with 10 additions and 0 deletions
  1. 10 0
      QuickPaste.cpp

+ 10 - 0
QuickPaste.cpp

@@ -236,6 +236,11 @@ void CQuickPaste::ShowQPasteWnd(CWnd *pParent, bool bAtPrevPos, bool bFromKeyboa
 			{
 				crRect.right = crRect.left + m_pwndPaste->m_DittoWindow.m_dpi.Scale(crRect.Width());
 				crRect.bottom = crRect.top + m_pwndPaste->m_DittoWindow.m_dpi.Scale(crRect.Height());
+
+				if (g_Opt.m_bEnsureEntireWindowCanBeSeen)
+				{
+					EnsureWindowVisible(&crRect);
+				}
 			}
 
 			m_pwndPaste->MoveWindow(crRect);
@@ -252,6 +257,11 @@ void CQuickPaste::ShowQPasteWnd(CWnd *pParent, bool bAtPrevPos, bool bFromKeyboa
 			{
 				crRect.right = crRect.left + m_pwndPaste->m_DittoWindow.m_dpi.Scale(crRect.Width());
 				crRect.bottom = crRect.top + m_pwndPaste->m_DittoWindow.m_dpi.Scale(crRect.Height());
+
+				if (g_Opt.m_bEnsureEntireWindowCanBeSeen)
+				{
+					EnsureWindowVisible(&crRect);
+				}
 			}
 			m_pwndPaste->MoveWindow(crRect);
 		}