Skip to content
Permalink
Browse files

[skip ci] label colors

  • Loading branch information...
nopara73 committed Nov 18, 2018
1 parent d6dc8b2 commit 426c5dc858d7edab73bb21bde8bb0b5179480d24
@@ -6,6 +6,8 @@
<converters:PrivacyLevelValueConverter x:Key="PrivacyLevelValueConverter" />
<converters:CoinStatusStringConverter x:Key="CoinStatusStringConverter" />
<converters:CoinStatusColorConverter x:Key="CoinStatusColorConverter" />
<converters:CoinStatusBorderBrushConverter x:Key="CoinStatusBorderBrushConverter" />
<converters:CoinStatusForegroundConverter x:Key="CoinStatusForegroundConverter" />
</UserControl.Resources>
<UserControl.Styles>
<Style Selector="TextBlock">
@@ -26,7 +28,7 @@
</UserControl.Styles>

<DockPanel LastChildFill="True">
<Grid ColumnDefinitions="30,30,120,120,100,Auto" Margin="30 0" DockPanel.Dock="Top">
<Grid ColumnDefinitions="30,30,180,120,100,Auto" Margin="30 0" DockPanel.Dock="Top">
<TextBlock Text="" />
<TextBlock Text="" Grid.Column="1" />
<TextBlock Text="CoinJoin Status" Grid.Column="2" Margin="10 0 0 0" />
@@ -62,14 +64,14 @@
</StackPanel>
</Expander>

<Grid ColumnDefinitions="30,30,120,120,100,Auto" Margin="30 0 0 0" VerticalAlignment="Top">
<Grid ColumnDefinitions="30,30,180,120,100,Auto" Margin="30 0 0 0" VerticalAlignment="Top">
<CheckBox HorizontalContentAlignment="Left" IsChecked="{Binding IsSelected}" />
<Border Background="Transparent" IsVisible="{Binding Confirmed}" Grid.Column="1" ToolTip.Tip="Confirmed" >
<Path HorizontalAlignment="Left" Data="F1 M 23.7501,33.25L 34.8334,44.3333L 52.2499,22.1668L 56.9999,26.9168L 34.8334,53.8333L 19.0001,38L 23.7501,33.25 Z" Fill="#22B14C" Height="16" Width="16" Stretch="Fill"/>
<Border Background="Transparent" IsVisible="{Binding Confirmed}" Grid.Column="1" ToolTip.Tip="Confirmed">
<Path HorizontalAlignment="Left" Data="F1 M 23.7501,33.25L 34.8334,44.3333L 52.2499,22.1668L 56.9999,26.9168L 34.8334,53.8333L 19.0001,38L 23.7501,33.25 Z" Fill="#22B14C" Height="16" Width="16" Stretch="Fill" />
</Border>

<Border Padding="1" Grid.Column="2" Background="{Binding Status, Converter={StaticResource CoinStatusColorConverter}}" HorizontalAlignment="Left" BorderBrush="{Binding Status, Converter={StaticResource CoinStatusColorConverter}}" BorderThickness="1,1,1,1" CornerRadius="6,6,6,6">
<controls:ExtendedTextBox Classes="selectableTextBlock" Text="{Binding Status, Converter={StaticResource CoinStatusStringConverter}, Mode=OneWay}" Background="{Binding Status, Converter={StaticResource CoinStatusColorConverter}}" />
<Border Padding="1" Grid.Column="2" Background="{Binding Status, Converter={StaticResource CoinStatusColorConverter}}" BorderBrush="{Binding Status, Converter={StaticResource CoinStatusBorderBrushConverter}}" HorizontalAlignment="Left" BorderThickness="1" CornerRadius="0,6,6,0">
<TextBlock Text="{Binding Status, Converter={StaticResource CoinStatusStringConverter}, Mode=OneWay}" Background="{Binding Status, Converter={StaticResource CoinStatusColorConverter}}" Foreground="{Binding Status, Converter={StaticResource CoinStatusForegroundConverter}}" />
</Border>

<TextBlock Grid.Column="3" Text="{Binding AmountBtc}" />
@@ -0,0 +1,34 @@
using Avalonia.Data.Converters;
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using WalletWasabi.Gui.Controls.WalletExplorer;
using WalletWasabi.Gui.Models;
using WalletWasabi.Models.ChaumianCoinJoin;

