- Текст во ВСЕХ кнопках по центру: HorizontalAlignment=Stretch + Horizontal/ VerticalContentAlignment=Center в стилях Button.pos/key/seg (раньше key/seg не наследовали центровку → цифры/«−/+»/«Сброс»/«⌫» липли влево-вверх). - Клавиатура оплаты — ровная сетка 3×4 одинаковых крупных клавиш (72px), цифры по центру. - Быстрые суммы и сегменты «Нал/Карта/Смешанная» — UniformGrid одинаковой ширины; сегменты слитным переключателем; «Без сдачи» не обрезается. - Модалка оплаты по высоте содержимого, по центру, на затемнённой подложке (#0F1F17 ~40%). - Правая панель: ровная 2-кол. сетка вторичных кнопок; добавлены «Возврат · F9» и «Внесение/Выплата · F10»; «Очистить · Esc» — красный контур во всю ширину; без пустот (блок компактный, Оплатить сразу под ИТОГО). - Строка корзины: степпер 44×44 с количеством по центру, отступ до иконки удаления. - Экран продажи снимается С ОБОЛОЧКОЙ (верхняя полоса + капсулы горячих клавиш); «Избранное» — шеврон ▾/▸. --uitest OK, 44 unit зелёные. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
169 lines
8.5 KiB
XML
169 lines
8.5 KiB
XML
<Styles xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
|
|
<!-- ── Карточки ─────────────────────────────────────────────────── -->
|
|
<Style Selector="Border.card">
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PosBorder}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="14"/>
|
|
<Setter Property="BoxShadow" Value="0 1 3 0 #14000000, 0 6 16 0 #0D000000"/>
|
|
</Style>
|
|
|
|
<!-- ── Чипы статуса (капсулы) ───────────────────────────────────── -->
|
|
<Style Selector="Border.chip">
|
|
<Setter Property="CornerRadius" Value="999"/>
|
|
<Setter Property="Padding" Value="12,6"/>
|
|
<Setter Property="Background" Value="{DynamicResource PosSubtle}"/>
|
|
</Style>
|
|
<Style Selector="Border.chip > TextBlock">
|
|
<Setter Property="Foreground" Value="{DynamicResource PosTextMuted}"/>
|
|
<Setter Property="FontSize" Value="13.5"/>
|
|
<Setter Property="FontWeight" Value="Medium"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style Selector="Border.chip.ok">
|
|
<Setter Property="Background" Value="{DynamicResource PosBrandSoft}"/>
|
|
</Style>
|
|
<Style Selector="Border.chip.ok > TextBlock"><Setter Property="Foreground" Value="{DynamicResource PosBrand}"/></Style>
|
|
<Style Selector="Border.chip.warn">
|
|
<Setter Property="Background" Value="{DynamicResource PosWarnSoft}"/>
|
|
</Style>
|
|
<Style Selector="Border.chip.warn > TextBlock"><Setter Property="Foreground" Value="{DynamicResource PosWarn}"/></Style>
|
|
|
|
<!-- ── Кнопки ───────────────────────────────────────────────────── -->
|
|
<Style Selector="Button.pos">
|
|
<Setter Property="Height" Value="50"/>
|
|
<Setter Property="MinHeight" Value="48"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="Padding" Value="16,0"/>
|
|
<Setter Property="CornerRadius" Value="12"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosText}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PosBorder}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
</Style>
|
|
<Style Selector="Button.pos /template/ ContentPresenter">
|
|
<Setter Property="Transitions">
|
|
<Transitions><BrushTransition Property="Background" Duration="0:0:0.08"/></Transitions>
|
|
</Setter>
|
|
</Style>
|
|
<Style Selector="Button.pos TextBlock">
|
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
|
<Setter Property="TextAlignment" Value="Center"/>
|
|
</Style>
|
|
|
|
<!-- Главная зелёная -->
|
|
<Style Selector="Button.primary">
|
|
<Setter Property="Background" Value="{DynamicResource PosBrand}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosBrandText}"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="FontWeight" Value="Bold"/>
|
|
</Style>
|
|
<Style Selector="Button.primary:pointerover /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource PosBrandHover}"/>
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource PosBrandText}"/>
|
|
</Style>
|
|
<Style Selector="Button.primary:pressed /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource PosBrandPressed}"/>
|
|
</Style>
|
|
|
|
<!-- Вторичная (контур) -->
|
|
<Style Selector="Button.ghost">
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosText}"/>
|
|
</Style>
|
|
<Style Selector="Button.ghost:pointerover /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource PosSubtle}"/>
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource PosText}"/>
|
|
</Style>
|
|
|
|
<!-- Опасная (красный контур, без заливки) -->
|
|
<Style Selector="Button.danger">
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosDanger}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PosDanger}"/>
|
|
</Style>
|
|
<Style Selector="Button.danger:pointerover /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource PosDangerSoft}"/>
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource PosDanger}"/>
|
|
</Style>
|
|
|
|
<!-- Клавиша клавиатуры/степпер -->
|
|
<Style Selector="Button.key">
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosText}"/>
|
|
<Setter Property="FontSize" Value="22"/>
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
<Setter Property="CornerRadius" Value="12"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PosBorder}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style Selector="Button.key /template/ ContentPresenter">
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style Selector="Button.key:pointerover /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource PosSubtle}"/>
|
|
</Style>
|
|
|
|
<!-- Сегмент переключателя (выбранный — зелёный) -->
|
|
<Style Selector="Button.seg">
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosText}"/>
|
|
<Setter Property="Height" Value="52"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style Selector="Button.seg /template/ ContentPresenter">
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style Selector="Button.seg.on">
|
|
<Setter Property="Background" Value="{DynamicResource PosBrand}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosBrandText}"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
</Style>
|
|
<Style Selector="Button.seg.on /template/ ContentPresenter">
|
|
<Setter Property="Background" Value="{DynamicResource PosBrand}"/>
|
|
</Style>
|
|
|
|
<!-- ── Поля ввода ──────────────────────────────────────────────── -->
|
|
<Style Selector="TextBox.pos">
|
|
<Setter Property="FontSize" Value="17"/>
|
|
<Setter Property="Height" Value="52"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="CornerRadius" Value="12"/>
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosText}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PosBorder}"/>
|
|
</Style>
|
|
<Style Selector="TextBox.search">
|
|
<Setter Property="FontSize" Value="19"/>
|
|
<Setter Property="Height" Value="58"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="CornerRadius" Value="14"/>
|
|
<Setter Property="Background" Value="{DynamicResource PosCard}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PosText}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PosBorder}"/>
|
|
</Style>
|
|
|
|
<!-- Капсулы горячих клавиш -->
|
|
<Style Selector="Border.hotkey">
|
|
<Setter Property="Background" Value="{DynamicResource PosSubtle}"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PosBorder}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="CornerRadius" Value="8"/>
|
|
<Setter Property="Padding" Value="9,4"/>
|
|
</Style>
|
|
</Styles>
|