use static theme override StringName
This commit is contained in:
@@ -35,7 +35,7 @@ public partial class RenameSymbolDialog : ConfirmationDialog
|
|||||||
_isNameValid = false;
|
_isNameValid = false;
|
||||||
}
|
}
|
||||||
var textColour = _isNameValid ? new Color(1, 1, 1) : new Color(1, 0, 0);
|
var textColour = _isNameValid ? new Color(1, 1, 1) : new Color(1, 0, 0);
|
||||||
_nameLineEdit.AddThemeColorOverride("font_color", textColour);
|
_nameLineEdit.AddThemeColorOverride(ThemeStringNames.FontColor, textColour);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Input(InputEvent @event)
|
public override void _Input(InputEvent @event)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public partial class PackageEntry : MarginContainer
|
|||||||
foreach (var source in PackageResult.PackageSources)
|
foreach (var source in PackageResult.PackageSources)
|
||||||
{
|
{
|
||||||
var label = new Label { Text = source.Name };
|
var label = new Label { Text = source.Name };
|
||||||
label.AddThemeColorOverride("font_color", source.Name switch
|
label.AddThemeColorOverride(ThemeStringNames.FontColor, source.Name switch
|
||||||
{
|
{
|
||||||
// TODO: Make dynamic
|
// TODO: Make dynamic
|
||||||
"nuget.org" => Source_NugetOrg_Color,
|
"nuget.org" => Source_NugetOrg_Color,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public partial class RenameDirectoryDialog : ConfirmationDialog
|
|||||||
_isNameValid = false;
|
_isNameValid = false;
|
||||||
}
|
}
|
||||||
var textColour = _isNameValid ? new Color(1, 1, 1) : new Color(1, 0, 0);
|
var textColour = _isNameValid ? new Color(1, 1, 1) : new Color(1, 0, 0);
|
||||||
_nameLineEdit.AddThemeColorOverride("font_color", textColour);
|
_nameLineEdit.AddThemeColorOverride(ThemeStringNames.FontColor, textColour);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Input(InputEvent @event)
|
public override void _Input(InputEvent @event)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public partial class RenameFileDialog : ConfirmationDialog
|
|||||||
_isNameValid = false;
|
_isNameValid = false;
|
||||||
}
|
}
|
||||||
var textColour = _isNameValid ? new Color(1, 1, 1) : new Color(1, 0, 0);
|
var textColour = _isNameValid ? new Color(1, 1, 1) : new Color(1, 0, 0);
|
||||||
_nameLineEdit.AddThemeColorOverride("font_color", textColour);
|
_nameLineEdit.AddThemeColorOverride(ThemeStringNames.FontColor, textColour);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _Input(InputEvent @event)
|
public override void _Input(InputEvent @event)
|
||||||
|
|||||||
@@ -11,4 +11,9 @@ public static class InputStringNames
|
|||||||
public static readonly StringName FindFiles = nameof(FindFiles);
|
public static readonly StringName FindFiles = nameof(FindFiles);
|
||||||
public static readonly StringName SaveFile = nameof(SaveFile);
|
public static readonly StringName SaveFile = nameof(SaveFile);
|
||||||
public static readonly StringName SaveAllFiles = nameof(SaveAllFiles);
|
public static readonly StringName SaveAllFiles = nameof(SaveAllFiles);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ThemeStringNames
|
||||||
|
{
|
||||||
|
public static readonly StringName FontColor = "font_color";
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user