mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 07:04:36 +00:00
Try to fix potential cast issue if renderer does not apply on certain themes
This commit is contained in:
parent
0882c488c9
commit
1ff766a199
2 changed files with 4 additions and 4 deletions
|
@ -37,13 +37,13 @@ namespace Toolbox.Library.Forms
|
|||
public bool HighlightSelectedTab
|
||||
{
|
||||
get {
|
||||
if (Renderer == null)
|
||||
if (Renderer == null || !(Renderer is MenuRenderer))
|
||||
return false;
|
||||
|
||||
return ((MenuRenderer)this.Renderer).HighlightMenuBar;
|
||||
}
|
||||
set {
|
||||
if (Renderer != null)
|
||||
if (Renderer == null || !(Renderer is MenuRenderer))
|
||||
((MenuRenderer)this.Renderer).HighlightMenuBar = value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,14 +33,14 @@ namespace Toolbox.Library.Forms
|
|||
{
|
||||
get
|
||||
{
|
||||
if (Renderer == null)
|
||||
if (Renderer == null || !(Renderer is MenuRenderer))
|
||||
return false;
|
||||
|
||||
return ((MenuRenderer)this.Renderer).HighlightMenuBar;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (Renderer != null)
|
||||
if (Renderer != null || !(Renderer is MenuRenderer))
|
||||
((MenuRenderer)this.Renderer).HighlightMenuBar = value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue