-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
209 lines (197 loc) · 12 KB
/
Copy pathMainWindow.xaml
File metadata and controls
209 lines (197 loc) · 12 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<Window
x:Class="MiniT.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MiniT">
<Grid x:Name="RootGrid" RowDefinitions="44,Auto,*">
<!-- ================= CUSTOM TITLE BAR (draggable) ================= -->
<Grid x:Name="AppTitleBar" Grid.Row="0"
Background="Transparent"/>
<!-- ================= SEARCH BAR ================= -->
<Grid Grid.Row="1" Padding="16,4,16,12" HorizontalAlignment="Stretch">
<Button x:Name="SearchBarButton"
HorizontalAlignment="Stretch"
Click="OnSearchClick"
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1" CornerRadius="10" Padding="14,0" Height="38">
<Grid ColumnDefinitions="Auto,*,Auto">
<FontIcon Grid.Column="0" Glyph="" FontSize="13"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
<TextBlock Grid.Column="1" Text="Search tools…"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
VerticalAlignment="Center" FontSize="13.5" Margin="10,0,0,0"/>
<Border Grid.Column="2" Background="{ThemeResource SubtleFillColorSecondaryBrush}"
CornerRadius="5" Padding="7,3">
<TextBlock Text="Ctrl+K"
Foreground="{ThemeResource TextFillColorTertiaryBrush}"
FontSize="11" FontWeight="SemiBold"/>
</Border>
</Grid>
</Button>
</Grid>
<!-- ================= MAIN: SIDEBAR + CONTENT ================= -->
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="SidebarColumn" Width="248"/>
<ColumnDefinition Width="6"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- SIDEBAR -->
<Grid Grid.Column="0" RowDefinitions="*,Auto"
Background="{ThemeResource LayerFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="0,1,1,0">
<ScrollViewer Grid.Row="0" Padding="0,10">
<StackPanel>
<TextBlock x:Name="SpacesHeaderLabel" Text="SPACES" Style="{StaticResource EyebrowTextStyle}"
Margin="18,6,16,8"/>
<ItemsRepeater x:Name="SpaceList">
<ItemsRepeater.Layout>
<StackLayout Spacing="2"/>
</ItemsRepeater.Layout>
</ItemsRepeater>
</StackPanel>
</ScrollViewer>
<StackPanel Grid.Row="1" x:Name="SidebarFooter" Margin="10,8,10,12" Spacing="4">
<Border BorderThickness="0,1,0,0"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
Margin="4,0,4,8"/>
<Button x:Name="AddSpaceButton" Click="OnAddSpace" Style="{StaticResource SidebarNavButtonStyle}"
ToolTipService.ToolTip="New Space">
<StackPanel Orientation="Horizontal" Spacing="10">
<FontIcon Glyph="" FontSize="14"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
<TextBlock x:Name="AddSpaceLabel" Text="New Space"/>
</StackPanel>
</Button>
<Button x:Name="AddToolButton" Click="OnAddTool" Style="{StaticResource SidebarNavButtonStyle}"
ToolTipService.ToolTip="Add Tool">
<StackPanel Orientation="Horizontal" Spacing="10">
<FontIcon Glyph="" FontSize="14"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
<TextBlock x:Name="AddToolLabel" Text="Add Tool"/>
</StackPanel>
</Button>
<Button x:Name="SettingsButton" Click="OnSettings" Style="{StaticResource SidebarNavButtonStyle}"
ToolTipService.ToolTip="Settings">
<StackPanel Orientation="Horizontal" Spacing="10">
<FontIcon Glyph="" FontSize="14"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
<TextBlock x:Name="SettingsLabel" Text="Settings"/>
</StackPanel>
</Button>
<Button x:Name="CollapseSidebarButton" Click="OnToggleSidebarCollapsed" Style="{StaticResource SidebarNavButtonStyle}"
ToolTipService.ToolTip="Collapse sidebar">
<StackPanel Orientation="Horizontal" Spacing="10">
<FontIcon x:Name="CollapseIcon" Glyph="" FontSize="14"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
<TextBlock x:Name="CollapseLabel" Text="Collapse"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
<!-- SPLITTER — drag to resize the sidebar -->
<Border Grid.Column="1" x:Name="Splitter"
Background="Transparent"
PointerEntered="OnSplitterPointerEntered"
PointerExited="OnSplitterPointerExited"
PointerPressed="OnSplitterPointerPressed"
PointerMoved="OnSplitterPointerMoved"
PointerReleased="OnSplitterPointerReleased">
<Border x:Name="SplitterLine" Width="1" HorizontalAlignment="Center"
Background="{ThemeResource CardStrokeColorDefaultBrush}"/>
</Border>
<!-- CONTENT -->
<Grid Grid.Column="2" RowDefinitions="Auto,*"
Background="{ThemeResource SolidBackgroundFillColorBaseBrush}">
<Border Grid.Row="0" x:Name="TabBarHost"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="0,0,0,1"
Visibility="Collapsed">
<ScrollViewer x:Name="TabBarScroller"
HorizontalScrollMode="Auto"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollMode="Disabled">
<StackPanel x:Name="TabBar" Orientation="Horizontal"
Spacing="4" Padding="12,8,12,0"/>
</ScrollViewer>
</Border>
<Frame Grid.Row="1" x:Name="ContentFrame"/>
</Grid>
</Grid>
<!-- ================= SEARCH OVERLAY (command palette) ================= -->
<Grid x:Name="SearchOverlay" Grid.RowSpan="3"
Visibility="Collapsed"
Background="{ThemeResource SmokeFillColorDefaultBrush}"
PointerPressed="OnSearchOverlayBackgroundPressed">
<Border x:Name="SearchCard" MaxWidth="640" MaxHeight="520"
HorizontalAlignment="Center" VerticalAlignment="Top"
Margin="0,90,0,0" CornerRadius="16"
RenderTransformOrigin="0.5,0.5"
Background="{ThemeResource AcrylicInAppFillColorDefaultBrush}"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
Translation="0,0,64"
Shadow="{StaticResource CardShadow}">
<Border.RenderTransform>
<ScaleTransform x:Name="SearchCardScale" ScaleX="0.97" ScaleY="0.97"/>
</Border.RenderTransform>
<Grid RowDefinitions="Auto,Auto,*">
<Grid Grid.Row="0" ColumnDefinitions="Auto,*" Padding="18,14,18,10">
<FontIcon Grid.Column="0" Glyph="" FontSize="16"
VerticalAlignment="Center"
Foreground="{ThemeResource TextFillColorSecondaryBrush}"/>
<TextBox Grid.Column="1" x:Name="SearchBox"
PlaceholderText="Search tools…"
BorderThickness="0" Background="Transparent"
Padding="10,4" FontSize="17"
TextChanged="OnSearchTextChanged"
KeyDown="OnSearchKeyDown"/>
</Grid>
<Border Grid.Row="1" BorderThickness="0,1,0,1"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
Padding="14,8">
<Border Background="{ThemeResource SubtleFillColorSecondaryBrush}"
CornerRadius="10" Padding="2" HorizontalAlignment="Left">
<Grid x:Name="FilterButtonsPanel">
<!-- Sits behind the radio buttons and slides/resizes itself
to sit exactly under whichever one is checked, instead of
each pill just flipping its own background instantly. -->
<Border x:Name="FilterIndicator"
Background="{StaticResource AppAccentBrush}"
CornerRadius="8" Width="60"
HorizontalAlignment="Left" VerticalAlignment="Stretch">
<Border.RenderTransform>
<TranslateTransform x:Name="FilterIndicatorTransform"/>
</Border.RenderTransform>
</Border>
<StackPanel Orientation="Horizontal" Spacing="0">
<RadioButton x:Name="FilterAll" Content="All"
Style="{StaticResource FilterPillRadioButtonStyle}"
IsChecked="True" GroupName="sf"
Checked="OnFilterChanged"/>
<RadioButton x:Name="FilterLocal" Content="Local"
Style="{StaticResource FilterPillRadioButtonStyle}"
GroupName="sf" Checked="OnFilterChanged"/>
<RadioButton x:Name="FilterOnline" Content="Online"
Style="{StaticResource FilterPillRadioButtonStyle}"
GroupName="sf" Checked="OnFilterChanged"/>
</StackPanel>
</Grid>
</Border>
</Border>
<ScrollViewer Grid.Row="2" MaxHeight="360">
<Border Padding="10,8,10,10">
<ItemsRepeater x:Name="SearchResultsList">
<ItemsRepeater.Layout>
<StackLayout Spacing="2"/>
</ItemsRepeater.Layout>
</ItemsRepeater>
</Border>
</ScrollViewer>
</Grid>
</Border>
</Grid>
</Grid>
</Window>