add Phosphor Icons font and wire into icon rails

Phosphor Icons v2.0.8 (MIT) — regular, bold, and fill weights
bundled under assets/fonts/phosphor/. PhosphorIconPainter bridges
the font glyphs into the existing ClideIconPainter interface via
Paragraph API so icon rails, pane headers, and any widget using
ClideIcon can consume them. Sidebar and context panel icon rails
now use Phosphor glyphs instead of hand-painted CustomPaint icons.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-22 23:10:40 +02:00
co-authored by Claude Opus 4.6
parent 82c63da3ad
commit cab92b0c6e
10 changed files with 128 additions and 8 deletions
+4
View File
@@ -49,6 +49,10 @@ heading, and (b) bumping `project.yaml` `version:` in the same commit.
and context panel sizes, active sections, and editor split ratio
saved to `.clide/settings.yaml` (D-053, T-032).
- Phosphor Icons font (v2.0.8, MIT) — regular, bold, and fill
weights. Replaces hand-painted CustomPaint icons in sidebar and
context panel icon rails.
### Changed
- Workspace renders Claude as the always-visible primary surface
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Phosphor Icons
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+12
View File
@@ -66,6 +66,18 @@ dependencies:
range available via the variable-font weight axis.
weights_bundled: [VariableFont, Italic-VariableFont]
- name: Phosphor Icons
kind: font
version: "2.0.8"
homepage: https://phosphoricons.com
license: MIT
license_file: assets/fonts/phosphor/LICENSE
purpose: >-
Icon font for UI glyphs throughout the IDE — sidebar sections,
context panel, toolbar, and editor chrome. Regular, Bold, and
Fill weights bundled.
weights_bundled: [Regular, Bold, Fill]
- name: yaml
kind: dart-package
version: "3.1.3"
+11 -8
View File
@@ -305,11 +305,13 @@ class _SidebarSlot extends StatelessWidget {
static ClideIconPainter _iconFor(TabContribution t) {
if (t.icon is ClideIconPainter) return t.icon as ClideIconPainter;
return switch (t.id) {
'files.tree' => const FolderIcon(),
'git.panel' => const GitBranchIcon(),
'pql.panel' => const SearchIcon(),
'problems.panel' => const WarningIcon(),
_ => const DotIcon(),
'files.tree' => PhosphorIcons.folder,
'git.panel' => PhosphorIcons.gitBranch,
'pql.panel' => PhosphorIcons.magnifyingGlass,
'problems.panel' => PhosphorIcons.warningCircle,
'decisions.panel' => PhosphorIcons.lightbulb,
'tickets.panel' => PhosphorIcons.ticket,
_ => PhosphorIcons.circlesFour,
};
}
}
@@ -445,9 +447,10 @@ class _ContextSlot extends StatelessWidget {
static ClideIconPainter _iconFor(TabContribution t) {
if (t.icon is ClideIconPainter) return t.icon as ClideIconPainter;
return switch (t.id) {
'markdown.viewer' => const DotIcon(),
'graph.view' => const SearchIcon(),
_ => const DotIcon(),
'markdown.viewer' => PhosphorIcons.eye,
'graph.view' => PhosphorIcons.graph,
'pql.backlinks' => PhosphorIcons.link,
_ => PhosphorIcons.circlesFour,
};
}
}
+71
View File
@@ -0,0 +1,71 @@
import 'dart:ui' as ui;
import 'package:clide_app/widgets/src/clide_icon.dart';
class PhosphorIconPainter extends ClideIconPainter {
const PhosphorIconPainter(this.codePoint, {this.family = 'Phosphor'});
final int codePoint;
final String family;
@override
void paint(ui.Canvas canvas, ui.Color color) {
final builder = ui.ParagraphBuilder(ui.ParagraphStyle(fontFamily: family, fontSize: 0.88, height: 1.0))
..pushStyle(ui.TextStyle(color: color, fontFamily: family))
..addText(String.fromCharCode(codePoint));
final paragraph = builder.build()..layout(const ui.ParagraphConstraints(width: 1.0));
final dx = (1.0 - paragraph.maxIntrinsicWidth) / 2;
final dy = (1.0 - paragraph.height) / 2;
canvas.drawParagraph(paragraph, ui.Offset(dx, dy));
}
@override
bool operator ==(Object other) => other is PhosphorIconPainter && other.codePoint == codePoint && other.family == family;
@override
int get hashCode => Object.hash(codePoint, family);
}
abstract class PhosphorIcons {
static const folder = PhosphorIconPainter(0xe24a);
static const fileText = PhosphorIconPainter(0xe23a);
static const gitBranch = PhosphorIconPainter(0xe278);
static const gitCommit = PhosphorIconPainter(0xe27a);
static const gitDiff = PhosphorIconPainter(0xe27c);
static const gitPullRequest = PhosphorIconPainter(0xe282);
static const magnifyingGlass = PhosphorIconPainter(0xe30c);
static const terminal = PhosphorIconPainter(0xe47e);
static const terminalWindow = PhosphorIconPainter(0xeae8);
static const code = PhosphorIconPainter(0xe1bc);
static const codeBlock = PhosphorIconPainter(0xeafe);
static const pencilSimple = PhosphorIconPainter(0xe3b4);
static const eye = PhosphorIconPainter(0xe220);
static const eyeSlash = PhosphorIconPainter(0xe224);
static const arrowsOutSimple = PhosphorIconPainter(0xe0a6);
static const arrowsInSimple = PhosphorIconPainter(0xe09e);
static const list = PhosphorIconPainter(0xe2f0);
static const listChecks = PhosphorIconPainter(0xeadc);
static const gear = PhosphorIconPainter(0xe270);
static const puzzlePiece = PhosphorIconPainter(0xe596);
static const keyboard = PhosphorIconPainter(0xe2d8);
static const palette = PhosphorIconPainter(0xe6c8);
static const warning = PhosphorIconPainter(0xe4e0);
static const warningCircle = PhosphorIconPainter(0xe4e2);
static const check = PhosphorIconPainter(0xe182);
static const checkCircle = PhosphorIconPainter(0xe184);
static const caretLeft = PhosphorIconPainter(0xe138);
static const caretRight = PhosphorIconPainter(0xe13a);
static const caretDown = PhosphorIconPainter(0xe136);
static const caretUp = PhosphorIconPainter(0xe13c);
static const graph = PhosphorIconPainter(0xeb58);
static const treeStructure = PhosphorIconPainter(0xe67c);
static const image = PhosphorIconPainter(0xe2ca);
static const link = PhosphorIconPainter(0xe2e2);
static const chatCircle = PhosphorIconPainter(0xe168);
static const robot = PhosphorIconPainter(0xe762);
static const ticket = PhosphorIconPainter(0xe490);
static const lightbulb = PhosphorIconPainter(0xe2dc);
static const notepad = PhosphorIconPainter(0xe63e);
static const bookOpen = PhosphorIconPainter(0xe0e6);
static const circlesFour = PhosphorIconPainter(0xe190);
}
+1
View File
@@ -30,3 +30,4 @@ export 'src/icons/search.dart';
export 'src/icons/terminal_icon.dart';
export 'src/icons/warning.dart';
export 'src/icons/x.dart';
export 'src/icons/phosphor.dart';
+8
View File
@@ -70,6 +70,7 @@ flutter:
- assets/LICENSE
- assets/fonts/jetbrains_mono/OFL.txt
- assets/fonts/josefin_sans/OFL.txt
- assets/fonts/phosphor/LICENSE
- assets/logo/clide-logo.svg
- assets/logo/clide-logo-16.png
- assets/logo/clide-logo-32.png
@@ -97,6 +98,13 @@ flutter:
- asset: assets/fonts/josefin_sans/JosefinSans-Italic-VariableFont.ttf
style: italic
- family: Phosphor
fonts:
- asset: assets/fonts/phosphor/Phosphor.ttf
- asset: assets/fonts/phosphor/Phosphor-Bold.ttf
weight: 700
- asset: assets/fonts/phosphor/Phosphor-Fill.ttf
- family: JetBrainsMono
fonts:
- asset: assets/fonts/jetbrains_mono/JetBrainsMono-Regular.ttf