mirror of
https://github.com/block/buzz.git
synced 2026-11-27 19:52:31 +00:00
## Summary - Organize mobile Messages into configurable flat sections. See All keeps the list and its search position when opening a conversation, and supports side-by-side browsing on an unfolded Duo. - Use the same 16-point Messages gutter in booklet and open Duo layouts. The regular iPhone uses 20 points. Align navigation actions and use native inline titles on See All. - Update mobile typography and spacing across chat rows, message bubbles, drafts, and the composer. Render code proportionally to the 17-point message body. ## Device review Compare the leading edges of the section headings and channel icons in Messages on the open Duo and in booklet mode. Open See All and check that its rows follow the same column. --------- Signed-off-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz> Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
31 lines
1.1 KiB
Dart
31 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'message_typography.dart';
|
|
|
|
/// The app's own code style — one place stating the mono face, its size and
|
|
/// the colours a code surface is drawn with.
|
|
///
|
|
/// Two surfaces render code and they have to read as one family: the fenced
|
|
/// block in `MessageContent`, and the inline chip `gpt_markdown` paints from
|
|
/// the `InlineCodeStyle` declared in `AppTheme`. Both take their values from
|
|
/// here, so neither can drift from the other by editing one copy.
|
|
abstract final class CodeStyle {
|
|
/// The mono face, already used by the composer and by code blocks.
|
|
static const fontFamily = 'GeistMono';
|
|
|
|
/// Relative size of rendered code, originally 13 points on a 15-point body.
|
|
static const fontSizeFactor = 13 / 15;
|
|
|
|
static final fontSize = messageBodyTextStyle.fontSize! * fontSizeFactor;
|
|
|
|
/// Line height of code text.
|
|
static const lineHeight = 1.5;
|
|
|
|
/// Fill behind a code surface.
|
|
static Color background(ColorScheme scheme) => scheme.surfaceContainerHighest;
|
|
|
|
/// Outline around a code surface.
|
|
static Color border(ColorScheme scheme) =>
|
|
scheme.outline.withValues(alpha: 0.7);
|
|
}
|