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

SLVS-1618 Change the edit credentials icon to be usable in dark mode as well #5838

Merged
merged 2 commits into from
Nov 15, 2024
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
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 @@ -2,8 +2,6 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:res="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI.Resources"
xmlns:imaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging"
xmlns:vsimagecatalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog"
xmlns:wpf="clr-namespace:SonarLint.VisualStudio.Core.WPF;assembly=SonarLint.VisualStudio.Core"
xmlns:ui="clr-namespace:SonarLint.VisualStudio.ConnectedMode.UI"
Title="{x:Static res:UiResources.ManageConnectionsDialogTitle}"
Expand All @@ -19,6 +17,8 @@
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 @@ -103,9 +103,12 @@
<ColumnDefinition Width="Auto" />
</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" />
<Button Grid.Column="0" Style="{StaticResource IconButtonStyle}"
ToolTip="{x:Static res:UiResources.EditConnectionToolTip}"
Click="EditConnection_Clicked">
<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>