New template style for buttons to mimic the web.
authorGeorge Pantazis <gpant@noc.grnet.gr>
Tue, 3 Jul 2012 10:16:48 +0000 (13:16 +0300)
committerGeorge Pantazis <gpant@noc.grnet.gr>
Tue, 3 Jul 2012 10:16:48 +0000 (13:16 +0300)
Fixed issues in advanced tab in PreferencesView.xaml

Signed-off-by: George Pantazis <gpant@noc.grnet.gr>

trunk/Pithos.Client.WPF/PithosStyles.xaml
trunk/Pithos.Client.WPF/Preferences/AddAccountView.xaml
trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml
trunk/Pithos.Client.WPF/Properties/AssemblyInfo.cs

index c34df47..980fd53 100644 (file)
@@ -6,10 +6,40 @@
         <Setter Property="Height" Value="25"/>
         <Setter Property="Width" Value="75" />
         <Setter Property="Padding" Value="3"/>
-        <Setter Property="Background" Value="Gray" />
+        <Setter Property="Background" Value="#3582ac" />
         <Setter Property="BorderBrush" Value="White" />
     </Style>
-    
+
+    <Style x:Key="BorderlessButton" TargetType="{x:Type Button}">
+        <Setter Property="Background" Value="#3582ac" />
+        <Setter Property="Height" Value="23" />
+        <Setter Property="Width" Value="100" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type Button}">
+                    <Border Name="border" Background="{TemplateBinding Background}">
+                        <ContentPresenter Name="content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+                         VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter Property="Background" Value="Transparent"/>
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter Property="Background" Value="#f89a1c" />
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="True">
+                            <Setter Property="Background" Value="#f89a1c" />                            
+                        </Trigger>
+                        <Trigger Property="IsFocused" Value="True">
+                            <Setter Property="Background" Value="#f89a1c" />                            
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
     <Style TargetType="Grid" >
         <Setter Property="Background" Value="White" />
     </Style>
index 8290bad..daf8218 100644 (file)
     </Window.Resources>
     <extToolkit:Wizard FinishButtonClosesWindow="True" Name="AccountWizard" PageChanged="AccountWizard_PageChanged" HelpButtonVisibility="Collapsed">
         <extToolkit:WizardPage x:Name="IntroPage" 
-                                   Title="Add new Pithos Account"
-                                   Description="This Wizard will walk you through adding a new Pithos account and retrieving an authentication token" 
+                                   Title="Setup your Pithos Account"
+                                   Description="This wizard will walk you through in setting up your Pithos account and retrieving an authentication token." 
+                               
                                BackButtonVisibility="Collapsed"
-                               FinishButtonVisibility="Collapsed"
-                               />
+                               FinishButtonVisibility="Collapsed">
+            <extToolkit:WizardPage.ExteriorPanelBackground>
+                <ImageBrush ImageSource="/PithosPlus;component/Images/pithos_logo-icon.ico" Stretch="Uniform" TileMode="None" />
+            </extToolkit:WizardPage.ExteriorPanelBackground>
+        </extToolkit:WizardPage>
         <extToolkit:WizardPage x:Name="ChooseServer" PageType="Interior"
                                    Title="Where do you want to connect?"
                                    Description="You can connect to the production or development server, or enter your own server URL"                               
index db79c06..2f4ff39 100644 (file)
@@ -90,8 +90,8 @@
                                 <ColumnDefinition Width="50*"/>
                                 <ColumnDefinition Width="50*"/>
                             </Grid.ColumnDefinitions>
-                            <Button Name="AddAccount" Grid.Column="0"  Content="Add" ToolTip="Enter account details manually" Style="{StaticResource ButtonStyle}" HorizontalAlignment="Center" Margin="5,10,40,10" Width="75"/>
-                            <Button Name="RemoveAccount" Grid.Column="1"  Content="Remove" Style="{StaticResource ButtonStyle}" HorizontalAlignment="Center" Margin="5,10,-25,10" Width="75"/>
+                            <Button Name="AddAccount" Grid.Column="0"  Content="Add" ToolTip="Enter account details manually" Style="{StaticResource BorderlessButton}" HorizontalAlignment="Center" Width="100"/>
+                            <Button Name="RemoveAccount" Grid.Column="1"  Content="Remove" Style="{StaticResource BorderlessButton}" HorizontalAlignment="Center" Width="100"/>
                         </Grid>
                     </Grid>
                     <GroupBox Header="Account" Padding="5" Margin="5" Height="231" HorizontalAlignment="Stretch" VerticalAlignment="Top" Grid.Column="1" Visibility="{Binding Path=CurrentAccount, Converter={StaticResource NullToVisible},ConverterParameter='Invert'}"
                             <CheckBox Name="CurrentAccount_IsActive" Content="Account is Active" Grid.Row="6"  Grid.Column="1"  />
                             <CheckBox Name="CurrentAccount_SelectiveSyncEnabled" Content="Selective Sync Enabled" Grid.Row="7" Grid.Column="1"/>
                             <StackPanel Orientation="Horizontal" Grid.Row="8" Grid.Column="1">
