8000 Use Visual Studio colors and styles for all dialogs by jcansdale · Pull Request #2261 · github/VisualStudio · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Use Visual Studio colors and styles for all dialogs #2261

Merged
merged 70 commits into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
5d7c1f0
Use ThemedDialogButtonStyle instead of OcticonCircleButton
jcansdale Mar 5, 2019
daa966f
Use ThemedDialogButtonStyleKey on create Gist dialog
jcansdale Mar 5, 2019
04a700e
Merge branch 'master' into fixes/dialog-style-guide
jcansdale Mar 5, 2019
8111e71
Use built in button style for Login/2FA
jcansdale Mar 6, 2019
2da00aa
Use built in button style when creating a repository
jcansdale Mar 6, 2019
63a1fcc
Use built in button style for LogOutRequiredView
jcansdale Mar 6, 2019
d852ba0
Remove OcticonCircleButton and OcticonCircleToggleButton
jcansdale Mar 6, 2019
e337ca6
Add styles for repository clone view
jcansdale Mar 6, 2019
96991cf
Use ThemedDialogDefaultStylesKey in GitHubDialogWindow
jcansdale Mar 7, 2019
17db4ae
Set themed Background/Foreground in GitHubDialogWindow 8000
jcansdale Mar 7, 2019
0894f1e
Fix RepositoryCreationView Label and CheckBox
jcansdale Mar 7, 2019
a65cdf2
Don't default Label Foreground to GHTextBrush
jcansdale Mar 7, 2019
82293ef
Theme FilteredComboBox and PromptTextBox
jcansdale Mar 7, 2019
ef67f78
Use VsResourceKeys for resource names
jcansdale Mar 8, 2019
263f93e
Add DesignTimeResources to GitHub.VisualStudio.UI
jcansdale Mar 8, 2019
eb36595
Merge ThemedDialogDefaultStylesKey into View
jcansdale Mar 8, 2019
063f4f4
Use ThemedDialogTextBoxStyleKey for path TextBox
jcansdale Mar 8, 2019
3dd1444
Import ThemedDialogDefaultStylesKey in GitHubDialogWindow
jcansdale Mar 8, 2019
0276471
Don't explicitly reference styles in view bodies
jcansdale Mar 11, 2019
379c123
Move ComboBox styles out of separate ResourceDictionary
jcansdale Mar 11, 2019
fc81f66
Fix TextBlock colors
jcansdale Mar 11, 2019
ddb4758
Fix CheckBox padding
jcansdale Mar 11, 2019
d306ddf
Fix sign up hyperlink color
jcansdale Mar 11, 2019
5df6e89
Fix font sizes for login
jcansdale Mar 11, 2019
6288df2
Factor out dialog styles into VsDialog.xaml
jcansdale Mar 12, 2019
c761cb7
Add a VS themed LightModalViewTabControl
jcansdale Mar 12, 2019
b822f6e
Use VS style for ForkRepository views
jcansdale Mar 12, 2019
95b473f
Move styling for dialogs to DialogStyles.xaml
jcansdale Mar 13, 2019
b67255a
Fix vertical alignment on Path textbox
jcansdale Mar 13, 2019
19379ff
Set GitHubAccentBrush to TextBoxBorderFocusedColorKey
jcansdale Mar 13, 2019
904a0b2
Add design time previewing of VS styles and colors
jcansdale Mar 14, 2019
63709c7
Merge branch 'devops/VS-themes-in-designer' into fixes/dialog-style-g…
jcansdale Mar 14, 2019
c7a6659
Fix color theme references
jcansdale Mar 14, 2019
60d4ef6
Preview using Dark theme in designer
jcansdale Mar 14, 2019
7f28aba
Fix PromptTextBox and SecurePasswordBox
jcansdale Mar 14, 2019
4e20b0f
Use EnvironmentColors instead of VsBrush
jcansdale Mar 14, 2019
6b0e30b
Add missing xmlns
jcansdale Mar 15, 2019
f3a25a6
Set the design time color theme in one place
jcansdale Mar 15, 2019
51ff7bd
Set the back/forground colors for GitHub pane views
jcansdale Mar 15, 2019
047c192
Use GitHubAccentBrush for GitHubProgressBar Foreground
jcansdale Mar 15, 2019
66e5dae
Make InfoPanel image same color as text
jcansdale Mar 15, 2019
2130ed1
Fix the HorizontalShadowDivider theme
jcansdale Mar 15, 2019
ae16d09
Remove use of legacy TextBlocks.xaml
jcansdale Mar 15, 2019
425377d
Remove legacy buttons
jcansdale Mar 15, 2019
a7410a9
Remove LightListBox.xaml
jcansdale Mar 15, 2019
44c10d2
Remove legacy LightModalViewTabControl
jcansdale Mar 15, 2019
2d44d02
Remove dependency on GitHub.UI
jcansdale Mar 15, 2019
715d4c9
Remove legacy RoundedCheckBox
jcansdale Mar 15, 2019
9105615
Fix CI build
jcansdale Mar 18, 2019
fd8b814
Fix previewing of text boxes in designer
jcansdale Mar 18, 2019
a5cd0b2
Add ThemedDialogDefaultStylesKey while testing TwoFactorInputTests
jcansdale Mar 18, 2019
e74eabc 8000
Make work in designer and runtime
jcansdale Mar 18, 2019
d1e6cf0
Style FilterTextBox for VS
jcansdale Mar 18, 2019
f637813
Fix clear filter label color
jcansdale Mar 19, 2019
c17c2fd
Use blue rather than yellow for accent brush
jcansdale Mar 19, 2019
c194acc
Fix OcticonButton and InfoPanel
jcansdale Mar 20, 2019
76e4bbd
Remove obsolete OcticonLinkButton
jcansdale Mar 20, 2019
b063ca9
Use built in ComboBox for RepositoryCreactionView
jcansdale Mar 20, 2019
14f0070
Fix Home hyperlink style
jcansdale Mar 20, 2019
6c0ae65
Fix checks details link style
jcansdale Mar 20, 2019
199652b
Attempt to fix hyperlink styles
jcansdale Mar 21, 2019
493ed04
Fix paragraph and selected text colors for markdown
jcansdale Mar 21, 2019
a29b006
Use themed color for CodeStyleKey/CodeBlockStyleKey
jcansdale Mar 21, 2019
eca53f6
Fix the pull request list item background
jcansdale Mar 22, 2019
bb93e21
Fix hyperlink styles
jcansdale Mar 22, 2019
67f349d
Stop using GitHubBlueLinkButton
jcansdale Mar 22, 2019
89c6302
Merge branch 'master' into fixes/dialog-style-guide
StanleyGoldman Mar 26, 2019
cd7aea5
Eneble theme detection when outside VS
jcansdale Apr 1, 2019
a4bc6b9
Merge branch 'jcansdale/theme-detection-outside-vs' into fixes/dialog…
jcansdale Apr 1, 2019
0ff1064
Merge branch 'master' into fixes/dialog-style-guide
jcansdale Apr 4, 2019
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
2 changes: 0 additions & 2 deletions src/GitHub.UI/Assets/Buttons.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@
-->

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Controls/Buttons/OcticonCircleButton.xaml" />
<ResourceDictionary Source="../Controls/Buttons/OcticonLinkButton.xaml" />
<ResourceDictionary Source="../Controls/Buttons/OcticonButton.xaml" />
<ResourceDictionary Source="../Controls/ToggleButtons/OcticonCircleToggleButton.xaml" />
<ResourceDictionary Source="../Controls/ToggleButtons/OcticonLinkToggleButton.xaml" />
</ResourceDictionary.MergedDictionaries>

