Browse Source

- refresh window better when changing themes
- show no search results in theme colors, foreground and background

scott brogden 7 years ago
parent
commit
735f5bcb04
4 changed files with 11 additions and 8 deletions
  1. 3 2
      Debug/Language/English.xml
  2. 2 0
      MainFrm.cpp
  3. 4 6
      QPasteWnd.cpp
  4. 2 0
      QuickPaste.cpp

+ 3 - 2
Debug/Language/English.xml

@@ -413,6 +413,7 @@
 		
 		<Item English_Text = "Ditto is running minimized, Ditto can be opened by hot keys or by clicking the task tray icon" ID = "StartuMsg"></Item>
 		
+		<Item English_Text = "There are no results for" ID = "NoSearchResults"></Item>
 				
 	</Ditto_String_Table>
 	<Ditto_Options_Sheet>
@@ -621,8 +622,8 @@
 		<Item English_Text = "Import Clip" ID = "82"></Item>
 		<Item English_Text = "Global HotKeys" ID = "83"></Item>
 		<Item English_Text = "Delete Clip Data" ID = "84"></Item>
-		<Item English_Text = "Replace Top Sticky Clip" ID = "85"></Item>
-			
+		<Item English_Text = "Replace Top Sticky Clip" ID = "85"></Item>		
+	
 	</Ditto_Options_Quick_Paste_Keyboard>
 	
 </Ditto_Language_File>

+ 2 - 0
MainFrm.cpp

@@ -1204,6 +1204,8 @@ LRESULT CMainFrame::OnOptionsClosed(WPARAM wParam, LPARAM lParam)
 
 	if (themeChanged)
 	{
+		g_Opt.m_Theme.Load(g_Opt.GetTheme());
+
 		m_quickPaste.CloseQPasteWnd();
 	}
 	else

+ 4 - 6
QPasteWnd.cpp

@@ -422,10 +422,6 @@ int CQPasteWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
 	m_alwaysOnToWarningStatic.SetFont(&m_groupFont);
 
 	m_noSearchResultsStatic.Create(onTopMsg, WS_CHILD, CRect(0, 0, 0, 0), this, ID_NO_SEARCH_RESULTS);
-	m_noSearchResultsStatic.SetTextColor(COLORREF(RGB(0, 0, 0)));
-	m_noSearchResultsStatic.SetBkColor(g_Opt.m_Theme.MainWindowBG());
-	m_noSearchResultsStatic.SetFont(&m_SearchFont);
-	m_noSearchResultsStatic.SetWindowText(_T("There are no results"));
 
 	m_popupMsg.m_hWndPosRelativeTo = m_hWnd;
 
@@ -2040,9 +2036,10 @@ void CQPasteWnd::UpdateFont()
 	m_groupFont.CreateFont(-m_DittoWindow.m_dpi.Scale(12), 0, 0, 0, 400, 0, 1, 0, DEFAULT_CHARSET, 3, 2, 1, 34, _T("Segoe UI"));
 	m_stGroup.SetFont(&m_groupFont);
 	m_stGroup.SetBkColor(g_Opt.m_Theme.MainWindowBG());
-	m_stGroup.SetTextColor(RGB(127, 127, 127));
+	m_stGroup.SetTextColor(g_Opt.m_Theme.ListBoxEvenRowsText());
 
 	m_noSearchResultsStatic.SetBkColor(g_Opt.m_Theme.MainWindowBG());
+	m_noSearchResultsStatic.SetTextColor(g_Opt.m_Theme.ListBoxEvenRowsText());
 	m_noSearchResultsStatic.SetFont(&m_SearchFont);
 }
 
@@ -5777,7 +5774,8 @@ LRESULT CQPasteWnd::OnSetListCount(WPARAM wParam, LPARAM lParam)
 	if ((int)wParam == 0 &&
 		m_strSearch != _T(""))
 	{
-		m_noSearchResultsStatic.SetWindowText(StrF(_T("There are no results for \"%s\""), m_strSearch));
+		CString text = theApp.m_Language.GetString("NoSearchResults", "There are no results for");
+		m_noSearchResultsStatic.SetWindowText(StrF(_T("%s \"%s\""), text, m_strSearch));
 	}
 
 	SelectFocusID();

+ 2 - 0
QuickPaste.cpp

@@ -68,6 +68,8 @@ BOOL CQuickPaste::CloseQPasteWnd()
 		
 		delete m_pwndPaste;
 		m_pwndPaste = NULL;
+
+		theApp.m_bShowingQuickPaste = false;
 	}
 	
 	return TRUE;