-                                <Button Name="SelectiveSyncFolders" Width="100" Style="{StaticResource ButtonStyle}" Content="Selective Sync" />
-                                <Button Name="MoveAccountFolder" Content="Move ..." Width="100" Style="{StaticResource ButtonStyle}" Margin="20,5,5,5" Visibility="Hidden"/>
-                                <Button Name="ClearAccountCache" Content="Clear Cache" Width="100" Style="{StaticResource ButtonStyle}"/>
+                                <Button Name="SelectiveSyncFolders" Width="100" Style="{StaticResource BorderlessButton}" Content="Selective Sync" />
+                                <Button Name="MoveAccountFolder" Content="Move ..." Width="100" Style="{StaticResource BorderlessButton}" Margin="20,5,5,5" Visibility="Hidden"/>
+                                <Button Name="ClearAccountCache" Content="Clear Cache" Width="100" Style="{StaticResource BorderlessButton}"/>
                             </StackPanel>
                         </Grid>
                         
                     </StackPanel>
                 </TabItem.Header>
                 <WrapPanel Orientation="Vertical">
-                    <Button Content="Refresh Overlays" Name="RefreshOverlays" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto" />
-                    <TextBlock Text="Polling Interval (secs)" Margin="5"/>
-                    <extToolkit:IntegerUpDown x:Name="Settings_PollingInterval" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter seconds" Minimum="1" />                    
-                    <TextBlock Text="Hashing Parallelism" Margin="5"/>
-                    <extToolkit:IntegerUpDown x:Name="Settings_HashingParallelism" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter number of tasks" Minimum="1" />                    
-                    <TextBlock Text="Startup Delay (minutes)" Margin="5"/>
-                    <extToolkit:IntegerUpDown x:Name="StartupDelay" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter number of tasks" Minimum="0" />
+                    <GroupBox Header="Settings">
+                        <StackPanel Margin="5">
+                            <TextBlock Text="Polling Interval (Seconds)" Margin="5"/>
+                            <extToolkit:IntegerUpDown x:Name="Settings_PollingInterval" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter seconds" Minimum="1" />                    
+                            <TextBlock Text="Hashing Parallelism" Margin="5"/>
+                            <extToolkit:IntegerUpDown x:Name="Settings_HashingParallelism" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter number of tasks" Minimum="1" />                    
+                            <TextBlock Text="Startup Delay (Minutes)" Margin="5"/>
+                            <extToolkit:IntegerUpDown x:Name="StartupDelay" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter number of tasks" Minimum="0" />
+                        </StackPanel>
+                    </GroupBox>
                     <GroupBox Header="Logging">
                         <StackPanel Margin="5">
-                        <CheckBox Content="Enable Debug Logging" Height="16" HorizontalAlignment="Left" Margin="5,10,5,5" Name="DebugLoggingEnabled" VerticalAlignment="Top"/>
-                        <Button x:Name="OpenLogPath" Content="Open Log Path" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto"/>
-                        <Button x:Name="OpenLogConsole" Content="Open Log Console" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto" Visibility="Collapsed"/>
-                        <CheckBox Content="Ignore Certificate Errors" Height="16" HorizontalAlignment="Left" Margin="5,10,5,5" Name="IgnoreCertificateErrors" VerticalAlignment="Top"/>
+                            <CheckBox Content="Debug Logging" Height="16" HorizontalAlignment="Left" Margin="5,10,5,5" Name="DebugLoggingEnabled" VerticalAlignment="Top"/>
+                            <Button x:Name="OpenLogPath" Content="Log Folder" HorizontalAlignment="Left" Margin="5" Style="{StaticResource BorderlessButton}" />
+                            <Button x:Name="OpenLogConsole" Content="Open Log Console" HorizontalAlignment="Left" Margin="5" Style="{StaticResource BorderlessButton}" Width="Auto" Visibility="Collapsed"/>
+                            <CheckBox Content="Ignore Certificates" Height="16" Foreground="Red" HorizontalAlignment="Left" Margin="5,10,5,5" Name="IgnoreCertificateErrors" VerticalAlignment="Top"/>
                         </StackPanel>
                     </GroupBox>
+                    <Button Content="Refresh Overlays" Name="RefreshOverlays" HorizontalAlignment="Left" Margin="5" Style="{StaticResource BorderlessButton}" />
                 </WrapPanel>
             </TabItem>
         </TabControl>
 
-        <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right">
-            <Button Name="SaveChanges" Content="OK" Margin="5,5,10,5" Style="{StaticResource ButtonStyle}"/>
-            <Button Name="RejectChanges" Content="Cancel" Margin="5,5,10,5" Style="{StaticResource ButtonStyle}"/>
-            <Button Name="ApplyChanges" Content="Apply" Style="{StaticResource ButtonStyle}" />
+        <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="2">
+            <Button Name="SaveChanges" Content="OK" Margin="5,5,10,5" Style="{StaticResource BorderlessButton}"/>
+            <Button Name="RejectChanges" Content="Cancel" Margin="5,5,10,5" Style="{StaticResource BorderlessButton}"/>
+            <Button Name="ApplyChanges" Content="Apply" Style="{StaticResource BorderlessButton}" />
         </StackPanel>
     </Grid>
 </Window>
index 3f1ebdc..ad4ed4b 100644 (file)
@@ -93,5 +93,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.7.20702.8")]
-[assembly: AssemblyFileVersionAttribute("0.7.20702.8")]
+[assembly: AssemblyVersion("0.7.20703.1")]
+[assembly: AssemblyFileVersionAttribute("0.7.20703.1")]