Expand Down
7 changes: 0 additions & 7 deletions src/GitHub.UI/Assets/TextBlocks.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,6 @@
<Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource GitHubPasswordBox}" />
<!-- End PasswordBox -->

<!-- Label -->
<Style x:Key="GitHubLabel" TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{DynamicResource GHTextBrush}" />
</Style>
<Style TargetType="{x:Type Label}" BasedOn="{StaticResource GitHubLabel}" />
<!-- End Label -->

<!-- Textblock -->
<Style x:Key="GitHubTextBlock" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource GHTextBrush}" />
Expand Down
76 changes: 0 additions & 76 deletions src/GitHub.UI/Controls/Buttons/OcticonCircleButton.cs

This file was deleted.

298 changes: 0 additions & 298 deletions src/GitHub.UI/Controls/Buttons/OcticonCircleButton.xaml

This file was deleted.

26 changes: 0 additions & 26 deletions src/GitHub.UI/Controls/ToggleButtons/OcticonCircleToggleButton.cs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public abstract class OcticonToggleButton: ToggleButton
);

public static readonly DependencyProperty IconRotationAngleProperty =
OcticonCircleButton.IconRotationAngleProperty.AddOwner(typeof(OcticonToggleButton));
OcticonButton.IconRotationAngleProperty.AddOwner(typeof(OcticonToggleButton));

