Skip to content

Commit

Permalink
Don't let author change title or tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
krschau committed May 20, 2024
1 parent d86f2af commit 18d0b93
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions common/Renderers/ChooseFileAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,12 @@ public IAdaptiveActionElement FromJson(

var chooseFileAction = new ChooseFileAction
{
Title = stringResource.GetLocalized("ChooseFileActionTitle"),
Tooltip = stringResource.GetLocalized("ChooseFileActionToolTip"),

// Parse the JSON properties of the action.
// The Verb ChooseFile is not meant to be localized.
Verb = inputJson.GetNamedString("verb", "ChooseFile"),
Title = inputJson.GetNamedString("title", stringResource.GetLocalized("ChooseFileActionTitle")),
Tooltip = inputJson.GetNamedString("tooltip", stringResource.GetLocalized("ChooseFileActionToolTip")),
UseIcon = inputJson.GetNamedBoolean("useIcon", false),
};

Expand All @@ -137,9 +138,11 @@ public UIElement Render(IAdaptiveActionElement element, AdaptiveRenderContext co
var button = renderer.Render(element, context, renderArgs) as Button;
if (button != null)
{
var content = new StackPanel();
content.Orientation = Orientation.Horizontal;
content.Spacing = 8;
var content = new StackPanel
{
Orientation = Orientation.Horizontal,
Spacing = 8,
};
if (chooseFileElement.UseIcon)
{
content.Children.Add(new FontIcon
Expand Down

0 comments on commit 18d0b93

Please sign in to comment.