add sidebar icon rail replacing top tab bar

Four new icon painters (git branch, search, terminal, warning).
ClideIconRail widget with parent-owned hover state so only one
icon highlights at a time. Sidebar slot renders content above +
icon rail below; workspace and context slots keep the tab bar.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-04-22 17:29:00 +02:00
co-authored by Claude
parent 1f23ba40f2
commit eda3b30382
7 changed files with 284 additions and 2 deletions
+27
View File
@@ -0,0 +1,27 @@
import 'dart:ui';
import 'package:clide_app/widgets/src/clide_icon.dart';
class GitBranchIcon extends ClideIconPainter {
const GitBranchIcon();
@override
void paint(Canvas canvas, Color color) {
final paint = Paint()
..color = color
..style = PaintingStyle.stroke
..strokeWidth = 0.08
..strokeCap = StrokeCap.round;
// Trunk line
canvas.drawLine(const Offset(0.35, 0.2), const Offset(0.35, 0.8), paint);
// Branch line
canvas.drawLine(const Offset(0.65, 0.3), const Offset(0.65, 0.5), paint);
canvas.drawLine(const Offset(0.65, 0.5), const Offset(0.35, 0.6), paint);
// Dots at nodes
final dot = Paint()
..color = color
..style = PaintingStyle.fill;
canvas.drawCircle(const Offset(0.35, 0.2), 0.06, dot);
canvas.drawCircle(const Offset(0.35, 0.8), 0.06, dot);
canvas.drawCircle(const Offset(0.65, 0.3), 0.06, dot);
}
}
+17
View File
@@ -0,0 +1,17 @@
import 'dart:ui';
import 'package:clide_app/widgets/src/clide_icon.dart';
class SearchIcon extends ClideIconPainter {
const SearchIcon();
@override
void paint(Canvas canvas, Color color) {
final paint = Paint()
..color = color
..style = PaintingStyle.stroke
..strokeWidth = 0.08
..strokeCap = StrokeCap.round;
canvas.drawCircle(const Offset(0.42, 0.42), 0.22, paint);
canvas.drawLine(const Offset(0.58, 0.58), const Offset(0.78, 0.78), paint);
}
}
@@ -0,0 +1,20 @@
import 'dart:ui';
import 'package:clide_app/widgets/src/clide_icon.dart';
class TerminalIcon extends ClideIconPainter {
const TerminalIcon();
@override
void paint(Canvas canvas, Color color) {
final paint = Paint()
..color = color
..style = PaintingStyle.stroke
..strokeWidth = 0.08
..strokeCap = StrokeCap.round;
// Prompt chevron >_
canvas.drawLine(const Offset(0.2, 0.3), const Offset(0.45, 0.5), paint);
canvas.drawLine(const Offset(0.45, 0.5), const Offset(0.2, 0.7), paint);
// Cursor line
canvas.drawLine(const Offset(0.5, 0.7), const Offset(0.8, 0.7), paint);
}
}
+28
View File
@@ -0,0 +1,28 @@
import 'dart:ui';
import 'package:clide_app/widgets/src/clide_icon.dart';
class WarningIcon extends ClideIconPainter {
const WarningIcon();
@override
void paint(Canvas canvas, Color color) {
final paint = Paint()
..color = color
..style = PaintingStyle.stroke
..strokeWidth = 0.08
..strokeCap = StrokeCap.round
..strokeJoin = StrokeJoin.round;
final path = Path()
..moveTo(0.5, 0.15)
..lineTo(0.85, 0.8)
..lineTo(0.15, 0.8)
..close();
canvas.drawPath(path, paint);
// Exclamation
canvas.drawLine(const Offset(0.5, 0.4), const Offset(0.5, 0.58), paint);
final dot = Paint()
..color = color
..style = PaintingStyle.fill;
canvas.drawCircle(const Offset(0.5, 0.68), 0.035, dot);
}
}