Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update resources names #3886

Merged
merged 2 commits into from
Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified build/MSTest.cer
Binary file not shown.
Binary file modified build/MSTest.pfx
Binary file not shown.
16 changes: 8 additions & 8 deletions dev/CommonStyles/MediaTransportControls_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
<StaticResource x:Key="MediaTransportControlsPanelBackground" ResourceKey="GhostFillColorSecondaryBrush" />
<StaticResource x:Key="MediaTransportControlsFlyoutBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<StaticResource x:Key="MediaTransportControlsThumbBorderBackground" ResourceKey="ControlAAFillColorDefaultBrush" />
<StaticResource x:Key="MediaTransportControlsTimeElapsedText" ResourceKey="TextFillColorSecondaryBrush" />
<StaticResource x:Key="MediaTransportControlsMediaText" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="MediaTransportControlsFillTimeElapsedText" ResourceKey="TextFillColorSecondaryBrush" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't just rename resources like this, because there might be an app which references the resource. We should put a resource with the old name and value in the dictionary as well (or a separate dictionary for deprecated resources) and put a comment saying that it is no longer used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is necessary since this change only resides in token-experiment branch (it's not in master) and was introduced in this commit. Unless a developer cloned the token-experiment branch after Dec 1 and created an app what is very unlikely :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are new resources so we should be okay to rename them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet

<StaticResource x:Key="MediaTransportControlsFillMediaText" ResourceKey="TextFillColorPrimaryBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="HighContrast">
<Thickness x:Key="MediaTransportControlsTitleSafeBounds">48,0,48,27</Thickness>
<StaticResource x:Key="MediaTransportControlsPanelBackground" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
<StaticResource x:Key="MediaTransportControlsFlyoutBackground" ResourceKey="SystemControlPageBackgroundAltMediumBrush" />
<StaticResource x:Key="MediaTransportControlsThumbBorderBackground" ResourceKey="SystemControlBackgroundBaseMediumBrush" />
<StaticResource x:Key="MediaTransportControlsTimeElapsedText" ResourceKey="SystemControlPageTextBaseMediumBrush" />
<StaticResource x:Key="MediaTransportControlsMediaText" ResourceKey="SystemControlForegroundBaseHighBrush" />
<StaticResource x:Key="MediaTransportControlsFillTimeElapsedText" ResourceKey="SystemControlPageTextBaseMediumBrush" />
<StaticResource x:Key="MediaTransportControlsFillMediaText" ResourceKey="SystemControlForegroundBaseHighBrush" />
</ResourceDictionary>
<ResourceDictionary x:Key="Light">
<Thickness x:Key="MediaTransportControlsTitleSafeBounds">48,0,48,27</Thickness>
<StaticResource x:Key="MediaTransportControlsPanelBackground" ResourceKey="GhostFillColorSecondaryBrush" />
<StaticResource x:Key="MediaTransportControlsFlyoutBackground" ResourceKey="SystemControlTransientBackgroundBrush" />
<StaticResource x:Key="MediaTransportControlsThumbBorderBackground" ResourceKey="ControlAAFillColorDefaultBrush" />
<StaticResource x:Key="MediaTransportControlsTimeElapsedText" ResourceKey="TextFillColorSecondaryBrush" />
<StaticResource x:Key="MediaTransportControlsMediaText" ResourceKey="TextFillColorPrimaryBrush" />
<StaticResource x:Key="MediaTransportControlsFillTimeElapsedText" ResourceKey="TextFillColorSecondaryBrush" />
<StaticResource x:Key="MediaTransportControlsFillMediaText" ResourceKey="TextFillColorPrimaryBrush" />
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

Expand Down Expand Up @@ -65,7 +65,7 @@
<!-- Style for Error Message text -->
<Style x:Key="MediaTextBlockStyle" TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Foreground" Value="{ThemeResource MediaTransportControlsMediaText}" />
<Setter Property="Foreground" Value="{ThemeResource MediaTransportControlsFillMediaText}" />
<Setter Property="FontSize" Value="{ThemeResource MTCMediaFontSize}" />
<Setter Property="FontFamily" Value="{ThemeResource MTCMediaFontFamily}" />
<Setter Property="Style" Value="{ThemeResource CaptionTextBlockStyle }" />
Expand Down Expand Up @@ -277,7 +277,7 @@
<Grid Height="112" Width="192">
<Image x:Name="ThumbnailImage" />
<Border Background="{ThemeResource MediaTransportControlsThumbBorderBackground}" VerticalAlignment="Bottom" HorizontalAlignment="Left">
<TextBlock x:Name="TimeElapsedPreview" Margin="6,1,6,3" Style="{StaticResource BodyTextBlockStyle}" IsTextScaleFactorEnabled="False" Foreground="{ThemeResource MediaTransportControlsTimeElapsedText}" />
<TextBlock x:Name="TimeElapsedPreview" Margin="6,1,6,3" Style="{StaticResource BodyTextBlockStyle}" IsTextScaleFactorEnabled="False" Foreground="{ThemeResource MediaTransportControlsFillTimeElapsedText}" />
</Border>
</Grid>
</Thumb.DataContext>
Expand Down
26 changes: 26 additions & 0 deletions test/MUXControlsTestApp/verification/CalendarView-7.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5828,6 +5828,32 @@
FocusVisualPrimaryBrush=#FF000000
Visibility=Visible
RenderSize=22,27
[Windows.UI.Xaml.Controls.CalendarViewDayItem]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why calendarView baselines have to be changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know for sure but in this PR @kmahone also updated them.
https://github.com/microsoft/microsoft-ui-xaml/pull/3882/checks?sha=f82b1a9660db0b3002b40fdb86e0629b69d64848 - failing check on that PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you merge the latest from master you should pick up the required change where I updated the master.

Padding=0,0,0,4
Foreground=#CC000000
BorderThickness=0,0,0,0
BorderBrush=[NULL]
Background=[NULL]
CornerRadius=0,0,0,0
MinWidth=40
MinHeight=40
Margin=1,1,1,1
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Visible
RenderSize=55,51
[Windows.UI.Xaml.Controls.TextBlock]
Padding=0,0,0,0
Foreground=#FF000000
Margin=0,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Visible
RenderSize=22,27
[Windows.UI.Xaml.Controls.ScrollViewer]
Padding=0,0,0,0
Foreground=#CC000000
Expand Down
25 changes: 25 additions & 0 deletions test/MUXControlsTestApp/verification/CalendarView.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5613,6 +5613,31 @@
FocusVisualPrimaryBrush=#FF000000
Visibility=Visible
RenderSize=22,27
[Windows.UI.Xaml.Controls.CalendarViewDayItem]
Padding=0,0,0,4
Foreground=#CC000000
BorderThickness=0,0,0,0
BorderBrush=[NULL]
Background=[NULL]
MinWidth=40
MinHeight=40
Margin=1,1,1,1
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Visible
RenderSize=55,51
[Windows.UI.Xaml.Controls.TextBlock]
Padding=0,0,0,0
Foreground=#FF000000
Margin=0,0,0,0
FocusVisualSecondaryThickness=1,1,1,1
FocusVisualSecondaryBrush=#99FFFFFF
FocusVisualPrimaryThickness=2,2,2,2
FocusVisualPrimaryBrush=#FF000000
Visibility=Visible
RenderSize=22,27
[Windows.UI.Xaml.Controls.ScrollViewer]
Padding=0,0,0,0
Foreground=#CC000000
Expand Down