Permalink
Browse files

Refactoring code and files to be more consistent.

  • Loading branch information...
kaisellgren committed Jun 17, 2012
1 parent 85704ce commit ea7d5db3c508151e240fcd3d914989a0addfbb99
View
@@ -4,31 +4,36 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
+ <!-- Generic styles. -->
<ResourceDictionary Source="Styles/Colors.xaml"/>
- <ResourceDictionary Source="Styles/TabItem.xaml"/>
+
+ <!-- WPF user controls. -->
+ <ResourceDictionary Source="Styles/Border.xaml"/>
+ <ResourceDictionary Source="Styles/Button.xaml"/>
+ <ResourceDictionary Source="Styles/ComboBox.xaml"/>
<ResourceDictionary Source="Styles/DataGrid.xaml"/>
+ <ResourceDictionary Source="Styles/GridSplitter.xaml"/>
+ <ResourceDictionary Source="Styles/TabItem.xaml"/>
<ResourceDictionary Source="Styles/LeftToolbar.xaml"/>
<ResourceDictionary Source="Styles/TopToolbar.xaml"/>
<ResourceDictionary Source="Styles/Window.xaml"/>
<ResourceDictionary Source="Styles/Panel.xaml"/>
- <ResourceDictionary Source="Styles/GridSplitter.xaml"/>
- <ResourceDictionary Source="Styles/DisplayTags.xaml"/>
- <ResourceDictionary Source="Styles/ChangesetHistoryDataGrid.xaml"/>
<ResourceDictionary Source="Styles/TreeView.xaml"/>
- <ResourceDictionary Source="Styles/Button.xaml"/>
<ResourceDictionary Source="Styles/SplitButton.xaml"/>
- <ResourceDictionary Source="Styles/NewTabList.xaml"/>
<ResourceDictionary Source="Styles/TextBlock.xaml"/>
- <ResourceDictionary Source="Templates/AppTabContentTemplate.xaml"/>
- <ResourceDictionary Source="Templates/AppTabItemTemplate.xaml"/>
- <ResourceDictionary Source="Templates/AppTabNew.xaml"/>
- <ResourceDictionary Source="Templates/AppTabNew.xaml"/>
<ResourceDictionary Source="Styles/Separator.xaml"/>
- <ResourceDictionary Source="Styles/Border.xaml"/>
- <ResourceDictionary Source="Styles/ComboBox.xaml"/>
<ResourceDictionary Source="Styles/TextBox.xaml"/>
<ResourceDictionary Source="Styles/Scrollbar.xaml"/>
- <ResourceDictionary Source="Templates/AppTabNewTemplate.xaml"/>
+
+ <!-- Custom user controls and elements. -->
+ <ResourceDictionary Source="Styles/NewTabList.xaml"/>
+ <ResourceDictionary Source="Styles/DisplayTags.xaml"/>
+ <ResourceDictionary Source="Styles/ChangesetHistoryDataGrid.xaml"/>
+
+ <ResourceDictionary Source="Templates/RepoTabContentTemplate.xaml"/>
+ <ResourceDictionary Source="Templates/RepoTabDashboardContentTemplate.xaml"/>
+ <ResourceDictionary Source="Templates/RepoTabTemplate.xaml"/>
+ <ResourceDictionary Source="Templates/RepoTabNewTemplate.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
View
@@ -155,31 +155,31 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
- <Compile Include="About.xaml.cs">
+ <Compile Include="Views\About.xaml.cs">
<DependentUpon>About.xaml</DependentUpon>
</Compile>
- <Compile Include="AppTabDataTemplateSelector.cs" />
- <Compile Include="BindableDoubleAnimation.cs" />
- <Compile Include="Configuration.cs" />
+ <Compile Include="TemplateSelectors\RepoTabContentTemplateSelector.cs" />
+ <Compile Include="Libraries\Animation\BindableDoubleAnimation.cs" />
+ <Compile Include="Libraries\Configuration.cs" />
<Compile Include="Converters\IsHeadToTextDecorationsConverter.cs" />
<Compile Include="Converters\ExtensionToImageConverter.cs" />
<Compile Include="Converters\IsHeadToFontWeightConverter.cs" />
<Compile Include="Converters\NullToVisibilityConverter.cs" />
<Compile Include="Converters\StatusGridGroupToColorConverter.cs" />
<Compile Include="Converters\StatusToCharacterConverter.cs" />
<Compile Include="Converters\StatusToColorConverter.cs" />
- <Compile Include="DelegateCommand.cs" />
- <Compile Include="Extensions.cs" />
+ <Compile Include="Libraries\DelegateCommand.cs" />
+ <Compile Include="Libraries\Extensions.cs" />
<Compile Include="Libraries\ChangesetGraph.cs" />
<Compile Include="Libraries\DateUtil.cs" />
<Compile Include="Libraries\FileUtil.cs" />
<Compile Include="Libraries\GenericUtil.cs" />
<Compile Include="Libraries\IconUtil.cs" />
<Compile Include="Libraries\RangedObservableCollection.cs" />
<Compile Include="Libraries\RepoUtil.cs" />
- <Compile Include="Libraries\TabTemplateSelector.cs" />
+ <Compile Include="TemplateSelectors\TabTemplateSelector.cs" />
<Compile Include="Libraries\UIHelper.cs" />
- <Compile Include="LinearGradientAnimation.cs" />
+ <Compile Include="Libraries\Animation\LinearGradientAnimation.cs" />
<Compile Include="Models\Branch.cs" />
<Compile Include="Models\DetachedHead.cs" />
<Compile Include="Models\RecentCommitMessage.cs" />
@@ -233,7 +233,7 @@
</Compile>
<Compile Include="ViewModels\MainWindowViewModel.cs" />
<DesignData Include="DesignData\SampleApplication.xaml" />
- <Page Include="About.xaml">
+ <Page Include="Views\About.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -249,7 +249,7 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="MainWindow.xaml">
+ <Page Include="Views\MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -258,7 +258,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="Models\Commit.cs" />
- <Compile Include="MainWindow.xaml.cs">
+ <Compile Include="Views\MainWindow.xaml.cs">
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
@@ -320,8 +320,9 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Templates\AppTabContentTemplate.xaml">
+ <Page Include="Templates\RepoTabContentTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
</Page>
<Page Include="Styles\DataGrid.xaml">
<Generator>MSBuild:Compile</Generator>
@@ -339,14 +340,17 @@
<Page Include="Styles\TopToolbar.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
- <Page Include="Templates\AppTabItemTemplate.xaml">
+ <Page Include="Templates\RepoTabTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
</Page>
- <Page Include="Templates\AppTabNew.xaml">
+ <Page Include="Templates\RepoTabDashboardContentTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
</Page>
- <Page Include="Templates\AppTabNewTemplate.xaml">
+ <Page Include="Templates\RepoTabNewTemplate.xaml">
<Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
</Page>
<Page Include="UserControls\ChangesetHistory.xaml">
<Generator>MSBuild:Compile</Generator>
@@ -2,7 +2,7 @@
using System.Windows;
using System.Windows.Media.Animation;
-namespace GG
+namespace GG.Libraries.Animation
{
public class BindableDoubleAnimation : DoubleAnimationBase
{
@@ -3,7 +3,7 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
-namespace GG
+namespace GG.Libraries.Animation
{
public class LinearGradientAnimation : AnimationTimeline
{
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Xml.Serialization;
-namespace GG
+namespace GG.Libraries
{
[XmlRoot("Configuration")]
public class Configuration
File renamed without changes.
File renamed without changes.
View
@@ -1,6 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GG"
+ xmlns:animation="clr-namespace:GG.Libraries.Animation"
xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
<LinearGradientBrush x:Key="ButtonNormalBrush" StartPoint="0,0" EndPoint="0,1">
@@ -37,6 +38,10 @@
<SolidColorBrush x:Key="ButtonNormalBorderBrush" Color="#666" />
+ <Style x:Key="ButtonContentPresenterStyle">
+ <Setter Property="Control.Foreground" Value="LightGray" />
+ </Style>
+
<Style TargetType="{x:Type Button}">
<Setter Property="Foreground" Value="#222" />
<Setter Property="Background" Value="{StaticResource ButtonNormalBrush}" />
@@ -46,7 +51,7 @@
<Border Name="OuterBorder" BorderThickness="1" BorderBrush="{StaticResource ButtonNormalBorderBrush}" CornerRadius="3" Background="{TemplateBinding Background}">
<Border Name="InnerBorder" BorderBrush="#55ffffff" BorderThickness="1" CornerRadius="3" Padding="6,4">
<Grid>
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="contentShadow" Style="{StaticResource ShadowStyle}">
+ <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="contentShadow" Style="{StaticResource ButtonContentPresenterStyle}">
<ContentPresenter.RenderTransform>
<TranslateTransform X="1.0" Y="1.0" />
</ContentPresenter.RenderTransform>
@@ -66,15 +71,15 @@
<BeginStoryboard x:Name="disabledStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonDisabledBrush}" />
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonDisabledBrush}" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
@@ -87,15 +92,15 @@
<Trigger.EnterActions>
<BeginStoryboard x:Name="mouseOverStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<StopStoryboard BeginStoryboardName="mouseUpStoryboard"/>
<BeginStoryboard x:Name="mouseLeaveStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
@@ -105,14 +110,14 @@
<Trigger.EnterActions>
<BeginStoryboard x:Name="mousePressedStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonPressedBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonPressedBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard x:Name="mouseUpStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
@@ -162,7 +167,7 @@
<ControlTemplate TargetType="Button">
<Border Name="border" BorderThickness="0,1,1,1" Padding="8,6" BorderBrush="#303030" CornerRadius="0" Background="{TemplateBinding Background}">
<Grid>
- <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="contentShadow" Style="{StaticResource ShadowStyle}">
+ <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Name="contentShadow" Style="{StaticResource ButtonContentPresenterStyle}">
<ContentPresenter.RenderTransform>
<TranslateTransform X="1.0" Y="1.0" />
</ContentPresenter.RenderTransform>
View
@@ -1,6 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:GG">
+ xmlns:local="clr-namespace:GG"
+ xmlns:animation="clr-namespace:GG.Libraries.Animation">
<LinearGradientBrush x:Key="PopupBackgroundNormalBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Color="#f8f8f8" Offset="0"/>
@@ -45,17 +46,17 @@
<Trigger.EnterActions>
<BeginStoryboard x:Name="mouseOverStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonMouseOverBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<StopStoryboard BeginStoryboardName="mouseUpStoryboard"/>
<BeginStoryboard x:Name="mouseLeaveStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
@@ -64,8 +65,8 @@
<Trigger.EnterActions>
<BeginStoryboard x:Name="mousePressedStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonPressedBrush}"/>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonPressedBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonPressedBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonPressedBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
@@ -75,8 +76,8 @@
<StopStoryboard BeginStoryboardName="mouseUpStoryboard"/>
<BeginStoryboard x:Name="mouseUpStoryboard">
<Storyboard>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
- <local:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="Border" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
+ <animation:LinearGradientAnimation Storyboard.TargetProperty="Background" Storyboard.TargetName="LeftBorder" Duration="0:0:0.2" To="{StaticResource ButtonNormalBrush}"/>
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
Oops, something went wrong.

0 comments on commit ea7d5db

Please sign in to comment.