public Octicon IconChecked
{
Expand Down
9 changes: 9 additions & 0 deletions src/GitHub.VisualStudio.UI/GitHub.VisualStudio.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@
<DependentUpon>NoRemoteOriginView.xaml</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</Page>
</ItemGroup>

</Project>
11 changes: 11 additions & 0 deletions src/GitHub.VisualStudio.UI/Properties/DesignTimeResources.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/20 F438 06/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/VsColorsBlue.xaml" />
<ResourceDictionary Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/VsBrushesBlue.xaml" />
<ResourceDictionary Source="pack://application:,,,/GitHub.VisualStudio.UI;component/Styles/ThemeBlue.xaml" />
</ResourceDictionary.MergedDictionaries>

</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:GitHub.VisualStudio.Views.Dialog.Clone"
xmlns:uic="clr-namespace:GitHub.VisualStudio.UI.Controls"
xmlns:ui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
Background="{DynamicResource VsBrush.Window}"
mc:Ignorable="d" d:DesignHeight="414" d:DesignWidth="440">
<d:DesignData.DataContext>
<ghfvs:RepositoryCloneViewModelDesigner/>
Expand All @@ -14,32 +16,34 @@
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>

<Style TargetType="{x:Type TextBox}"
BasedOn="{StaticResource {x:Static ui:VsResourceKeys.ThemedDialogTextBoxStyleKey}}" />
</ResourceDictionary>
</UserControl.Resources>

<DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<ghfvs:OcticonCircleButton
Margin="12"
HorizontalAlignment="Center"
Icon="check"
IsDefault="True"
Command="{Binding Clone}"
Content="Clone"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.CloneRepositoryButton}"/>
<Button
Margin="12"
HorizontalAlignment="Center"
IsDefault="True"
Command="{Binding Clone}"
Content="Clone"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.CloneRepositoryButton}"/>

<ghfvs:OcticonCircleButton
Margin="12"
HorizontalAlignment="Center"
Icon="check"
IsDefault="True"
Command="{Binding Open}"
Content="Open"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.OpenRepositoryButton}"/>
<Button
Margin="12"
HorizontalAlignment="Center"
IsDefault="True"
Command="{Binding Open}"
Content="Open"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.OpenRepositoryButton}"/>
</StackPanel>

<DockPanel DockPanel.Dock="Bottom"
Expand Down
9 changes: 5 additions & 4 deletions src/GitHub.VisualStudio.UI/Views/Dialog/GistCreationView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
mc:Ignorable="d"
d:DesignWidth="414"
d:DesignHeight="440"
xmlns:ui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.GistCreationControlCustom}">
<Control.Resources>
<ResourceDictionary>
Expand All @@ -20,15 +21,15 @@
<DockPanel Style="{DynamicResource DialogContainerDockPanel}">
<ghfvs:OcticonImage Icon="logo_github" Style="{DynamicResource GitHubLogo}" Margin="0,10,0,-10" Panel.ZIndex="100" DockPanel.Dock="Top" />

