Skip to content

Commit

Permalink
feeder: fixed the missing tab item selection underline
Browse files Browse the repository at this point in the history
  • Loading branch information
stojy committed Aug 21, 2023
1 parent 029f533 commit a4794ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ClrVpin/Feeder/FeederResults.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,11 @@
</TabControl.ContentTemplate>

<TabControl.ItemContainerStyle>
<!-- tab item header style, e.g. padding, disabled, etc -->
<Style TargetType="{x:Type TabItem}" BasedOn="{StaticResource MaterialDesignTabItem}" d:DataContext="{d:DesignInstance vps:FileCollection}">
<Setter Property="IsEnabled" Value="{Binding Count}" />
<Setter Property="Padding" Value="6,12" />
<!-- unfortunately the selection highlight color template binding gets messed up when using a custom item container style, hence it must be defined manually :( -->
<Setter Property="materialDesign:ColorZoneAssist.Foreground" Value="{DynamicResource PrimaryHueMidBrush}" />
</Style>
</TabControl.ItemContainerStyle>
</TabControl>
Expand Down
4 changes: 2 additions & 2 deletions ClrVpin/Feeder/FeederResultsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ private void UpdateOnlineGameFileDetails()
UpdateIsNew(file, fileCollectionTypeEnum, OnlineFileTypeEnum.Tables, () =>
file is TableFile { IsBlackWhiteMod: true } && !Settings.SelectedMiscFeatureOptions.Contains(MiscFeatureOptionEnum.BlackAndWhiteMod));
// - full DMD, i.e. included in the backglass
// - full DMD, true if the DMD is included as part of the backglass
UpdateIsNew(file, fileCollectionTypeEnum, OnlineFileTypeEnum.Backglasses, () =>
file is ImageFile { IsFullDmd: true } && !Settings.SelectedMiscFeatureOptions.Contains(MiscFeatureOptionEnum.FullDmd));
Expand All @@ -414,7 +414,7 @@ private void UpdateOnlineGameFileDetails()
fileCollection.Title = fileCollectionType;
// used for the tab item 'is new' indicator
// used for assigning 'new' indicator
fileCollection.IsNew = fileCollection.Any(file => file.IsNew);
// used for assigning the 'green' color and automatically moving the tab selection
Expand Down

0 comments on commit a4794ae

Please sign in to comment.