Skip to content

Commit

Permalink
SLVS-1618 Change the edit credentials icon to be usable in dark mode …
Browse files Browse the repository at this point in the history
…as well
  • Loading branch information
gabriela-trutan-sonarsource committed Nov 15, 2024
1 parent 6b7efec commit 5d816d1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ConnectedMode/ConnectedMode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
<None Remove="UI\ProgressAndErrorReporterComponent.xaml" />
<None Remove="UI\Resources\CheckImage.xaml" />
<None Remove="UI\Resources\LogoImages.xaml" />
<None Remove="UI\Resources\Pencil.xaml" />
<None Remove="UI\Resources\sonarlint_32px.ico" />
<None Remove="UI\Resources\Styles.xaml" />
<None Remove="UI\Resources\TrashCanImage.xaml" />
<None Remove="UI\ServerSelection\ServerSelectionDialog.xaml" />
Expand All @@ -68,6 +70,7 @@
<Page Include="UI\Resources\CheckImage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UI\Resources\Pencil.xaml" />
<Page Include="UI\Resources\Styles.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
Source="pack://application:,,,/SonarLint.VisualStudio.ConnectedMode;component/UI/Resources/LogoImages.xaml" />
<ResourceDictionary
Source="pack://application:,,,/SonarLint.VisualStudio.ConnectedMode;component/UI/Resources/TrashCanImage.xaml" />
<ResourceDictionary Source="pack://application:,,,/SonarLint.VisualStudio.ConnectedMode;component/UI/Resources/Pencil.xaml" />
</ResourceDictionary.MergedDictionaries>
<wpf:BoolToVisibilityConverter x:Key="TrueToVisibleConverter" FalseValue="Collapsed" TrueValue="Visible" />
</ResourceDictionary>
Expand Down Expand Up @@ -104,8 +105,8 @@
</Grid.ColumnDefinitions>

<Button Grid.Column="0" Style="{StaticResource IconButtonStyle}" ToolTip="{x:Static res:UiResources.EditConnectionToolTip}" Click="EditConnection_Clicked">
<imaging:CrispImage Width="20" Height="20" VerticalAlignment="Center" Cursor="Hand" Moniker="{x:Static vsimagecatalog:KnownMonikers.Settings}"
Margin="10,0" />
<Image Width="20" Height="20" VerticalAlignment="Center" Cursor="Hand" Source="{StaticResource PencilDrawingImage}"
Margin="5,0" />
</Button>
<Button Grid.Column="1" Style="{StaticResource IconButtonStyle}"
ToolTip="{x:Static res:UiResources.RemoveConnectionToolTip}"
Expand Down
21 changes: 21 additions & 0 deletions src/ConnectedMode/UI/Resources/Pencil.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vsShell="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0">

<DrawingImage x:Key="PencilDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
<DrawingGroup Opacity="1">
<GeometryDrawing
Geometry="F1 M16,16z M0,0z M13.26,2.736A1.5,1.5,0,0,1,13.26,4.855L13.26,4.855 6.116,12 4,9.884 11.143,2.736A1.5,1.5,0,0,1,13.26,2.736z">
<GeometryDrawing.Brush>
<SolidColorBrush Color="#FF212121" Opacity="0.1" />
</GeometryDrawing.Brush>
</GeometryDrawing>
<GeometryDrawing Brush="{DynamicResource {x:Static vsShell:VsBrushes.CaptionTextKey}}"
Geometry="F1 M16,16z M0,0z M13.588,5.233A2,2,0,0,0,10.761,2.41L10.761,2.41 4.042,9.13 2,13.333 2.667,14 6.732,12.056 13.588,5.24z M6.224,11.19L6.142,11.229 4.771,9.858 4.81,9.776 11.465,3.118A1,1,0,1,1,12.9,4.507L12.875,4.532 12.875,4.532z" />
</DrawingGroup>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
</ResourceDictionary>

0 comments on commit 5d816d1

Please sign in to comment.