Public Access
Give hosts and terminals their own screen, and the rest of the vault another
Rebuilds the client's shell from an imported design: a titlebar and nav rail it draws itself, real multi-session tabs over the one WebView, a Ctrl+K host search, and a vault screen that merges keys, passwords and pinned host keys into one table. Hosts left the vault column for their own screen beside the terminal, which is what the design asks for and turned out to be the better split anyway. Two screens the design shows have nothing behind them yet — file transfer and teams — and say so plainly rather than rendering invented data; every other gap between the design and this build is recorded in docs/design-import-gaps.md.
This commit is contained in:
@@ -9,11 +9,84 @@
|
||||
and then cannot read the text.
|
||||
-->
|
||||
|
||||
<Application.Resources>
|
||||
|
||||
<!--
|
||||
The palette, named for what a colour is for rather than for what it looks like. Every one of these
|
||||
is from the design; the names are this codebase's, because "#0C0F0E" appearing in nine files is how a
|
||||
surface ends up two shades off in the tenth.
|
||||
|
||||
Five near-black surfaces rather than one, and the difference between them is real work: the window is
|
||||
the darkest so the terminal reads as the lit thing, chrome sits one step up so the titlebar and status
|
||||
bar frame it, and the sidebars sit between the two so a list does not look like part of either.
|
||||
-->
|
||||
<Color x:Key="CanvasColor">#0A0C0B</Color>
|
||||
<SolidColorBrush x:Key="Canvas" Color="{StaticResource CanvasColor}" />
|
||||
<SolidColorBrush x:Key="Chrome" Color="#0D100F" />
|
||||
<SolidColorBrush x:Key="Sidebar" Color="#0C0F0E" />
|
||||
<SolidColorBrush x:Key="Panel" Color="#0F1211" />
|
||||
<SolidColorBrush x:Key="Raised" Color="#111514" />
|
||||
<SolidColorBrush x:Key="Field" Color="#121615" />
|
||||
|
||||
<!-- Row hover, and the heavier one the chrome's own buttons use. -->
|
||||
<SolidColorBrush x:Key="Hover" Color="#141817" />
|
||||
<SolidColorBrush x:Key="ChromeHover" Color="#1A1F1D" />
|
||||
|
||||
<!--
|
||||
Three border weights, and they are not interchangeable. Strong separates one region of the window from
|
||||
another, subtle separates rows inside one region, and mid is what a control draws around itself.
|
||||
-->
|
||||
<SolidColorBrush x:Key="Border" Color="#1E2422" />
|
||||
<SolidColorBrush x:Key="BorderSubtle" Color="#171C1A" />
|
||||
<SolidColorBrush x:Key="BorderMid" Color="#2A312E" />
|
||||
<SolidColorBrush x:Key="BorderHover" Color="#3A423E" />
|
||||
<SolidColorBrush x:Key="BorderFaint" Color="#232927" />
|
||||
|
||||
<!--
|
||||
The text ramp. Three steps, used consistently: what you read, what you glance at, and what is there
|
||||
only so its absence would be noticed. A fourth step would be one nobody could tell from its neighbours.
|
||||
-->
|
||||
<SolidColorBrush x:Key="Text" Color="#DCE3DF" />
|
||||
<SolidColorBrush x:Key="TextDim" Color="#7E8A84" />
|
||||
<SolidColorBrush x:Key="TextFaint" Color="#566059" />
|
||||
|
||||
<!--
|
||||
The accent, and the three colours that are allowed to disagree with it. Green means live, connected or
|
||||
yours; amber means a caveat worth reading; red means refused or destructive; blue is for the one thing
|
||||
that is neither — a directory, a distinct scope — and is deliberately rare.
|
||||
-->
|
||||
<Color x:Key="AccentColor">#3CE88F</Color>
|
||||
<SolidColorBrush x:Key="Accent" Color="{StaticResource AccentColor}" />
|
||||
<SolidColorBrush x:Key="AccentSoft" Color="#3CE88F" Opacity="0.35" />
|
||||
<SolidColorBrush x:Key="AccentWash" Color="#3CE88F" Opacity="0.06" />
|
||||
<SolidColorBrush x:Key="Warn" Color="#E8B44C" />
|
||||
<SolidColorBrush x:Key="WarnSoft" Color="#E8B44C" Opacity="0.35" />
|
||||
<SolidColorBrush x:Key="WarnWash" Color="#E8B44C" Opacity="0.06" />
|
||||
<SolidColorBrush x:Key="WarnText" Color="#B9A26B" />
|
||||
<SolidColorBrush x:Key="Danger" Color="#E85D5D" />
|
||||
<SolidColorBrush x:Key="DangerSoft" Color="#E85D5D" Opacity="0.3" />
|
||||
<SolidColorBrush x:Key="DangerWash" Color="#E85D5D" Opacity="0.08" />
|
||||
<SolidColorBrush x:Key="Info" Color="#5DA9E8" />
|
||||
|
||||
<!--
|
||||
The design asks for IBM Plex Mono and IBM Plex Sans. Neither ships with this application and neither is
|
||||
on a stock Windows install, so requesting them by name would render as whatever the font fallback chose
|
||||
that day — which is worse than choosing deliberately. Inter is embedded by the host and is what the
|
||||
window already draws with; the monospace stack is the one every other view here already names, so the
|
||||
terminal's own font and the chrome's agree.
|
||||
|
||||
Named as resources rather than repeated, because the substitution is the sort of thing that gets
|
||||
reversed later and should be reversible in one place. See docs/design-import-gaps.md.
|
||||
-->
|
||||
<FontFamily x:Key="MonoFont">ui-monospace,Cascadia Mono,Consolas,monospace</FontFamily>
|
||||
|
||||
</Application.Resources>
|
||||
|
||||
<Application.Styles>
|
||||
<FluentTheme />
|
||||
|
||||
<!--
|
||||
Application-wide rather than on MainWindow, which is where these three lived until the vault column
|
||||
Application-wide rather than on MainWindow, which is where the first three lived until the vault column
|
||||
became its own control. A Window's styles reach its whole tree, so the move changes nothing about how
|
||||
the application renders — but a control laid out on its own, as the layout harness lays the column out,
|
||||
would otherwise lose them. That matters more than it looks: "hint" carries TextWrapping, and text that
|
||||
@@ -21,22 +94,416 @@
|
||||
is the one way this kind of test lies quietly.
|
||||
-->
|
||||
<Style Selector="TextBlock.hint">
|
||||
<Setter Property="Foreground" Value="#7b8394" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
<Setter Property="TextWrapping" Value="Wrap" />
|
||||
</Style>
|
||||
<Style Selector="TextBlock.heading">
|
||||
<Setter Property="Foreground" Value="#e6e9f0" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
<Setter Property="FontSize" Value="18" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
</Style>
|
||||
<Style Selector="Border.card">
|
||||
<Setter Property="Background" Value="#171b24" />
|
||||
<Setter Property="Background" Value="{StaticResource Chrome}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Border}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
<Setter Property="Padding" Value="24" />
|
||||
<Setter Property="MaxWidth" Value="520" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
Monospace, which in this design is not a decoration for code. Host names, fingerprints, addresses and
|
||||
counts are all things people compare character by character, and a proportional font is what makes two
|
||||
similar fingerprints look alike.
|
||||
-->
|
||||
<Style Selector="TextBlock.mono">
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
</Style>
|
||||
<Style Selector="SelectableTextBlock.mono">
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
The small tracked-out capitals the design uses for every section heading. Letter spacing rather than
|
||||
bold: at this size weight closes the counters up and the word turns into a smudge, whereas spacing is
|
||||
what makes six characters read as a label instead of as an abbreviation.
|
||||
-->
|
||||
<Style Selector="TextBlock.label">
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
<Setter Property="FontSize" Value="10" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="LetterSpacing" Value="1.2" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
A chip: a bordered scrap of text stating one fact. The design uses them for tags, roles, scopes and
|
||||
shortcut hints, which have nothing in common except that each is a noun the eye should be able to skip.
|
||||
-->
|
||||
<Style Selector="Border.chip">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderMid}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="Padding" Value="6,2" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="Border.chip > TextBlock">
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
<Setter Property="FontSize" Value="10" />
|
||||
<Setter Property="FontWeight" Value="Medium" />
|
||||
<Setter Property="LetterSpacing" Value="0.5" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
</Style>
|
||||
<Style Selector="Border.chip.accent">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AccentSoft}" />
|
||||
</Style>
|
||||
<Style Selector="Border.chip.accent > TextBlock">
|
||||
<Setter Property="Foreground" Value="{StaticResource Accent}" />
|
||||
</Style>
|
||||
<Style Selector="Border.chip.warn">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource WarnSoft}" />
|
||||
</Style>
|
||||
<Style Selector="Border.chip.warn > TextBlock">
|
||||
<Setter Property="Foreground" Value="{StaticResource Warn}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
The buttons. Fluent's own chrome is a rounded grey slab, and one of those beside a hairline-bordered
|
||||
chip reads as belonging to a different application — so the three shapes this design uses are declared
|
||||
here rather than restyled per view.
|
||||
|
||||
Each sets its brushes on the content presenter, not on the button. That is where the Fluent theme puts
|
||||
its own, so a Background set on the button is a TemplateBinding the theme's :pointerover rule overrides
|
||||
— which shows up as a button that is styled until the pointer arrives and then is not.
|
||||
-->
|
||||
<Style Selector="Button.ghost /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderMid}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
</Style>
|
||||
<Style Selector="Button.ghost:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource ChromeHover}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderHover}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
</Style>
|
||||
<Style Selector="Button.ghost:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderFaint}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.accent /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource Accent}" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Canvas}" />
|
||||
</Style>
|
||||
<Style Selector="Button.accent:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource Accent}" />
|
||||
<Setter Property="Opacity" Value="0.85" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Canvas}" />
|
||||
</Style>
|
||||
<!--
|
||||
A disabled accent button keeps its shape and loses its fill. Fluent's disabled state greys the
|
||||
foreground and leaves the background, which on a green slab is unreadable rather than merely dim.
|
||||
-->
|
||||
<Style Selector="Button.accent:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderFaint}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.danger /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource DangerSoft}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="3" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Danger}" />
|
||||
</Style>
|
||||
<Style Selector="Button.danger:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource DangerWash}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Danger}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Danger}" />
|
||||
</Style>
|
||||
<Style Selector="Button.danger:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderFaint}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
|
||||
<!-- Every button in this window is small, mono and tracked out; only the colours differ. -->
|
||||
<Style Selector="Button.ghost, Button.accent, Button.danger">
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
<Setter Property="FontSize" Value="10.5" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="LetterSpacing" Value="0.8" />
|
||||
<Setter Property="Padding" Value="10,5" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
Buttons that are not shaped like buttons: a group heading, a nav-rail destination, a terminal tab, a
|
||||
window control. All four are clickable regions that read as part of the chrome, so they carry no
|
||||
border and no fill until the pointer is over them — and all four are buttons rather than borders with
|
||||
a gesture, because a button is focusable, keyboard-activatable and announced as a control.
|
||||
-->
|
||||
<Style Selector="Button.flat">
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="MinWidth" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.flat /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.flat:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource ChromeHover}" />
|
||||
</Style>
|
||||
<Style Selector="Button.flat:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource ChromeHover}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.grouphead">
|
||||
<Setter Property="Padding" Value="10,7,10,4" />
|
||||
</Style>
|
||||
|
||||
<!-- A category in the vault's rail: the same accent strip a selected row carries, at full row height. -->
|
||||
<Style Selector="Button.cat">
|
||||
<Setter Property="Padding" Value="0,6,14,6" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
<Setter Property="FontSize" Value="10" />
|
||||
<Setter Property="FontWeight" Value="Medium" />
|
||||
<Setter Property="LetterSpacing" Value="0.5" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
</Style>
|
||||
<Style Selector="Button.cat /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
</Style>
|
||||
<Style Selector="Button.cat.active /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource AccentWash}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
</Style>
|
||||
<!--
|
||||
The nav rail. The active destination is marked with an accent bar down its left edge and a wash
|
||||
behind it, which is the design's whole idiom for "you are here" — the same two marks a selected list
|
||||
row carries, so the window has one vocabulary for selection rather than one per control.
|
||||
-->
|
||||
<Style Selector="Button.nav">
|
||||
<Setter Property="Padding" Value="0,15" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
<Setter Property="FontSize" Value="9" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="LetterSpacing" Value="1" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
<Style Selector="Button.nav /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="2,0,0,0" />
|
||||
</Style>
|
||||
<Style Selector="Button.nav:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
</Style>
|
||||
<Style Selector="Button.nav.active /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
<Setter Property="Background" Value="{StaticResource AccentWash}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Accent}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
A terminal tab. The active one is marked along its top edge rather than its left, because the strip
|
||||
runs horizontally and a left bar on a row of tabs reads as a divider between them.
|
||||
-->
|
||||
<Style Selector="Button.tab">
|
||||
<Setter Property="Padding" Value="12,0" />
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="FontFamily" Value="{StaticResource MonoFont}" />
|
||||
<Setter Property="FontSize" Value="10.5" />
|
||||
<Setter Property="FontWeight" Value="Medium" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
</Style>
|
||||
<Style Selector="Button.tab /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderSubtle}" />
|
||||
<Setter Property="BorderThickness" Value="0,2,1,0" />
|
||||
</Style>
|
||||
<Style Selector="Button.tab.active /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource Canvas}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Accent}" />
|
||||
<Setter Property="BorderThickness" Value="0,2,0,0" />
|
||||
</Style>
|
||||
|
||||
<!-- The close box on a tab, and the window controls. Square, quiet, and red only where it means it. -->
|
||||
<Style Selector="Button.close /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
<Style Selector="Button.close:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource DangerWash}" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Danger}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
Text input. Fluent draws a filled box with a thick focus underline; this design draws a hairline field
|
||||
that changes border colour, and the two do not sit together in one row.
|
||||
-->
|
||||
<Style Selector="TextBox">
|
||||
<Setter Property="Background" Value="{StaticResource Field}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Border}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
<Setter Property="SelectionBrush" Value="{StaticResource AccentSoft}" />
|
||||
<Setter Property="CaretBrush" Value="{StaticResource Accent}" />
|
||||
<Setter Property="MinHeight" Value="28" />
|
||||
<Setter Property="Padding" Value="8,4" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
</Style>
|
||||
<Style Selector="TextBox /template/ Border#PART_BorderElement">
|
||||
<Setter Property="Background" Value="{StaticResource Field}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Border}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="TextBox:pointerover /template/ Border#PART_BorderElement">
|
||||
<Setter Property="Background" Value="{StaticResource Field}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderMid}" />
|
||||
</Style>
|
||||
<Style Selector="TextBox:focus /template/ Border#PART_BorderElement">
|
||||
<Setter Property="Background" Value="{StaticResource Field}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource AccentSoft}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
</Style>
|
||||
<Style Selector="TextBox /template/ TextBlock#PART_Watermark">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
Lists. The rows in this design are drawn by their own templates and marked as selected with an accent
|
||||
strip down the left edge, so the theme's rounded blue selection block has to go — it would sit behind
|
||||
every row as a second, disagreeing highlight.
|
||||
-->
|
||||
<Style Selector="ListBox">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="ListBoxItem">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="ListBoxItem /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource Hover}" />
|
||||
</Style>
|
||||
<Style Selector="ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource AccentWash}" />
|
||||
</Style>
|
||||
<Style Selector="ListBoxItem:selected:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{StaticResource AccentWash}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
The status dot, in one place rather than as a converter in code.
|
||||
|
||||
Two states and not the design's three. Green means connected — a terminal is open on this host, or a
|
||||
connection to the server is held with nothing waiting to be sent. Grey means it is not. The design also
|
||||
has an amber dot, which would have to mean "reachable but not connected", and nothing in this
|
||||
application ever checks whether a host is reachable; a colour for a state nobody computes would be
|
||||
decoration that reads as information.
|
||||
|
||||
A style rather than a value converter so that the two colours are the palette's, once. A converter
|
||||
would have had to name #3CE88F in C#, which is how a green ends up one shade off in the fourth place
|
||||
it appears.
|
||||
-->
|
||||
<Style Selector="Ellipse.dot">
|
||||
<Setter Property="Width" Value="6" />
|
||||
<Setter Property="Height" Value="6" />
|
||||
<Setter Property="Fill" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
<Style Selector="Ellipse.dot.live">
|
||||
<Setter Property="Fill" Value="{StaticResource Accent}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
The accent strip a selected row carries, drawn by the row template rather than by the item, because the
|
||||
item's presenter is the thing the theme keeps repainting.
|
||||
-->
|
||||
<Style Selector="Border.rowmark">
|
||||
<Setter Property="Width" Value="2" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="ListBoxItem:selected Border.rowmark">
|
||||
<Setter Property="Background" Value="{StaticResource Accent}" />
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
The same strip on the vault's category rail, which is buttons rather than list items — so the class
|
||||
the rail sets stands in for the :selected pseudo-class.
|
||||
|
||||
It has to come after Border.rowmark, and that is not tidiness. Avalonia has no CSS specificity: two
|
||||
class selectors matching one element carry the same priority, and the later declaration wins. Declared
|
||||
above, "Background: Transparent" from Border.rowmark overrode this and the active category had no
|
||||
strip at all — which looks exactly like a rail that was never given one.
|
||||
-->
|
||||
<Style Selector="Button.cat Border.catmark">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="Button.cat.active Border.catmark">
|
||||
<Setter Property="Background" Value="{StaticResource Accent}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="ComboBox">
|
||||
<Setter Property="Background" Value="{StaticResource Field}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Border}" />
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
<Setter Property="MinHeight" Value="28" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
</Style>
|
||||
<Style Selector="NumericUpDown">
|
||||
<Setter Property="Background" Value="{StaticResource Field}" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Border}" />
|
||||
<Setter Property="CornerRadius" Value="4" />
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
<Setter Property="MinHeight" Value="28" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
</Style>
|
||||
<!--
|
||||
The foreground goes on the content presenter as well as on the control, for the same reason the
|
||||
buttons' brushes do: the Fluent theme sets its own there, and a Foreground set only on the CheckBox is
|
||||
a TemplateBinding the theme's own value wins over — which showed up as a label in the theme's blue-grey
|
||||
beside a hint in this palette's.
|
||||
-->
|
||||
<Style Selector="CheckBox">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="MinHeight" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="CheckBox /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource TextDim}" />
|
||||
</Style>
|
||||
<Style Selector="CheckBox:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Foreground" Value="{StaticResource Text}" />
|
||||
</Style>
|
||||
|
||||
</Application.Styles>
|
||||
|
||||
</Application>
|
||||
|
||||
Reference in New Issue
Block a user