OSDN Git Service

ListFilterの描画時にアイテムの選択状態を考慮
authorKimura Youichi <kim.upsilon@bucyou.net>
Wed, 6 May 2015 08:54:10 +0000 (17:54 +0900)
committerKimura Youichi <kim.upsilon@bucyou.net>
Wed, 6 May 2015 16:13:17 +0000 (01:13 +0900)
OpenTween/FilterDialog.cs

index 7baa9ab..98f4f7a 100644 (file)
@@ -1374,10 +1374,11 @@ namespace OpenTween
             e.DrawBackground();
 
             var filter = (PostFilterRule)this.ListFilters.Items[e.Index];
+            var isSelected = e.State.HasFlag(DrawItemState.Selected);
 
             Brush textBrush;
             if (filter.Enabled)
-                textBrush = SystemBrushes.ControlText;
+                textBrush = isSelected ? SystemBrushes.HighlightText : SystemBrushes.WindowText;
             else
                 textBrush = SystemBrushes.GrayText;