fix(app): polish glass diff and pipeline controls
This commit is contained in:
@@ -184,6 +184,9 @@ class FloatingDestinationBar extends StatelessWidget {
|
||||
child: CupertinoTabBar(
|
||||
backgroundColor: CupertinoColors.transparent,
|
||||
border: null,
|
||||
// Secondary-label translucency over glass falls below text contrast
|
||||
// requirements. The host label role remains readable in both themes.
|
||||
inactiveColor: CupertinoColors.label.resolveFrom(context),
|
||||
iconSize: 24,
|
||||
height: cupertinoHeight,
|
||||
currentIndex: currentIndex,
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
|
||||
/// A frosted-glass piece floating over content: the content behind is
|
||||
/// blurred inside the piece's [shape], under a translucent fill in the host's
|
||||
/// raised surface role (Material `surfaceContainerHigh`, Cupertino
|
||||
/// `systemGrey6`) and a hairline border.
|
||||
/// `systemGrey5`) and a hairline border.
|
||||
///
|
||||
/// Under the system's high-contrast setting the fill is solid and nothing is
|
||||
/// blurred. The Cupertino piece uses no Material widget; the Material piece
|
||||
@@ -34,7 +34,7 @@ class GlassPill extends StatelessWidget {
|
||||
static const double blurSigma = 16;
|
||||
|
||||
/// How much of the fill covers the blurred content.
|
||||
static const double fillOpacity = 0.72;
|
||||
static const double fillOpacity = 0.84;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -42,7 +42,9 @@ class GlassPill extends StatelessWidget {
|
||||
final Color base;
|
||||
final Color edge;
|
||||
if (cupertino) {
|
||||
base = CupertinoColors.systemGrey6.resolveFrom(context);
|
||||
// Grey 5 stays visibly raised over both the black dark canvas and the
|
||||
// white light canvas; Grey 6 disappears into either one when blurred.
|
||||
base = CupertinoColors.systemGrey5.resolveFrom(context);
|
||||
edge = CupertinoColors.separator.resolveFrom(context);
|
||||
} else {
|
||||
final scheme = Theme.of(context).colorScheme;
|
||||
@@ -52,7 +54,7 @@ class GlassPill extends StatelessWidget {
|
||||
final color = fill ?? (solid ? base : base.withValues(alpha: fillOpacity));
|
||||
final border = shape.copyWith(
|
||||
side: BorderSide(
|
||||
color: solid ? edge : edge.withValues(alpha: edge.a * 0.5),
|
||||
color: solid ? edge : edge.withValues(alpha: edge.a * 0.8),
|
||||
width: 0.5,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -128,6 +128,7 @@ class SegmentedTitlePill extends StatelessWidget {
|
||||
final theme = Theme.of(context);
|
||||
titleStyle = (theme.textTheme.titleSmall ?? const TextStyle()).copyWith(
|
||||
color: foreground ?? theme.colorScheme.onSurface,
|
||||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
subtitleStyle = (theme.textTheme.labelSmall ?? const TextStyle())
|
||||
.copyWith(color: foreground ?? theme.colorScheme.onSurfaceVariant);
|
||||
|
||||
Reference in New Issue
Block a user