<ghfvs:OcticonCircleButton
<Button
Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogButtonStyleKey}}"
DockPanel.Dock="Bottom"
IsDefault="True"
Margin="0"
x:Name="createGistButton"
HorizontalAlignment="Center"
Icon="check">
<TextBlock Text="{x:Static ghfvs:Resources.CreateLink}"/>
</ghfvs:OcticonCircleButton>
Content="{x:Static ghfvs:Resources.CreateLink}">
</Button>

<StackPanel>
<ghfvs:HorizontalShadowDivider />
Expand Down
19 changes: 12 additions & 7 deletions src/GitHub.VisualStudio.UI/Views/Dialog/GitHubDialogWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Height="460"
MinWidth="414"
MinHeight="460"
Background="White"
Background="{DynamicResource VsBrush.Window}"
FontFamily="Segoe UI"
FontSize="12"
FontStretch="Normal"
Expand All @@ -24,10 +24,15 @@
UseLayoutRounding="True"
WindowStartupLocation="CenterOwner"
Content="{Binding Content}">
<Window.Resources>
<local:ViewLocator x:Key="viewLocator"/>
<DataTemplate DataType="{x:Type ghfvs:ViewModelBase}">
<ContentControl Content="{Binding Converter={StaticResource viewLocator}}"/>
</DataTemplate>
</Window.Resources>
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
</ResourceDictionary.MergedDictionaries>
<local:ViewLocator x:Key="viewLocator"/>
<DataTemplate DataType="{x:Type ghfvs:ViewModelBase}">
<ContentControl Content="{Binding Converter={StaticResource viewLocator}}"/>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
</pfui:DialogWindow>
15 changes: 8 additions & 7 deletions src/GitHub.VisualStudio.UI/Views/Dialog/LogOutRequiredView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ghfvs="https://github.com/github/VisualStudio"
xmlns:prop="clr-namespace:GitHub.VisualStudio.UI;assembly=GitHub.VisualStudio.UI"
xmlns:ui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">

<Control.Resources>
Expand All @@ -30,13 +31,13 @@
FontSize="16"
Content="You need to sign out and back in." />

<ghfvs:OcticonCircleButton DockPanel.Dock="Bottom"
Command="{Binding LogOut}"
Content="Sign out"
Icon="check"
IsDefault="True"
Margin="0 16"
HorizontalAlignment="Center"/>
<Button Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogButtonStyleKey}}"
DockPanel.Dock="Bottom"
Command="{Binding LogOut}"
Content="Sign out"
IsDefault="True"
Margin="0 16"
HorizontalAlignment="Center"/>

<TextBlock TextWrapping="Wrap"
TextAlignment="Center"
Expand Down
13 changes: 7 additions & 6 deletions src/GitHub.VisualStudio.UI/Views/Dialog/Login2FaView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
d:DesignWidth="414"
d:DesignHeight="440"
Style="{DynamicResource DialogUserControl}"
xmlns:ui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TwoFactorAuthenticationCustom}" >

<Control.Resources>
Expand Down Expand Up @@ -66,19 +67,19 @@
Orientation="Horizontal"
HorizontalAlignment="Center"
Margin="0,18,0,60">
<ghfvs:OcticonCircleButton
x:Name="okButton"
TabIndex="2"
Icon="check"
<Button
Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogButtonStyleKey}}"
x:Name="okButton"
TabIndex="2"
IsDefault="True"
Content="{x:Static ghfvs:Resources.verifyText}"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TwoFactorAuthenticatonVerifyButton}" />
<ghfvs:OcticonLinkButton
<Button
Style="{DynamicResource {x:Static ui:VsResourceKeys.ThemedDialogButtonStyleKey}}"
x:Name="resendCodeButton"
TabIndex="3"
ToolTip="{x:Static ghfvs:Resources.resendCodeButtonToolTip}"
FontSize="12"
Icon="sync"
Margin="18,0,0,0"
Content="{x:Static ghfvs:Resources.resendCodeButtonContent}" />
</StackPanel>
Expand Down
Loading
0