@@ -32,23 +32,14 @@ namespace ui {
3232namespace win32 {
3333
3434static constexpr int COLUMN_WIDTH_ID = 30 ;
35- static constexpr int COLUMN_WIDTH_FLAG = 78 ;
36- static constexpr int COLUMN_WIDTH_TYPE = 42 ;
37- static constexpr int COLUMN_WIDTH_SIZE = 72 ;
38- static constexpr int COLUMN_WIDTH_VALUE = 72 ;
39- static constexpr int COLUMN_WIDTH_OPERATOR = 35 ;
35+ static constexpr int COLUMN_WIDTH_FLAG = 110 ;
36+ static constexpr int COLUMN_WIDTH_TYPE = 60 ;
37+ static constexpr int COLUMN_WIDTH_SIZE = 90 ;
38+ static constexpr int COLUMN_WIDTH_VALUE = 90 ;
39+ static constexpr int COLUMN_WIDTH_OPERATOR = 38 ;
4040static constexpr int COLUMN_WIDTH_HITS = 84 ;
4141
4242using fnGetStockIconInfo = std::add_pointer_t <HRESULT WINAPI (SHSTOCKICONID , UINT , SHSTOCKICONINFO *)>;
43- static fnGetStockIconInfo pGetStockIconInfo = nullptr ;
44-
45- AssetEditorDialog::Presenter::Presenter () noexcept
46- {
47- // SHGetStockIconInfo isn't supported on WinXP, so we have to dynamically find it.
48- auto hDll = LoadLibraryA (" Shell32" );
49- if (hDll)
50- GSL_SUPPRESS_TYPE1 pGetStockIconInfo = reinterpret_cast <fnGetStockIconInfo>(GetProcAddress (hDll, " SHGetStockIconInfo" ));
51- }
5243
5344bool AssetEditorDialog::Presenter::IsSupported (const ra::ui::WindowViewModelBase& vmViewModel) noexcept
5445{
@@ -667,23 +658,14 @@ void AssetEditorDialog::ErrorIconBinding::OnViewModelBoolValueChanged(const Bool
667658 UpdateImage ();
668659}
669660
670- static HICON GetIcon (SHSTOCKICONID nStockIconId, LPCWSTR nOicIconId ) noexcept
661+ static HICON GetIcon (SHSTOCKICONID nStockIconId, LPCWSTR ) noexcept
671662{
672- if (pGetStockIconInfo != nullptr )
673- {
674- SHSTOCKICONINFO sii{};
675- sii.cbSize = sizeof (sii);
676- if (SUCCEEDED (pGetStockIconInfo (nStockIconId, SHGSI_ICON | SHGSI_SMALLICON , &sii)))
677- return sii.hIcon ;
663+ SHSTOCKICONINFO sii{};
664+ sii.cbSize = sizeof (sii);
665+ if (SUCCEEDED (SHGetStockIconInfo (nStockIconId, SHGSI_ICON | SHGSI_SMALLICON , &sii)))
666+ return sii.hIcon ;
678667
679- return nullptr ;
680- }
681-
682- // despite requesting a 16x16 icon, this returns a 32x32 one, which looks awkward in the space
683- // provided. GetStockIconInfo is prefered because it returns an appropriately sized icon. this
684- // is fallback logic for WinXP.
685- GSL_SUPPRESS_TYPE1
686- return reinterpret_cast <HICON >(LoadImage (nullptr , nOicIconId, IMAGE_ICON , 16 , 16 , LR_SHARED ));
668+ return nullptr ;
687669}
688670
689671void AssetEditorDialog::ErrorIconBinding::SetErrorIcon () noexcept
@@ -874,6 +856,7 @@ AssetEditorDialog::AssetEditorDialog(AssetEditorViewModel& vmAssetEditor)
874856 m_bindAchievementTypes.BindSelectedItem (AssetEditorViewModel::AchievementTypeProperty);
875857 m_bindWindow.BindVisible (IDC_RA_LBL_TYPE , AssetEditorViewModel::IsAchievementProperty);
876858 m_bindWindow.BindVisible (IDC_RA_TYPE , AssetEditorViewModel::IsAchievementProperty);
859+ m_bindWindow.BindVisible (IDC_RA_LBL_MEASURED , AssetEditorViewModel::IsAchievementProperty);
877860
878861 // leaderboard only fields
879862 m_bindFormats.BindItems (vmAssetEditor.Formats ());
@@ -883,6 +866,7 @@ AssetEditorDialog::AssetEditorDialog(AssetEditorViewModel& vmAssetEditor)
883866 m_bindWindow.BindVisible (IDC_RA_LBL_FORMAT , AssetEditorViewModel::IsLeaderboardProperty);
884867 m_bindWindow.BindVisible (IDC_RA_FORMAT , AssetEditorViewModel::IsLeaderboardProperty);
885868 m_bindWindow.BindVisible (IDC_RA_CHK_LOWER_IS_BETTER , AssetEditorViewModel::IsLeaderboardProperty);
869+ m_bindWindow.BindVisible (IDC_RA_LBL_VALUE , AssetEditorViewModel::IsLeaderboardProperty);
886870 m_bindWindow.BindVisible (IDC_RA_LBL_DISPLAY , AssetEditorViewModel::IsLeaderboardProperty);
887871 m_bindWindow.BindVisible (IDC_RA_DISPLAY , AssetEditorViewModel::IsLeaderboardProperty);
888872 m_bindWindow.BindVisible (IDC_RA_LBX_LBOARD_PARTS , AssetEditorViewModel::IsLeaderboardProperty);
@@ -1003,15 +987,16 @@ AssetEditorDialog::AssetEditorDialog(AssetEditorViewModel& vmAssetEditor)
1003987 SetAnchor (IDC_RA_ID , Anchor::Top | Anchor::Right);
1004988 SetAnchor (IDC_RA_CHK_ACTIVE , Anchor::Top | Anchor::Right);
1005989 SetAnchor (IDC_RA_DESCRIPTION , Anchor::Top | Anchor::Left | Anchor::Right);
1006- SetAnchor (IDC_RA_LBL_TYPE , Anchor::Top | Anchor::Right );
1007- SetAnchor (IDC_RA_TYPE , Anchor::Top | Anchor::Right );
990+ SetAnchor (IDC_RA_LBL_TYPE , Anchor::Top | Anchor::Left );
991+ SetAnchor (IDC_RA_TYPE , Anchor::Top | Anchor::Left );
1008992 SetAnchor (IDC_RA_LBL_POINTS , Anchor::Top | Anchor::Left);
1009993 SetAnchor (IDC_RA_POINTS , Anchor::Top | Anchor::Left);
1010994 SetAnchor (IDC_RA_LBL_FORMAT , Anchor::Top | Anchor::Left);
1011995 SetAnchor (IDC_RA_FORMAT , Anchor::Top | Anchor::Left);
1012- SetAnchor (IDC_RA_LBL_DISPLAY , Anchor::Top | Anchor::Left);
1013- SetAnchor (IDC_RA_DISPLAY , Anchor::Top | Anchor::Left);
1014996 SetAnchor (IDC_RA_CHK_LOWER_IS_BETTER , Anchor::Top | Anchor::Left);
997+ SetAnchor (IDC_RA_LBL_DISPLAY , Anchor::Top | Anchor::Right);
998+ SetAnchor (IDC_RA_DISPLAY , Anchor::Top | Anchor::Right);
999+ SetAnchor (IDC_RA_LBL_VALUE , Anchor::Top | Anchor::Left);
10151000 SetAnchor (IDC_RA_LBL_MEASURED , Anchor::Top | Anchor::Left);
10161001 SetAnchor (IDC_RA_MEASURED , Anchor::Top | Anchor::Left);
10171002 SetAnchor (IDC_RA_CHK_AS_PERCENT , Anchor::Top | Anchor::Left);
@@ -1039,7 +1024,7 @@ AssetEditorDialog::AssetEditorDialog(AssetEditorViewModel& vmAssetEditor)
10391024 SetAnchor (IDC_RA_MOVE_COND_DOWN , Anchor::Bottom | Anchor::Left);
10401025 SetAnchor (IDC_RA_CHK_SHOW_DECIMALS , Anchor::Bottom | Anchor::Right);
10411026
1042- SetMinimumSize (665 , 348 );
1027+ SetMinimumSize (840 , 348 );
10431028}
10441029
10451030BOOL AssetEditorDialog::OnInitDialog ()
@@ -1068,6 +1053,8 @@ BOOL AssetEditorDialog::OnInitDialog()
10681053 m_bindActive.SetControl (*this , IDC_RA_CHK_ACTIVE );
10691054 m_bindDecimalPreferred.SetControl (*this , IDC_RA_CHK_SHOW_DECIMALS );
10701055
1056+ SetFixedWidthFont (IDC_RA_LBX_CONDITIONS );
1057+
10711058 m_hTooltip = CreateWindowEx (WS_EX_TOPMOST , TOOLTIPS_CLASS , nullptr ,
10721059 WS_POPUP | TTS_ALWAYSTIP | TTS_NOPREFIX ,
10731060 CW_USEDEFAULT , CW_USEDEFAULT , CW_USEDEFAULT , CW_USEDEFAULT ,
0 commit comments