-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Upgrade to .NET 4.7.2, built with Visual Studio 2017 * Version number is now aligned with the changelog
- Loading branch information
Showing
20 changed files
with
137 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
using System; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using JetBrains.Annotations; | ||
|
||
namespace Launchbar | ||
{ | ||
public class MenuItemStyleSelector : StyleSelector | ||
public sealed class MenuItemStyleSelector : StyleSelector | ||
{ | ||
[CanBeNull] | ||
public Style ProgramStyle { get; set; } | ||
|
||
[CanBeNull] | ||
public Style SubmenuStyle { get; set; } | ||
|
||
[CanBeNull] | ||
public Style SeparatorStyle { get; set; } | ||
|
||
[CanBeNull] | ||
public Style SettingsStyle { get; set; } | ||
|
||
[CanBeNull] | ||
public Style ExitStyle { get; set; } | ||
|
||
public override Style SelectStyle(object item, DependencyObject container) | ||
[CanBeNull, MustUseReturnValue] | ||
public override Style SelectStyle([CanBeNull] object item, [CanBeNull] DependencyObject container) | ||
{ | ||
if (item is Program) | ||
switch (item) | ||
{ | ||
return this.ProgramStyle; | ||
case Program _: | ||
return this.ProgramStyle; | ||
case Submenu _: | ||
return this.SubmenuStyle; | ||
case Separator _: | ||
return this.SeparatorStyle; | ||
case MenuEntrySettings _: | ||
return this.SettingsStyle; | ||
case MenuEntryExit _: | ||
return this.ExitStyle; | ||
default: | ||
return null; | ||
} | ||
if (item is Submenu) | ||
{ | ||
return this.SubmenuStyle; | ||
} | ||
if (item is Separator) | ||
{ | ||
return this.SeparatorStyle; | ||
} | ||
if (item is MenuEntrySettings) | ||
{ | ||
return this.SettingsStyle; | ||
} | ||
if (item is MenuEntryExit) | ||
{ | ||
return this.ExitStyle; | ||
} | ||
|
||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.