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

Commit 98b9f33

Browse files
committed
Fix spinner usage
1 parent 7af6a01 commit 98b9f33

File tree

5 files changed

+58
-57
lines changed

5 files changed

+58
-57
lines changed
Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
<UserControl
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers"
7-
mc:Ignorable="d"
8-
x:Class="GitHub.VisualStudio.UI.Views.Controls.Spinner"
9-
d:DesignWidth="24" d:DesignHeight="24">
10-
<UserControl.Resources>
11-
<ResourceDictionary>
12-
<ResourceDictionary.MergedDictionaries>
13-
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
14-
</ResourceDictionary.MergedDictionaries>
15-
</ResourceDictionary>
16-
</UserControl.Resources>
17-
<Viewbox>
18-
<ProgressBar Style="{DynamicResource GitHubSyncProgressBar}"
19-
IsIndeterminate="True"/>
20-
</Viewbox>
1+
<UserControl x:Class="GitHub.UI.Controls.Spinner"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
d:DesignHeight="24"
7+
d:DesignWidth="24"
8+
mc:Ignorable="d">
9+
<Viewbox>
10+
<ProgressBar IsIndeterminate="True" Style="{DynamicResource GitHubSyncProgressBar}" />
11+
</Viewbox>
2112
</UserControl>

src/GitHub.UI/Controls/Spinner.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Windows.Controls;
22

3-
namespace GitHub.VisualStudio.UI.Views.Controls
3+
namespace GitHub.UI.Controls
44
{
55
public partial class Spinner : UserControl
66
{

src/GitHub.UI/GitHub.UI.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
<DesignTime>True</DesignTime>
8686
<DependentUpon>OcticonPaths.resx</DependentUpon>
8787
</Compile>
88+
<Compile Include="Controls\Spinner.xaml.cs">
89+
<DependentUpon>Spinner.xaml</DependentUpon>
90+
</Compile>
8891
<Compile Include="Converters\CountToVisibilityConverter.cs" />
8992
<Compile Include="Converters\DefaultValueConverter.cs" />
9093
<Compile Include="Converters\StickieListItemConverter.cs" />
@@ -202,6 +205,10 @@
202205
<Generator>MSBuild:Compile</Generator>
203206
<SubType>Designer</SubType>
204207
</Page>
208+
<Page Include="Controls\Spinner.xaml">
209+
<Generator>MSBuild:Compile</Generator>
210+
<SubType>Designer</SubType>
211+
</Page>
205212
<Page Include="Controls\ToggleButtons\OcticonCircleToggleButton.xaml">
206213
<Generator>MSBuild:Compile</Generator>
207214
<SubType>Designer</SubType>

src/GitHub.VisualStudio/GitHub.VisualStudio.csproj

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,6 @@
244244
<Compile Include="PkgCmdID.cs" />
245245
<Compile Include="Services\UIProvider.cs" />
246246
<Compile Include="UI\GitHubPane.cs" />
247-
<Compile Include="UI\Views\Controls\Spinner.xaml.cs">
248-
<DependentUpon>Spinner.xaml</DependentUpon>
249-
</Compile>
250247
<Compile Include="UI\Views\Controls\GistCreationControl.xaml.cs">
251248
<DependentUpon>GistCreationControl.xaml</DependentUpon>
252249
</Compile>
@@ -411,10 +408,6 @@
411408
<Generator>MSBuild:Compile</Generator>
412409
<SubType>Designer</SubType>
413410
</Page>
414-
<Page Include="UI\Views\Controls\Spinner.xaml">
415-
<SubType>Designer</SubType>
416-
<Generator>MSBuild:Compile</Generator>
417-
</Page>
418411
<Page Include="UI\Views\Controls\GistCreationControl.xaml">
419412
<SubType>Designer</SubType>
420413
<Generator>MSBuild:Compile</Generator>
Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,41 @@
11
<pfui:DialogWindow x:Class="GitHub.VisualStudio.UI.WindowController"
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:local="clr-namespace:GitHub.VisualStudio.UI.Views"
7-
xmlns:ctl="clr-namespace:GitHub.VisualStudio.UI.Views.Controls"
8-
xmlns:pfui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
9-
mc:Ignorable="d"
10-
Title="GitHub"
11-
Height="440"
12-
Width="414"
13-
MinHeight="440"
14-
MinWidth="414"
15-
HasMinimizeButton="False"
16-
HasMaximizeButton="False"
17-
Background="White"
18-
FontFamily="Segoe UI"
19-
FontSize="12"
20-
FontStretch="Normal"
21-
FontStyle="Normal"
22-
FontWeight="Normal"
23-
SnapsToDevicePixels="True"
24-
UseLayoutRounding="True">
25-
<Grid x:Name="Container">
26-
<ctl:Spinner HorizontalAlignment="Center"
27-
VerticalAlignment="Center"
28-
Width="48"
29-
Height="48"/>
30-
</Grid>
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:cache="clr-namespace:GitHub.VisualStudio.Helpers"
5+
xmlns:ctl="clr-namespace:GitHub.UI.Controls;assembly=GitHub.UI"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:local="clr-namespace:GitHub.VisualStudio.UI.Views"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
xmlns:pfui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
10+
Title="GitHub"
11+
Width="414"
12+
Height="440"
13+
MinWidth="414"
14+
MinHeight="440"
15+
Background="White"
16+
FontFamily="Segoe UI"
17+
FontSize="12"
18+
FontStretch="Normal"
19+
FontStyle="Normal"
20+
FontWeight="Normal"
21+
HasMaximizeButton="False"
22+
HasMinimizeButton="False"
23+
SnapsToDevicePixels="True"
24+
UseLayoutRounding="True"
25+
mc:Ignorable="d">
26+
27+
<pfui:DialogWindow.Resources>
28+
<ResourceDictionary>
29+
<ResourceDictionary.MergedDictionaries>
30+
<cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
31+
</ResourceDictionary.MergedDictionaries>
32+
</ResourceDictionary>
33+
</pfui:DialogWindow.Resources>
34+
35+
<Grid x:Name="Container">
36+
<ctl:Spinner Width="48"
37+
Height="48"
38+
HorizontalAlignment="Center"
39+
VerticalAlignment="Center" />
40+
</Grid>
3141
</pfui:DialogWindow>

0 commit comments

Comments
 (0)