Public Access
ServerScreen, LockedScreen and PendingScreen were the only places left drawing v1: a 44px square outlined in the accent with >_ in the accent inside it. Every other place the mark appears — both headers, the desktop titlebar, the launcher icon and the .ico — draws it filled. The radius is derived rather than chosen. The mark is 6 at 20 and 8 at 26, a third of a unit per unit of tile, which puts 44 at exactly 14 — and 14 is already on Phone.axaml's radius ladder as the one for a block of monospaced output, which is a fair description of a box with >_ in it. PendingScreen takes the shape and not the colour. It is the screen that says a surface is not built yet, and the accent is the shell's one "do this" colour; a tile in Raised with the glyph left at TextFaint keeps the mark recognisable while the screen goes on looking as inert as it is.
49 lines
2.5 KiB
XML
49 lines
2.5 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:views="using:DodoSSH.Client.Android.Views"
|
|
x:Class="DodoSSH.Client.Android.Views.PendingScreen"
|
|
Background="{StaticResource Canvas}">
|
|
|
|
<!--
|
|
The phone's counterpart of the desktop head's NotBuiltScreen, and it exists for the same reason: a
|
|
screen that is not built says so, in its own words, rather than being dropped from the shell or filled
|
|
with plausible-looking data. See README — nothing here is rendered with invented data.
|
|
|
|
Two properties rather than a shared string, because the copy is written per state. "No items" would be
|
|
the exact failure this control is here to avoid.
|
|
|
|
The two properties are read off this control by $parent rather than by binding to its DataContext, and
|
|
there is no x:DataType here for the same reason: this control must NOT own its data context. Setting one
|
|
is what broke the phone's navigation — see the code-behind, which is where that story is written down.
|
|
-->
|
|
|
|
<ScrollViewer>
|
|
<StackPanel VerticalAlignment="Center" Margin="24,48" Spacing="12">
|
|
|
|
<!--
|
|
The same filled tile the rest of the head draws since v2, at the same 44 and the same 14 — and
|
|
drained rather than recoloured. Accent on this screen would be the shell's one "this is what the
|
|
screen wants you to do" colour spent on the one screen that wants nothing, so the tile is Raised
|
|
and the glyph stays TextFaint. The shape says which application this is; the colour says the
|
|
screen is inert, which is the whole message.
|
|
-->
|
|
<Border Width="44" Height="44" CornerRadius="14" Background="{StaticResource Raised}"
|
|
HorizontalAlignment="Left">
|
|
<TextBlock Text=">_" Foreground="{StaticResource TextFaint}" FontFamily="{StaticResource MonoFont}"
|
|
FontSize="16" FontWeight="Bold"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
</Border>
|
|
|
|
<TextBlock Text="{Binding $parent[views:PendingScreen].Heading}" Foreground="{StaticResource Text}"
|
|
FontFamily="{StaticResource MonoFont}" FontSize="14" FontWeight="SemiBold"
|
|
TextWrapping="Wrap" />
|
|
|
|
<TextBlock Text="{Binding $parent[views:PendingScreen].Detail}" Foreground="{StaticResource TextDim}"
|
|
FontFamily="{StaticResource MonoFont}" FontSize="11" LineHeight="19"
|
|
TextWrapping="Wrap" />
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</UserControl>
|