Clone
ixen
committed
on 13 Dec 20
Removed obsolete WinXP-era theme helpers.
src/ch/FolderDialog.cpp (+1 -3)
3 3 *   ixen@copyhandler.com                                                  *
4 4 *                                                                         *
5 5 *   This program is free software; you can redistribute it and/or modify  *
6 6 *   it under the terms of the GNU Library General Public License          *
7 7 *   (version 2) as published by the Free Software Foundation;             *
8 8 *                                                                         *
9 9 *   This program is distributed in the hope that it will be useful,       *
10 10 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11 11 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12 12 *   GNU General Public License for more details.                          *
13 13 *                                                                         *
14 14 *   You should have received a copy of the GNU Library General Public     *
15 15 *   License along with this program; if not, write to the                 *
16 16 *   Free Software Foundation, Inc.,                                       *
17 17 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18 18 ***************************************************************************/
19 19 #include "stdafx.h"
20 20 #include "ch.h"
21 21 #include "DirTreeCtrl.h"
22 22 #include "FolderDialog.h"
23   #include "Theme Helpers.h"
24 23 #include "shlobj.h"
25 24 #include "StringHelpers.h"
26 25 #include "TRecentPathsTools.h"
27 26 #include "resource.h"
28 27 #include "shortcuts.h"
29 28
30 29 #ifdef _DEBUG
31 30 #define new DEBUG_NEW
32 31 #undef THIS_FILE
33 32 static char THIS_FILE[] = __FILE__;
34 33 #endif
35 34
36 35 // dialog template
37 36 const unsigned long __g_DlgTemplate[]={
38 37         0x82cf0040, 0x00000000, 0x00000000, 0x011b0000, 0x000000b4, 0x00000000, 0x00540008, 0x00680061,
39 38         0x006d006f, 0x00000061 };
40 39
41 40 /////////////////////////////////////////////////////////////////////////////
42 41 // additional messages
43 42 #ifndef WM_THEMECHANGED
 
1023 1022         m_ctlSmallIcons.Invalidate();
1024 1023         m_ctlList.Invalidate();
1025 1024         m_ctlReport.Invalidate();
1026 1025 }
1027 1026
1028 1027 ////////////////////////////////////////////////////////////////////////////
1029 1028 // resize handling
1030 1029 void CFolderDialog::OnSize(UINT nType, int cx, int cy)
1031 1030 {
1032 1031         CLanguageDialog::OnSize(nType, cx, cy);
1033 1032         
1034 1033         ResizeControls(cx, cy);
1035 1034         InvalidateRect(&m_rcGripper);
1036 1035 }
1037 1036
1038 1037 ////////////////////////////////////////////////////////////////////////////
1039 1038 // repositions controls within the dialog
1040 1039 void CFolderDialog::ResizeControls(int cx, int cy)
1041 1040 {
1042 1041         // is app themed ?
1043           CUxThemeSupport uxt;
1044           bool bThemed=uxt.IsThemeSupported() && uxt.IsAppThemed();
  1042         bool bThemed=IsAppThemed();
1045 1043
1046 1044         // settings
1047 1045         const int iMargin=7;    // dialog units
1048 1046         const int iTextCount=3// count of lines in static
1049 1047
1050 1048         // small buttons
1051 1049         const int iBmpMargin=1// margin between button and a bitmap within
1052 1050         const int iButtonWidth=(bThemed ? 20 : 16)+2*GetSystemMetrics(SM_CXEDGE)+2*iBmpMargin;  // fixed size
1053 1051         const int iButtonHeight=(bThemed ? 20 : 16)+2*GetSystemMetrics(SM_CYEDGE)+2*iBmpMargin;
1054 1052
1055 1053         // large buttons
1056 1054         const int iLargeButtonHeight=14;        // OK&Cancel buttons (dialog units)
1057 1055         const int iLargeButtonWidth=50;         // width in DU
1058 1056         const int iToggleButtonWidth=18;        // toggle size
1059 1057
1060 1058         // combo
1061 1059         const int iComboHeight=12;
1062 1060         const int iComboExpandedHeight=100;
1063 1061
1064 1062         // static text at the top of dialog