@@ -39,7 +39,8 @@ class ClideAccordion extends StatelessWidget {
|
||||
ClideIcon(expanded ? PhosphorIcons.caretDown : PhosphorIcons.caretRight, size: 10, color: tokens.globalTextMuted),
|
||||
const SizedBox(width: 6),
|
||||
if (leading != null) ...[leading!, const SizedBox(width: 6)],
|
||||
ClideText('$label · $count', fontSize: clideFontSmall, color: hovered ? tokens.globalForeground : tokens.sidebarSectionHeader, fontFamily: clideMonoFamily),
|
||||
ClideText('$label · $count',
|
||||
fontSize: clideFontSmall, color: hovered ? tokens.globalForeground : tokens.sidebarSectionHeader, fontFamily: clideMonoFamily),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -52,6 +52,5 @@ class _IconPainterAdapter extends CustomPainter {
|
||||
}
|
||||
|
||||
@override
|
||||
bool shouldRepaint(covariant _IconPainterAdapter old) =>
|
||||
old.painter != painter || old.color != color;
|
||||
bool shouldRepaint(covariant _IconPainterAdapter old) => old.painter != painter || old.color != color;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,10 @@ class ClideMarkdown extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [for (final c in el.children ?? const []) if (c is md.Element) _buildListItem(c, tokens, onRecordTap, ordered: false)],
|
||||
children: [
|
||||
for (final c in el.children ?? const [])
|
||||
if (c is md.Element) _buildListItem(c, tokens, onRecordTap, ordered: false)
|
||||
],
|
||||
),
|
||||
);
|
||||
case 'ol':
|
||||
@@ -266,12 +269,18 @@ class ClideMarkdown extends StatelessWidget {
|
||||
case 'strong':
|
||||
return TextSpan(
|
||||
style: const TextStyle(fontWeight: FontWeight.w700),
|
||||
children: [for (final c in el.children ?? const []) if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)],
|
||||
children: [
|
||||
for (final c in el.children ?? const [])
|
||||
if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)
|
||||
],
|
||||
);
|
||||
case 'em':
|
||||
return TextSpan(
|
||||
style: const TextStyle(fontStyle: FontStyle.italic),
|
||||
children: [for (final c in el.children ?? const []) if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)],
|
||||
children: [
|
||||
for (final c in el.children ?? const [])
|
||||
if (c is md.Text) TextSpan(text: _unescapeHtml(c.text)) else if (c is md.Element) _inlineElementSpan(c, tokens, onRecordTap)
|
||||
],
|
||||
);
|
||||
case 'code':
|
||||
return TextSpan(
|
||||
|
||||
@@ -151,12 +151,13 @@ class _Header extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
if (trailing != null) ...trailing!.map(
|
||||
(w) => Padding(
|
||||
padding: const EdgeInsets.only(left: 6),
|
||||
child: w,
|
||||
if (trailing != null)
|
||||
...trailing!.map(
|
||||
(w) => Padding(
|
||||
padding: const EdgeInsets.only(left: 6),
|
||||
child: w,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (onClose != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 6),
|
||||
|
||||
@@ -47,8 +47,5 @@ class ScrollbarTheme extends InheritedWidget {
|
||||
final Color track;
|
||||
|
||||
@override
|
||||
bool updateShouldNotify(ScrollbarTheme old) =>
|
||||
slider != old.slider ||
|
||||
sliderHover != old.sliderHover ||
|
||||
track != old.track;
|
||||
bool updateShouldNotify(ScrollbarTheme old) => slider != old.slider || sliderHover != old.sliderHover || track != old.track;
|
||||
}
|
||||
|
||||
@@ -37,8 +37,7 @@ class ClideText extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
final resolved =
|
||||
color ?? (muted ? tokens.globalTextMuted : tokens.globalForeground);
|
||||
final resolved = color ?? (muted ? tokens.globalTextMuted : tokens.globalForeground);
|
||||
return Text(
|
||||
data,
|
||||
maxLines: maxLines,
|
||||
|
||||
@@ -18,8 +18,7 @@ class PlugIcon extends ClideIconPainter {
|
||||
..moveTo(0.30, 0.30)
|
||||
..lineTo(0.60, 0.30)
|
||||
..lineTo(0.60, 0.55)
|
||||
..arcToPoint(const Offset(0.30, 0.55),
|
||||
radius: const Radius.circular(0.15), clockwise: false)
|
||||
..arcToPoint(const Offset(0.30, 0.55), radius: const Radius.circular(0.15), clockwise: false)
|
||||
..close();
|
||||
canvas.drawPath(body, p);
|
||||
// cord
|
||||
|
||||
Reference in New Issue
Block a user