From 232c20907972795c2edb40f02151d14d56ebb076 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 18 Aug 2021 09:34:07 +0800 Subject: [PATCH] style: fix wrong icon displayed for group folder in repositories manager --- src/Views/Controls/Bookmark.cs | 15 --------------- src/Views/Widgets/PageTabBar.xaml | 3 +-- src/Views/Widgets/Welcome.xaml | 29 +++++++++-------------------- 3 files changed, 10 insertions(+), 37 deletions(-) diff --git a/src/Views/Controls/Bookmark.cs b/src/Views/Controls/Bookmark.cs index 5decdfd1..9250b705 100644 --- a/src/Views/Controls/Bookmark.cs +++ b/src/Views/Controls/Bookmark.cs @@ -39,14 +39,6 @@ namespace SourceGit.Views.Controls { set { SetValue(IsNewPageProperty, value); } } - public static readonly DependencyProperty HideOnZeroProperty = - DependencyProperty.Register("HideOnZero", typeof(bool), typeof(Bookmark), new PropertyMetadata(false, UpdateBookmark)); - - public bool HideOnZero { - get { return (bool)GetValue(HideOnZeroProperty); } - set { SetValue(HideOnZeroProperty, value); } - } - public Bookmark() { icon = new Path(); Child = icon; @@ -57,11 +49,6 @@ namespace SourceGit.Views.Controls { var mark = d as Bookmark; if (mark == null) return; - if (mark.HideOnZero && mark.Color == 0) { - mark.Visibility = Visibility.Collapsed; - return; - } - if (!mark.IsNewPage) { if (mark.Color == 0) { mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1"); @@ -74,8 +61,6 @@ namespace SourceGit.Views.Controls { mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1"); mark.icon.Data = mark.FindResource("Icon.WelcomePage") as Geometry; } - - mark.Visibility = Visibility.Visible; } } } diff --git a/src/Views/Widgets/PageTabBar.xaml b/src/Views/Widgets/PageTabBar.xaml index 335f35f6..4b64766e 100644 --- a/src/Views/Widgets/PageTabBar.xaml +++ b/src/Views/Widgets/PageTabBar.xaml @@ -58,8 +58,7 @@ + Color="{Binding Bookmark}"/> - + + IsNewPage="False"/> @@ -154,32 +152,23 @@ LostFocus="RenameEnd" IsHitTestVisible="True" Visibility="Collapsed"/> - + + - - + + + - - - - - - - - - - - - + - +