Skip to content

Commit 9de1cac

Browse files
committed
Packages: Manage button uses a neutral secondary style
1 parent 8c98793 commit 9de1cac

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

src/BasisPM.App/Styles/BasisTheme.axaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,27 @@
216216
<Setter Property="TextElement.Foreground" Value="#FFFFFF"/>
217217
</Style>
218218

219+
<!-- Secondary action: a calm, filled neutral button for already-handled states such as the
220+
"Manage" menu on an installed package. Has the presence of a primary button without the
221+
brand-red that reads as either the main CTA or a destructive action. -->
222+
<Style Selector="Button.secondary">
223+
<Setter Property="Background" Value="{StaticResource BasisSurfaceBrush}"/>
224+
<Setter Property="Foreground" Value="{StaticResource BasisTextPrimaryBrush}"/>
225+
<Setter Property="BorderBrush" Value="{StaticResource BasisBorderStrongBrush}"/>
226+
</Style>
227+
228+
<Style Selector="Button.secondary:pointerover /template/ ContentPresenter">
229+
<Setter Property="Background" Value="{StaticResource BasisSurfaceHoverBrush}"/>
230+
<Setter Property="BorderBrush" Value="{StaticResource BasisBrandBrush}"/>
231+
<Setter Property="TextElement.Foreground" Value="{StaticResource BasisTextPrimaryBrush}"/>
232+
</Style>
233+
234+
<Style Selector="Button.secondary:pressed /template/ ContentPresenter">
235+
<Setter Property="Background" Value="{StaticResource BasisSurfaceMutedBrush}"/>
236+
<Setter Property="BorderBrush" Value="{StaticResource BasisBrandBrush}"/>
237+
<Setter Property="TextElement.Foreground" Value="{StaticResource BasisTextPrimaryBrush}"/>
238+
</Style>
239+
219240
<Style Selector="Button.cta">
220241
<Setter Property="Background" Value="{StaticResource BasisBrandGradient}"/>
221242
<Setter Property="Foreground" Value="#FFFFFF"/>

src/BasisPM.App/Views/PackagesView.axaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
IsVisible="{Binding !IsInstalled}"
114114
Command="{Binding #Root.((vm:PackagesViewModel)DataContext).InstallCommand}"
115115
CommandParameter="{Binding Entry}"/>
116-
<Button Content="{loc:Tr packages.button.manage}" Classes="primary" HorizontalAlignment="Stretch"
116+
<Button Content="{loc:Tr packages.button.manage}" Classes="secondary" HorizontalAlignment="Stretch"
117117
IsVisible="{Binding IsInstalled}" Click="OnManageClick"/>
118118
</StackPanel>
119119
</Grid>
@@ -166,7 +166,7 @@
166166
IsVisible="{Binding !IsInstalled}"
167167
Command="{Binding #Root.((vm:PackagesViewModel)DataContext).InstallCommand}"
168168
CommandParameter="{Binding Entry}"/>
169-
<Button Content="{loc:Tr packages.button.manage}" Classes="primary" HorizontalAlignment="Stretch"
169+
<Button Content="{loc:Tr packages.button.manage}" Classes="secondary" HorizontalAlignment="Stretch"
170170
IsVisible="{Binding IsInstalled}" Click="OnManageClick"/>
171171
</StackPanel>
172172
</Border>

0 commit comments

Comments
 (0)