Rebrand as TPSchedule and refine clear liquid glass dock
This commit is contained in:
@@ -126,11 +126,11 @@ class _GlassDockState extends State<GlassDock> with TickerProviderStateMixin {
|
||||
colors: lens
|
||||
? [
|
||||
const Color(0xFFD8DBE0)
|
||||
.withValues(alpha: 0.72 * (1 - pressure * 0.91)),
|
||||
.withValues(alpha: 0.14 * (1 - pressure * 0.82)),
|
||||
const Color(0xFFC3C7CE)
|
||||
.withValues(alpha: 0.60 * (1 - pressure * 0.93)),
|
||||
.withValues(alpha: 0.08 * (1 - pressure * 0.82)),
|
||||
const Color(0xFFE5E7EB)
|
||||
.withValues(alpha: 0.72 * (1 - pressure * 0.90)),
|
||||
.withValues(alpha: 0.12 * (1 - pressure * 0.82)),
|
||||
]
|
||||
: [
|
||||
Colors.white.withValues(alpha: 0.028),
|
||||
@@ -145,7 +145,8 @@ class _GlassDockState extends State<GlassDock> with TickerProviderStateMixin {
|
||||
return ClipRRect(
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
child: GlassRefraction(
|
||||
strength: lens ? 0.25 + pressure * 0.95 : 0.32,
|
||||
strength: lens ? 0.70 + pressure * 0.70 : 0.55,
|
||||
blurSigma: lens ? 1.6 - pressure * 0.6 : 2,
|
||||
child: content,
|
||||
),
|
||||
);
|
||||
@@ -177,8 +178,8 @@ class _GlassDockState extends State<GlassDock> with TickerProviderStateMixin {
|
||||
borderRadius: BorderRadius.circular(40),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: _blue.withValues(alpha: 0.035),
|
||||
blurRadius: 12,
|
||||
color: const Color(0xFF4C6078).withValues(alpha: 0.075),
|
||||
blurRadius: 16,
|
||||
offset: const Offset(0, 5),
|
||||
),
|
||||
],
|
||||
@@ -288,15 +289,14 @@ class _GlassDockState extends State<GlassDock> with TickerProviderStateMixin {
|
||||
);
|
||||
}
|
||||
|
||||
/// Thin paired rims and directional glints suggest rounded optical thickness.
|
||||
/// All strong highlights stay on the edge; the centre remains clear.
|
||||
/// A diffuse silver bevel and thin directional glints show optical thickness.
|
||||
/// The painted highlights stay on the edge so background colour passes through.
|
||||
class _GlassRimPainter extends CustomPainter {
|
||||
const _GlassRimPainter({required this.lens});
|
||||
final bool lens;
|
||||
static const _blue = Color(0xFF007AFF);
|
||||
@override
|
||||
void paint(Canvas canvas, Size size) {
|
||||
final edge = lens ? const Color(0xFF7B838F) : _blue;
|
||||
final edge = lens ? const Color(0xFF7B838F) : const Color(0xFFAFBECF);
|
||||
final bounds = Offset.zero & size;
|
||||
final outer = RRect.fromRectAndRadius(
|
||||
bounds.deflate(0.7),
|
||||
@@ -306,6 +306,23 @@ class _GlassRimPainter extends CustomPainter {
|
||||
bounds.deflate(2.2),
|
||||
Radius.circular(size.height / 2 - 1.5),
|
||||
);
|
||||
canvas.drawRRect(
|
||||
outer,
|
||||
Paint()
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = lens ? 1.8 : 2.2
|
||||
..maskFilter = const MaskFilter.blur(BlurStyle.normal, 0.9)
|
||||
..shader = ui.Gradient.linear(
|
||||
bounds.topLeft,
|
||||
bounds.bottomRight,
|
||||
[
|
||||
Colors.white.withValues(alpha: 0.24),
|
||||
edge.withValues(alpha: 0.04),
|
||||
Colors.white.withValues(alpha: 0.14),
|
||||
],
|
||||
[0.0, 0.55, 1.0],
|
||||
),
|
||||
);
|
||||
canvas.drawRRect(
|
||||
outer,
|
||||
Paint()
|
||||
@@ -336,9 +353,9 @@ class _GlassRimPainter extends CustomPainter {
|
||||
bounds.topLeft,
|
||||
bounds.bottomRight,
|
||||
[
|
||||
Colors.white.withValues(alpha: 0.30),
|
||||
Colors.white.withValues(alpha: 0.20),
|
||||
edge.withValues(alpha: lens ? 0.13 : 0.07),
|
||||
Colors.white.withValues(alpha: 0.40),
|
||||
Colors.white.withValues(alpha: 0.28),
|
||||
],
|
||||
[0.0, 0.5, 1.0],
|
||||
),
|
||||
@@ -362,7 +379,7 @@ class _GlassRimPainter extends CustomPainter {
|
||||
Offset(size.width, 0),
|
||||
[
|
||||
Colors.white.withValues(alpha: 0),
|
||||
Colors.white.withValues(alpha: 0.65),
|
||||
Colors.white.withValues(alpha: 0.50),
|
||||
Colors.white.withValues(alpha: 0),
|
||||
],
|
||||
[0.0, 0.5, 1.0],
|
||||
|
||||
Reference in New Issue
Block a user