Browse Source

Updates to bottom icons for new theming

ScottBrogden 9 years ago
parent
commit
11cb864633

+ 8 - 0
CP_Main.rc

@@ -1335,6 +1335,14 @@ return_24               PNG                     "res\\return_24.png"
 
 return_32               PNG                     "res\\return_32.png"
 
+Search_16               PNG                     "res\\Search_16.png"
+
+Search_20               PNG                     "res\\Search_20.png"
+
+Search_24               PNG                     "res\\Search_24.png"
+
+Search_32               PNG                     "res\\Search_32.png"
+
 
 /////////////////////////////////////////////////////////////////////////////
 //

+ 4 - 0
CP_Main.vcxproj

@@ -2092,6 +2092,10 @@
     <None Include="res\return_20.png" />
     <None Include="res\return_24.png" />
     <None Include="res\return_32.png" />
+    <None Include="res\Search_16.png" />
+    <None Include="res\Search_20.png" />
+    <None Include="res\Search_24.png" />
+    <None Include="res\Search_32.png" />
     <None Include="res\search_close.bmp" />
     <None Include="res\search_close_125.bmp" />
     <None Include="res\search_close_150.bmp" />

+ 4 - 0
CP_Main.vcxproj.filters

@@ -1207,6 +1207,10 @@
     <None Include="res\return_20.png" />
     <None Include="res\return_24.png" />
     <None Include="res\return_32.png" />
+    <None Include="res\Search_16.png" />
+    <None Include="res\Search_20.png" />
+    <None Include="res\Search_24.png" />
+    <None Include="res\Search_32.png" />
   </ItemGroup>
   <ItemGroup>
     <Filter Include="sqlite">

+ 6 - 5
QPasteWnd.cpp

@@ -370,7 +370,7 @@ int CQPasteWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
     #endif 
 
 
-    m_SearchFont.CreatePointFont(130, _T("Segoe UI"));
+    m_SearchFont.CreatePointFont(120, _T("Segoe UI"));
 	m_groupFont.CreateFont(-theApp.m_metrics.PointsToPixels(8), 0, 0, 0, 400, 0, 1, 0, DEFAULT_CHARSET, 3, 2, 1, 34, _T("Segoe UI"));	
 
     m_search.SetFont(&m_SearchFont);
@@ -564,11 +564,11 @@ void CQPasteWnd::MoveControls()
 	}
 
 	m_lstHeader.MoveWindow(0, topOfListBox, cx+extraSize, cy - listBoxBottomOffset-topOfListBox + extraSize+1);
-	m_search.MoveWindow(theApp.m_metrics.ScaleX(40), cy - theApp.m_metrics.ScaleY(searchRowStart-5), cx - theApp.m_metrics.ScaleX(90), theApp.m_metrics.ScaleY(23));
+	m_search.MoveWindow(theApp.m_metrics.ScaleX(32), cy - theApp.m_metrics.ScaleY(searchRowStart-5), cx - theApp.m_metrics.ScaleX(68), theApp.m_metrics.ScaleY(23));
 
-	m_systemMenu.MoveWindow(cx - theApp.m_metrics.ScaleX(28), cy - theApp.m_metrics.ScaleX(28), theApp.m_metrics.ScaleX(24), theApp.m_metrics.ScaleY(24));
+	m_systemMenu.MoveWindow(cx - theApp.m_metrics.ScaleX(32), cy - theApp.m_metrics.ScaleX(28), theApp.m_metrics.ScaleX(24), theApp.m_metrics.ScaleY(24));
 
