From 6f6a97accab5427efe18352b838e73787036d3e4 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Thu, 22 Mar 2012 21:47:25 +0100 Subject: [PATCH] Move listbox/listview styles that highlight the focus instead of the selection to GlobalStyles. --- .../Project/Src/Gui/InsertCtorDialog.xaml | 32 +--------- .../Src/Gui/OverrideToStringMethodDialog.xaml | 34 +---------- .../GlobalStyles.cs | 20 +++++++ .../themes/generic.xaml | 58 +++++++++++++++++++ 4 files changed, 83 insertions(+), 61 deletions(-) diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml index 6f6f60afbf..cdca8c5a20 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/InsertCtorDialog.xaml @@ -8,34 +8,6 @@ @@ -46,7 +18,9 @@ - + diff --git a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideToStringMethodDialog.xaml b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideToStringMethodDialog.xaml index b6a947b192..a94bce5b66 100644 --- a/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideToStringMethodDialog.xaml +++ b/src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/OverrideToStringMethodDialog.xaml @@ -6,37 +6,6 @@ xmlns:widgets="http://icsharpcode.net/sharpdevelop/widgets" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> - - - @@ -45,7 +14,8 @@ - + diff --git a/src/Main/ICSharpCode.Core.Presentation/GlobalStyles.cs b/src/Main/ICSharpCode.Core.Presentation/GlobalStyles.cs index 5644949261..cf67531eee 100644 --- a/src/Main/ICSharpCode.Core.Presentation/GlobalStyles.cs +++ b/src/Main/ICSharpCode.Core.Presentation/GlobalStyles.cs @@ -65,5 +65,25 @@ namespace ICSharpCode.Core.Presentation public static ResourceKey FlowDirectionKey { get { return flowDirectionKey; } } + + static readonly ResourceKey listViewItemFocusHighlightStyleKey = new ComponentResourceKey(typeof(GlobalStyles), "ListViewItemFocusHighlightStyle"); + + public static ResourceKey ListViewItemFocusHighlightStyleKey { + get { return listViewItemFocusHighlightStyleKey; } + } + + public static Style ListViewItemFocusHighlightStyle { + get { return FindResource(listViewItemFocusHighlightStyleKey); } + } + + static readonly ResourceKey listBoxItemFocusHighlightStyleKey = new ComponentResourceKey(typeof(GlobalStyles), "ListBoxItemFocusHighlightStyle"); + + public static ResourceKey ListBoxItemFocusHighlightStyleKey { + get { return listBoxItemFocusHighlightStyleKey; } + } + + public static Style ListBoxItemFocusHighlightStyle { + get { return FindResource(listBoxItemFocusHighlightStyleKey); } + } } } diff --git a/src/Main/ICSharpCode.Core.Presentation/themes/generic.xaml b/src/Main/ICSharpCode.Core.Presentation/themes/generic.xaml index 7d703485a4..9db5484f05 100644 --- a/src/Main/ICSharpCode.Core.Presentation/themes/generic.xaml +++ b/src/Main/ICSharpCode.Core.Presentation/themes/generic.xaml @@ -208,4 +208,62 @@ Data = "M 5,5 L 10,10 L 15,5 L 5,5"/> + + + + \ No newline at end of file