namespace WalletWasabi.Gui.Converters
{
public class CoinStatusBorderBrushConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is SmartCoinStatus status)
{
switch (status)
{
case SmartCoinStatus.Confirmed: return Brushes.Transparent;
case SmartCoinStatus.Unconfirmed: return Brushes.Transparent;
default: return Brushes.Black;
}
}
throw new InvalidOperationException();
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}
}
@@ -0,0 +1,37 @@
using Avalonia.Data.Converters;
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using WalletWasabi.Gui.Controls.WalletExplorer;
using WalletWasabi.Gui.Models;
using WalletWasabi.Models.ChaumianCoinJoin;

namespace WalletWasabi.Gui.Converters
{
public class CoinStatusForegroundConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is SmartCoinStatus status)
{
switch (status)
{
case SmartCoinStatus.MixingOutputRegistration:
case SmartCoinStatus.MixingSigning:
case SmartCoinStatus.MixingInputRegistration:
case SmartCoinStatus.MixingOnWaitingList:
case SmartCoinStatus.MixingWaitingForConfirmation: return Brushes.Black;
default: return Brushes.White;
}
}
throw new InvalidOperationException();
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}
}
@@ -19,14 +19,14 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
{
case SmartCoinStatus.Confirmed: return "";
case SmartCoinStatus.Unconfirmed: return "";
case SmartCoinStatus.MixingOnWaitingList: return "waiting";
case SmartCoinStatus.MixingBanned: return "banned";
case SmartCoinStatus.MixingInputRegistration: return "registered";
case SmartCoinStatus.MixingConnectionConfirmation: return "connection confirmed";
case SmartCoinStatus.MixingOutputRegistration: return "output registered";
case SmartCoinStatus.MixingSigning: return "signed";
case SmartCoinStatus.SpentAccordingToBackend: return "spent";
case SmartCoinStatus.MixingWaitingForConfirmation: return "waiting for confirmation";
case SmartCoinStatus.MixingOnWaitingList: return " waiting ";
case SmartCoinStatus.MixingBanned: return " banned ";
case SmartCoinStatus.MixingInputRegistration: return " registered ";
case SmartCoinStatus.MixingConnectionConfirmation: return " connection confirmed ";
case SmartCoinStatus.MixingOutputRegistration: return " output registered ";
case SmartCoinStatus.MixingSigning: return " signed ";
case SmartCoinStatus.SpentAccordingToBackend: return " spent ";
case SmartCoinStatus.MixingWaitingForConfirmation: return " waiting for confirmation ";
}
}

@@ -1,11 +1,11 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:controls="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui">
<StackPanel Margin="10" Spacing="10">
<Border Padding="2" Background="ForestGreen" HorizontalAlignment="Center" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="6,6, 6, 6">
<Border Padding="2" Background="ForestGreen" HorizontalAlignment="Center" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="6,6,6,6">
<TextBlock HorizontalAlignment="Center" Text=" Your Wallet Was Generated Successfully! " Foreground="{DynamicResource ApplicationAccentForegroundBrush}" />
</Border>
<TextBlock Text="Write down these mnemonic words:" FontWeight="Bold" />
<Border Padding="2" Background="Gray" HorizontalAlignment="Center" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="6,6, 6, 6">
<Border Padding="2" Background="Gray" HorizontalAlignment="Center" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="6,6,6,6">
<controls:ExtendedTextBox Text="{Binding MnemonicWords, Mode=TwoWay}" Background="Gray" Foreground="{DynamicResource ApplicationAccentForegroundBrush}" Classes="selectableTextBlock" />
</Border>
<TextBlock Text="You can recover your wallet on any computer with:" FontWeight="Bold" />
@@ -77,5 +77,17 @@
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>

<ItemGroup>
<None Update="Controls\WalletExplorer\CoinListView.xaml.BASE.xaml">
<Generator>MSBuild:Compile</Generator>
</None>
<None Update="Controls\WalletExplorer\CoinListView.xaml.LOCAL.xaml">
<Generator>MSBuild:Compile</Generator>
</None>
<None Update="Controls\WalletExplorer\CoinListView.xaml.REMOTE.xaml">
<Generator>MSBuild:Compile</Generator>
</None>
</ItemGroup>

</Project>

0 comments on commit 426c5dc

Please sign in to comment.
You can’t perform that action at this time.