-	m_ShowGroupsFolderBottom.MoveWindow(theApp.m_metrics.ScaleX(2), cy - theApp.m_metrics.ScaleX(28), theApp.m_metrics.ScaleX(24), theApp.m_metrics.ScaleY(24));
+	m_ShowGroupsFolderBottom.MoveWindow(theApp.m_metrics.ScaleX(4), cy - theApp.m_metrics.ScaleX(28), theApp.m_metrics.ScaleX(24), theApp.m_metrics.ScaleY(24));
 
 	/*if (g_Opt.m_bShowPersistent &&
 		g_Opt.m_bShowAlwaysOnTopWarning)
@@ -4919,6 +4919,7 @@ void CQPasteWnd::OnMenuSearchQuickPaste()
 
 void CQPasteWnd::OnSearchEditChange()
 {
+	m_search.Invalidate();
     if(g_Opt.m_bFindAsYouType == FALSE)
     {
         return ;
@@ -4931,7 +4932,7 @@ void CQPasteWnd::OnSearchEditChange()
     }
 
     KillTimer(TIMER_DO_SEARCH);
-    SetTimer(TIMER_DO_SEARCH, 250, NULL);
+    SetTimer(TIMER_DO_SEARCH, 250, NULL);	
 
     return ;
 }

+ 6 - 1
Resource.h

@@ -146,6 +146,11 @@
 #define return_24                       291
 #define IDB_PNG14                       292
 #define return_32                       292
+#define Search_16                       293
+#define Search_20                       294
+#define Search_24                       295
+#define IDB_PNG15                       296
+#define Search_32                       296
 #define IDC_PATH                        1000
 #define IDC_GET_PATH                    1001
 #define IDC_SELECT_SOUND                1002
@@ -624,7 +629,7 @@
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
-#define _APS_NEXT_RESOURCE_VALUE        293
+#define _APS_NEXT_RESOURCE_VALUE        297
 #define _APS_NEXT_COMMAND_VALUE         32929
 #define _APS_NEXT_CONTROL_VALUE         2146
 #define _APS_NEXT_SYMED_VALUE           104

+ 31 - 13
SymbolEdit.cpp

@@ -34,6 +34,8 @@ CSymbolEdit::CSymbolEdit() :
 	m_editNonFocusColor = RGB(240, 240, 240);
 	m_editFocusBrush.CreateSolidBrush(m_editFocusColor);
 	m_editNonFocusBrush.CreateSolidBrush(m_editNonFocusColor);
+
+	m_searchButton.LoadStdImageDPI(Search_16, Search_20, Search_24, Search_32, _T("PNG"));
 }
 
 CSymbolEdit::~CSymbolEdit()
@@ -224,6 +226,10 @@ void CSymbolEdit::RecalcLayout()
 		DWORD dwMargins = GetMargins();
 		SetMargins(LOWORD(dwMargins), width + 6);
 	}
+	else
+	{
+		SetMargins(4, 24);
+	}
 }
 
 // CSymbolEdit message handlers
@@ -272,34 +278,46 @@ void CSymbolEdit::OnPaint()
 
 	//rect.top += 1;
 
-	if (text.GetLength() == 0)
+	if(this == GetFocus() || text.GetLength() > 0)
 	{
+		dc.FillSolidRect(rect, m_editFocusColor);
+
+		oldFont = dc.SelectObject(GetFont());
+
+		DWORD margins = this->GetMargins();
+		rect.left += LOWORD(margins);
+		rect.right -= HIWORD(margins);
+			
+		dc.DrawText(text, rect, DT_SINGLELINE | DT_INTERNAL | DT_EDITCONTROL);
+		dc.SelectObject(oldFont);
+	}
+	else
+	{
+		dc.FillSolidRect(rect, m_editNonFocusColor);
+
 		if (this != GetFocus() && m_strPromptText.GetLength() > 0)
 		{
-			dc.FillSolidRect(rect, m_editNonFocusColor);
-
 			oldFont = dc.SelectObject(&m_fontPrompt);
 			COLORREF color = dc.GetTextColor();
 			dc.SetTextColor(m_colorPromptText);
+
 			DWORD margins = this->GetMargins();
 			rect.left += LOWORD(margins);
 			rect.right -= HIWORD(margins);
+
 			dc.DrawText(m_strPromptText, rect, DT_LEFT | DT_SINGLELINE | DT_EDITCONTROL);
 			dc.SetTextColor(color);
 			dc.SelectObject(oldFont);
 		}
 	}
-	else
-	{
-		dc.FillSolidRect(rect, m_editFocusColor);
+	
+
+
+
+	m_searchButton.Draw(&dc, this, rect.right - 22, 4, false, false);
+
+	//OutputDebugString(_T("OnPaint"));
 
-		oldFont = dc.SelectObject(GetFont());
-		DWORD margins = this->GetMargins();
-		rect.left += LOWORD(margins);
-		rect.right -= HIWORD(margins);
-		dc.DrawText(text, rect, DT_SINGLELINE | DT_INTERNAL | DT_EDITCONTROL);
-		dc.SelectObject(oldFont);
-	}
 }
 
 void CSymbolEdit::OnSize(UINT nType, int cx, int cy)

+ 3 - 0
SymbolEdit.h

@@ -26,6 +26,7 @@
 
 #pragma once
 
+#include "GdiImageDrawer.h"
 
 // CSymbolEdit
 
@@ -65,6 +66,8 @@ protected:
 	CBrush m_editFocusBrush;
 	CBrush m_editNonFocusBrush;
 
+	CGdiImageDrawer m_searchButton;
+
 	void RecalcLayout();
 	virtual void PreSubclassWindow();
 

BIN
res/Close_512.png


BIN
res/DoubleRight_20_20.png


BIN
res/Folder_512.png


BIN
res/More_512.png


BIN
res/Search_16.png


BIN
res/Search_20.png


BIN
res/Search_24.png


BIN
res/Search_32.png


BIN
res/Search_512.png


BIN
res/close_20_20.png


BIN
res/folder_40.png


BIN
res/open_folder_24.png


BIN
res/system_menu_24_24.png


BIN
res/system_menu_2_24.png