add type scale constants; remove scattered font size overrides
Sidebar and panel text was too small — dozens of bare fontSize: 10/11/12 values fighting the ambient DefaultTextStyle. Root font bumped from 13 to 14. Three semantic constants replace the magic numbers: clideFontBody (14), clideFontCaption (12), clideFontMono (13). Widgets that render body text now inherit instead of overriding. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import 'clide_divider.dart';
|
||||
import 'clide_icon.dart';
|
||||
import 'clide_text.dart';
|
||||
import 'icons/x.dart';
|
||||
import 'typography.dart';
|
||||
|
||||
/// Shared chrome for any pane that sits in a tab or split: a title
|
||||
/// strip at the top, an optional close button, and the pane body
|
||||
@@ -146,7 +147,7 @@ class _Header extends StatelessWidget {
|
||||
children: [
|
||||
ClideText(
|
||||
title,
|
||||
fontSize: 12,
|
||||
fontSize: clideFontCaption,
|
||||
color: tokens.panelHeaderForeground,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -154,7 +155,7 @@ class _Header extends StatelessWidget {
|
||||
if (subtitle != null)
|
||||
ClideText(
|
||||
subtitle!,
|
||||
fontSize: 11,
|
||||
fontSize: clideFontCaption,
|
||||
muted: true,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
@@ -20,7 +20,7 @@ class ClidePtyView extends StatelessWidget {
|
||||
this.label,
|
||||
this.focusNode,
|
||||
this.autofocus = false,
|
||||
this.fontSize = 13,
|
||||
this.fontSize = clideFontMono,
|
||||
});
|
||||
|
||||
final Terminal terminal;
|
||||
|
||||
@@ -15,7 +15,7 @@ class ClideText extends StatelessWidget {
|
||||
this.data, {
|
||||
super.key,
|
||||
this.color,
|
||||
this.fontSize = 13,
|
||||
this.fontSize = 14,
|
||||
this.fontFamily,
|
||||
this.fontWeight,
|
||||
this.muted = false,
|
||||
|
||||
@@ -46,6 +46,17 @@ const List<String> clideUiFamilyFallback = [
|
||||
/// The bundled monospace family. Always resolved first.
|
||||
const String clideMonoFamily = 'JetBrainsMono';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Type scale — semantic sizes. Widgets inherit from the ambient
|
||||
// DefaultTextStyle (set at the app root). Only override when the
|
||||
// semantic role genuinely differs from body text. Prefer these
|
||||
// constants over bare numbers so the scale stays coherent.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const double clideFontBody = 14;
|
||||
const double clideFontCaption = 12;
|
||||
const double clideFontMono = 13;
|
||||
|
||||
/// System fallback chain. Ordered by platform prevalence + quality of
|
||||
/// programming-ligature / box-drawing coverage.
|
||||
const List<String> clideMonoFamilyFallback = [
|
||||
|
||||
Reference in New Issue
Block a user