Browse Source

More changes for bottom button theming

Scott Brogden 9 years ago
parent
commit
6b082389e7
6 changed files with 18 additions and 22 deletions
  1. 0 2
      DittoSetup/BuildDitto.bld
  2. 2 2
      DittoWindow.cpp
  3. 3 6
      QPasteWnd.cpp
  4. 2 1
      Resource.h
  5. 11 11
      SymbolEdit.cpp
  6. BIN
      res/system_menu_2_24.png

+ 0 - 2
DittoSetup/BuildDitto.bld

@@ -483,7 +483,6 @@ var sc_security="b3f57099";
 <!-- End of StatCounter Code --><br><a href="http://my.statcounter.com/project/standard/stats.php?project_id=4303469&guest=1">View My Stats</a>
 
 </body>]]></Text>
-			<checked type='11'>0</checked>
 			<indent type='3'>2</indent>
 			<name>Beta web page</name>
 		</step>
@@ -550,7 +549,6 @@ var sc_security="b3f57099";
 			<Timeout>30</Timeout>
 			<TransferType type='3'>1</TransferType>
 			<UserName>sabrogden,ditto-cp</UserName>
-			<checked type='11'>0</checked>
 			<indent type='3'>1</indent>
 			<name>Copy to beta folder</name>
 		</step></steps>

+ 2 - 2
DittoWindow.cpp

@@ -41,11 +41,11 @@ CDittoWindow::~CDittoWindow(void)
 
 void CDittoWindow::DoCreate(CWnd *pWnd)
 {
-	m_VertFont.CreateFont(theApp.m_metrics.PointsToPixels(18), 0, -900, 0, 400, FALSE, FALSE, 0, ANSI_CHARSET,
+	m_VertFont.CreateFont(theApp.m_metrics.PointsToPixels(18), 0, -900, 0, 400, FALSE, FALSE, 0, DEFAULT_CHARSET,
 							OUT_DEFAULT_PRECIS,	CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 
 							DEFAULT_PITCH|FF_SWISS, _T("Segoe UI"));
 
-	m_HorFont.CreateFont(theApp.m_metrics.PointsToPixels(18), 0, 0, 0, 500, FALSE, FALSE, 0, ANSI_CHARSET,
+	m_HorFont.CreateFont(theApp.m_metrics.PointsToPixels(18), 0, 0, 0, 500, FALSE, FALSE, 0, DEFAULT_CHARSET,
 						OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
 						DEFAULT_PITCH|FF_SWISS, _T("Segoe UI"));
 	

+ 3 - 6
QPasteWnd.cpp

@@ -371,19 +371,16 @@ int CQPasteWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
 
 
     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);
 	m_search.SetPromptFont(m_SearchFont);
-	m_stGroup.SetFont(&m_groupFont);	
 
+	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_stGroup.SetFont(&m_groupFont);	
 	m_stGroup.SetBkColor(g_Opt.m_Theme.MainWindowBG());
 	
     UpdateFont();
 	
-    m_thread.Start(this);
-
-	
+    m_thread.Start(this);	
 
 	/*m_actions.AddAccel(ActionEnums::SHOWDESCRIPTION, VK_F3);
 	m_actions.AddAccel(ActionEnums::NEXTDESCRIPTION, 'N');

+ 2 - 1
Resource.h

@@ -151,6 +151,7 @@
 #define Search_24                       295
 #define IDB_PNG15                       296
 #define Search_32                       296
+#define IDI_ICON2                       297
 #define IDC_PATH                        1000
 #define IDC_GET_PATH                    1001
 #define IDC_SELECT_SOUND                1002
@@ -629,7 +630,7 @@
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_3D_CONTROLS                     1
-#define _APS_NEXT_RESOURCE_VALUE        297
+#define _APS_NEXT_RESOURCE_VALUE        298
 #define _APS_NEXT_COMMAND_VALUE         32929
 #define _APS_NEXT_CONTROL_VALUE         2146
 #define _APS_NEXT_SYMED_VALUE           104

+ 11 - 11
SymbolEdit.cpp

@@ -241,10 +241,16 @@ void CSymbolEdit::OnPaint()
 	CRect rect;
 	GetClientRect(&rect);
 
+	DWORD margins = GetMargins();
+	
+	CRect textRect(rect);
+	textRect.left += LOWORD(margins);
+	textRect.right -= HIWORD(margins);
+
 	// Clearing the background
 	dc.FillSolidRect(rect, GetSysColor(COLOR_WINDOW));
 
-	DWORD margins = GetMargins();
+	
 
 	if (m_hSymbolIcon)
 	{
@@ -282,12 +288,9 @@ void CSymbolEdit::OnPaint()
 	{
 		dc.FillSolidRect(rect, m_editFocusColor);
 
-		oldFont = dc.SelectObject(GetFont());
-
-		rect.left += LOWORD(margins);
-		rect.right -= HIWORD(margins);
+		oldFont = dc.SelectObject(GetFont());		
 			
-		dc.DrawText(text, rect, DT_SINGLELINE | DT_INTERNAL | DT_EDITCONTROL);
+		dc.DrawText(text, textRect, DT_SINGLELINE | DT_INTERNAL | DT_EDITCONTROL);
 		dc.SelectObject(oldFont);
 	}
 	else
@@ -299,11 +302,8 @@ void CSymbolEdit::OnPaint()
 			oldFont = dc.SelectObject(&m_fontPrompt);
 			COLORREF color = dc.GetTextColor();
 			dc.SetTextColor(m_colorPromptText);
-
-			rect.left += LOWORD(margins);
-			rect.right -= HIWORD(margins);
-
-			dc.DrawText(m_strPromptText, rect, DT_LEFT | DT_SINGLELINE | DT_EDITCONTROL);
+			
+			dc.DrawText(m_strPromptText, textRect, DT_LEFT | DT_SINGLELINE | DT_EDITCONTROL);
 			dc.SetTextColor(color);
 			dc.SelectObject(oldFont);
 		}

BIN
res/system_menu_2_24.png