Repository navigation
Expand file tree
/
Copy pathApp.xaml
More file actions
112 lines (101 loc) · 5.64 KB
/
Copy pathApp.xaml
File metadata and controls
112 lines (101 loc) · 5.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<Application x:Class="FlowForge.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!-- Palette -->
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#F3F4F6"/>
<SolidColorBrush x:Key="SurfaceBrush" Color="#FFFFFF"/>
<SolidColorBrush x:Key="BorderBrush" Color="#D1D5DB"/>
<SolidColorBrush x:Key="TextBrush" Color="#111827"/>
<SolidColorBrush x:Key="MutedTextBrush" Color="#6B7280"/>
<SolidColorBrush x:Key="AccentBrush" Color="#2563EB"/>
<!-- Graph colours; keep in sync with GraphVisualizer so that the legend matches the viewer -->
<SolidColorBrush x:Key="SourceBrush" Color="#81C784"/>
<SolidColorBrush x:Key="SinkBrush" Color="#E57373"/>
<SolidColorBrush x:Key="FlowBrush" Color="#FFA500"/>
<!-- Flat button with a hover/pressed overlay so that every colour variant shares one template -->
<ControlTemplate x:Key="FlatButtonTemplate" TargetType="{x:Type Button}">
<Grid>
<Border x:Name="Background"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="6"
SnapsToDevicePixels="True"/>
<Border x:Name="Overlay"
Background="Black"
CornerRadius="6"
Opacity="0"
IsHitTestVisible="False"/>
<ContentPresenter Margin="{TemplateBinding Padding}"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Overlay" Property="Opacity" Value="0.06"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Overlay" Property="Opacity" Value="0.14"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="True">
<Setter TargetName="Background" Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.45"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style TargetType="{x:Type Button}">
<Setter Property="Template" Value="{StaticResource FlatButtonTemplate}"/>
<Setter Property="Background" Value="{StaticResource SurfaceBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="14,0"/>
<Setter Property="Height" Value="34"/>
<Setter Property="Margin" Value="0,0,8,0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
</Style>
<Style x:Key="PrimaryButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background" Value="{StaticResource AccentBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource AccentBrush}"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontWeight" Value="SemiBold"/>
</Style>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Height" Value="28"/>
<Setter Property="Padding" Value="6,0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
</Style>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="Margin" Value="0,0,0,0"/>
</Style>
<!-- Toolbar group: a white card with a small caption on top -->
<Style x:Key="Card" TargetType="{x:Type Border}">
<Setter Property="Background" Value="{StaticResource SurfaceBrush}"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="12,8,4,10"/>
<Setter Property="Margin" Value="0,0,10,10"/>
</Style>
<Style x:Key="CardCaption" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="11"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Foreground" Value="{StaticResource MutedTextBrush}"/>
<Setter Property="Margin" Value="0,0,0,6"/>
</Style>
<Style x:Key="LegendText" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{StaticResource MutedTextBrush}"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="6,0,16,0"/>
</Style>
</Application.Resources>
</Application>