@@ -33,10 +33,8 @@ public ThemeDialog()
3333 Localization . TranslateForm ( this ) ;
3434 this . themeLinkLabel . Left += ( this . importButton . Width - oldButtonWidth ) ;
3535
36- #pragma warning disable SYSLIB5002
37- this . searchBoxButton . BackgroundImage = SystemColors . UseAlternativeColorSet ?
36+ this . searchBoxButton . BackgroundImage = UwpDesktop . IsDarkMode ( ) ?
3837 Resources . IconSearch_Dark : Resources . IconSearch_Light ;
39- #pragma warning restore SYSLIB5002
4038 this . themeLinkLabel . LinkColor = SystemColors . HotTrack ;
4139
4240 this . FormClosing += OnFormClosing ;
@@ -268,18 +266,16 @@ private void ThemeDialog_Load(object sender, EventArgs e)
268266
269267 private void searchBox_TextChanged ( object sender , EventArgs e )
270268 {
271- #pragma warning disable SYSLIB5002
272269 if ( string . IsNullOrWhiteSpace ( searchBox . Text ) )
273270 {
274- this . searchBoxButton . BackgroundImage = SystemColors . UseAlternativeColorSet ?
271+ this . searchBoxButton . BackgroundImage = UwpDesktop . IsDarkMode ( ) ?
275272 Resources . IconSearch_Dark : Resources . IconSearch_Light ;
276273 }
277274 else
278275 {
279- this . searchBoxButton . BackgroundImage = SystemColors . UseAlternativeColorSet ?
276+ this . searchBoxButton . BackgroundImage = UwpDesktop . IsDarkMode ( ) ?
280277 Resources . IconDismiss_Dark : Resources . IconDismiss_Light ;
281278 }
282- #pragma warning restore SYSLIB5002
283279
284280 ThemeDialogUtils . ApplySearchFilter ( listView1 , searchBox . Text ) ;
285281 UpdateSelectedItem ( ) ;
0 commit comments