Spark-520, 522, 528: Buttons in the ladder are better
This commit is contained in:
1 parent
fb76def8ce
commit
3e367eca59
5 files changed
+86
-63
No files matched your search
@@ -83,6 +83,8 @@ namespace mbts.ui
|
||||
public static ImageSource CancelSells { get { return (DrawingImage)_resources["CancelSells"]; } }
|
||||
public static ImageSource CancelSellsWhite { get { return (DrawingImage)_resources["CancelSellsWhite"]; } }
|
||||
public static ImageSource CancelSelected { get { return (DrawingImage)_resources["CancelSelected"]; } }
|
||||
public static ImageSource Cancel { get { return (DrawingImage)_resources["Cancel"]; } }
|
||||
public static ImageSource CancelWhite { get { return (DrawingImage)_resources["CancelWhite"]; } }
|
||||
|
||||
public static ImageSource ModifyOrder { get { return (DrawingImage)_resources["Pencil"]; } }
|
||||
public static ImageSource Clock { get { return (DrawingImage)_resources["Clock"]; } }
|
||||
|
||||
@@ -630,7 +630,7 @@ M0,0L63.999001,0 63.999001,48.792999 0,48.792999z">
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
|
||||
|
||||
<DrawingImage x:Key="CancelSelected">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
@@ -643,6 +643,30 @@ M0,0L63.999001,0 63.999001,48.792999 0,48.792999z">
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
|
||||
<DrawingImage x:Key="Cancel">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
<DrawingGroup.Children>
|
||||
<GeometryDrawing
|
||||
Brush="Black"
|
||||
Geometry="M 5.2851562 2.9003906 L 3.3007812 4.8847656 L 11.669922 13.253906 L 3.3007812 21.623047 L 5.2851562 23.607422 L 13.654297 15.238281 L 22.023438 23.607422 L 24.007812 21.623047 L 15.638672 13.253906 L 24.007812 4.8847656 L 22.023438 2.9003906 L 13.654297 11.269531 L 5.2851562 2.9003906 z" />
|
||||
</DrawingGroup.Children>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
|
||||
<DrawingImage x:Key="CancelWhite">
|
||||
<DrawingImage.Drawing>
|
||||
<DrawingGroup>
|
||||
<DrawingGroup.Children>
|
||||
<GeometryDrawing
|
||||
Brush="White"
|
||||
Geometry="M 5.2851562 2.9003906 L 3.3007812 4.8847656 L 11.669922 13.253906 L 3.3007812 21.623047 L 5.2851562 23.607422 L 13.654297 15.238281 L 22.023438 23.607422 L 24.007812 21.623047 L 15.638672 13.253906 L 24.007812 4.8847656 L 22.023438 2.9003906 L 13.654297 11.269531 L 5.2851562 2.9003906 z" />
|
||||
</DrawingGroup.Children>
|
||||
</DrawingGroup>
|
||||
</DrawingImage.Drawing>
|
||||
</DrawingImage>
|
||||
|
||||
<!-- Pin
|
||||
<Path Data="F1M3,11L3,7 0,7 0,6 1,6 1,1 1,0 6,0 6,1 6,6 7,6 7,7 4,7 4,11 3,11z M2,1L2,6 4,6 4,1 2,1z" />
|
||||
Unpin
|
||||
|
||||
@@ -415,12 +415,12 @@ namespace mbts.ui
|
||||
|
||||
// Normal
|
||||
public static BTSColor normal_background { get { return new BTSColor(0xe1); } }
|
||||
public static BTSColor normal_border { get { return accent1; } }
|
||||
public static BTSColor normal_border { get { return new BTSColor(0xAC); } }
|
||||
public static BTSColor normal_foreground { get { return UI.default_text; } }
|
||||
|
||||
// MouseOver
|
||||
public static BTSColor mouseover_background { get { return new BTSColor(0xcc); } }
|
||||
public static BTSColor mouseover_border { get { return normal_border; } }
|
||||
public static BTSColor mouseover_background { get { return new BTSColor(0xcb, 0xdc, 0xec); } }
|
||||
public static BTSColor mouseover_border { get { return new BTSColor(0x7E, 0xB4, 0xEA); } }
|
||||
public static BTSColor mouseover_foreground { get { return normal_foreground; } }
|
||||
|
||||
// Pressed
|
||||
|
||||
@@ -466,9 +466,35 @@
|
||||
|
||||
<!-- Default flat button style -->
|
||||
<Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="{x:Type Button}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AccentColor1}" />
|
||||
<Setter Property="BorderBrush" Value="{mbts:BTSColor UI.Button.normal_border}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Background" Value="{StaticResource Button.Static.BackgroundBrush}" />
|
||||
<Setter Property="Background" Value="{mbts:BTSColor UI.Button.normal_background}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Name="button_border"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{TemplateBinding Background}"
|
||||
Height="Auto"
|
||||
>
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Name="button_content"/>
|
||||
</Border>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="button_border" Property="Background" Value="{mbts:BTSColor UI.Button.mouseover_background}" />
|
||||
<Setter TargetName="button_border" Property="BorderBrush" Value="{mbts:BTSColor UI.Button.mouseover_border}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter TargetName="button_border" Property="Background" Value="{mbts:BTSColor UI.Button.pressed_background}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsDefault" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource AccentColor1}" />
|
||||
|
||||
@@ -23,80 +23,46 @@
|
||||
<Thickness Top="32" />
|
||||
</converters:BooleanToObjectConverter.ValueForFalse>
|
||||
</converters:BooleanToObjectConverter>
|
||||
<Style x:Key="LadderMenuButton" TargetType="Button">
|
||||
<Style x:Key="LadderMenuButton" TargetType="Button" BasedOn="{StaticResource CommonButton}">
|
||||
<Setter Property="Height" Value="28"/>
|
||||
<Setter Property="Padding" Value="6,3"/>
|
||||
<Setter Property="MinWidth" Value="0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
<Style x:Key="CancelBuys" TargetType="Button" BasedOn="{StaticResource LadderMenuButton}">
|
||||
<Setter Property="Background" Value="{mbts:BTSColor MarketData.bid}"/>
|
||||
<Setter Property="ToolTip" Value="Cancel Buys"/>
|
||||
<Setter Property="Content">
|
||||
<Setter.Value>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{x:Static mbts:Icons.CancelBuysWhite}" Height="20" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="Center" Foreground="White">Cxl Buys</TextBlock>
|
||||
</Grid>
|
||||
<Image Source="{x:Static mbts:Icons.CancelWhite}" Height="20" HorizontalAlignment="Center"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{mbts:BTSColor MarketData.bid}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="CancelSells" TargetType="Button" BasedOn="{StaticResource LadderMenuButton}">
|
||||
<Setter Property="Background" Value="{mbts:BTSColor MarketData.ask}"/>
|
||||
<Setter Property="ToolTip" Value="Cancel Sells"/>
|
||||
<Setter Property="Content">
|
||||
<Setter.Value>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{x:Static mbts:Icons.CancelSellsWhite}" Height="20" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="Center" Foreground="White">Cxl Sells</TextBlock>
|
||||
</Grid>
|
||||
<Image Source="{x:Static mbts:Icons.CancelWhite}" Height="20" HorizontalAlignment="Center"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="{mbts:BTSColor MarketData.ask}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="CancelAll" TargetType="Button" BasedOn="{StaticResource LadderMenuButton}">
|
||||
<Setter Property="ToolTip" Value="Cancel All"/>
|
||||
<Setter Property="Content">
|
||||
<Setter.Value>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{x:Static mbts:Icons.CancelOrders}" Height="20" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="Center">Cxl All</TextBlock>
|
||||
</Grid>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ShowBook" TargetType="Button" BasedOn="{StaticResource LadderMenuButton}">
|
||||
<Setter Property="Content">
|
||||
<Setter.Value>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{x:Static mbts:Icons.Book}" Width="21" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="Center">Book</TextBlock>
|
||||
</Grid>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ShowTicket" TargetType="Button" BasedOn="{StaticResource LadderMenuButton}">
|
||||
<Setter Property="Content">
|
||||
<Setter.Value>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{x:Static mbts:Icons.Ticket}" Height="20" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" VerticalAlignment="Center">Ticket</TextBlock>
|
||||
</Grid>
|
||||
<Image Source="{x:Static mbts:Icons.Cancel}" Height="20" HorizontalAlignment="Center"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
@@ -181,11 +147,16 @@
|
||||
</ItemsControl>
|
||||
<Button Margin="2" HorizontalAlignment="Stretch" Command="{Binding calculator.clear}">Clear</Button>
|
||||
<StackPanel Margin="2,12,2,0">
|
||||
<Button Command="{Binding cancel_command}" CommandParameter="Bids" Style="{StaticResource CancelBuys}"/>
|
||||
<Button Command="{Binding cancel_command}" CommandParameter="Asks" Style="{StaticResource CancelSells}" Margin="0,5,0,0"/>
|
||||
<Button Command="{Binding cancel_command}" CommandParameter="All" Style="{StaticResource CancelAll}" Margin="0,5,0,0"/>
|
||||
<Button Command="{Binding show_book_command}" Style="{StaticResource ShowBook}" Margin="0,5,0,0"/>
|
||||
<Button Command="{Binding show_ticket_command}" Style="{StaticResource ShowTicket}" Margin="0,5,0,0"/>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Command="{Binding cancel_command}" CommandParameter="Bids" Style="{StaticResource CancelBuys}" Margin="0,5,0,0"/>
|
||||
<Button Grid.Column="1" Command="{Binding cancel_command}" CommandParameter="Asks" Style="{StaticResource CancelSells}" Margin="5,5,0,0"/>
|
||||
</Grid>
|
||||
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
Reference in new issue
Block a user