diff --git a/AGENTS.md b/AGENTS.md index 43a494a..9a83f64 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1134,6 +1134,7 @@ install. Sparkle would also catch it, but later and less clearly. - **`textTheme.small` is the *label* role, not body copy.** It is `w500` at `height: 1.0` (`font-medium leading-none`), so prose set in it reads bold and cramped the moment it wraps. Use it for single-line labels, list rows and badges. For anything that wraps use `textTheme.muted` (`w400`, `height: 1.43`), and for a dialog's lead paragraph use `ShadDialog`'s `description` slot, which resolves to `style.body` over `textTheme.muted`. The agent transcript is the one place that keeps `small` for prose, and only because it sets an explicit `height: 1.4`. - **Custom widgets read the theme; they do not carry colors.** Use `scheme.*` for color, `theme.radii.{sm,md,lg,full}` for corners and `theme.style.*` for geometry — a literal `Color(0x…)` or `BorderRadius.circular(n)` in a widget is the thing to fix, not to match. Failure states are `scheme.destructive`, never a private red. - **Success and warning have no shadcn token**, so they ride in the scheme's `custom` map and are read through the `AppColorScheme` extension as `scheme.success` / `scheme.warning`. One value per status, picked to be legible on that brightness's background, covers both the dot and its label. +- **The app icon is `AppIcon.appiconset` on macOS and `windows/runner/resources/app_icon.ico` on Windows** — separate artwork, each from the design's icon set, so neither is generated from the other. `ASSETCATALOG_COMPILER_APPICON_NAME` must name `AppIcon`: an Icon Composer `AppStudio.icon` used to be the one built, which left the asset catalog's PNGs unused, so replacing them changed nothing. macOS 27 draws the flat icon as is, with no grey frame (checked through `NSWorkspace.icon(forFile:)`). After changing the icon, a dev build keeps showing the old one even through `flutter clean` and a Dock restart: macOS caches it per bundle path and a rebuild does not invalidate that. `touch` the built `.app`, then `lsregister -f` it, and relaunch. - **Layout constants** (`app_theme.dart`): `kPaneHeaderHeight` (36), `kDividerWidth` (1), `paneBorderSide()`, `kSplitHandleWidth` (6). - **Pane chrome:** headers use `scheme.muted`; content uses `scheme.background`. Use `paneBorderSide()` for all 1px dividers. - **Segmented controls:** `IconSegmentedControl` / `TextSegmentedControl` share `widgets/segmented_control_theme.dart`, which resolves color and geometry from the theme's **tab** tokens — the strip/segment treatment `ShadTabs` uses — so both follow the style preset like a built-in. Hover moves the *foreground*, not the fill, so no blend has to be invented. `onMutedSurface: true` on muted pane headers swaps track and selection. diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 65142c7..9cf72da 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -30,7 +30,6 @@ 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; 5A9911000000000000000001 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = 5A9911000000000000000002 /* Sparkle */; }; 5A9911000000000000000003 /* SparkleUpdater.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A9911000000000000000004 /* SparkleUpdater.swift */; }; - 77FDB9B9303431C100759E68 /* AppStudio.icon in Resources */ = {isa = PBXBuildFile; fileRef = 77FDB9B8303431C100759E68 /* AppStudio.icon */; }; 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; 88AA0344F35BF430AF8EE926 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01A93DD7577AC0E234CE14A5 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ @@ -86,7 +85,6 @@ 4825E73DECD60EA9E4836D3D /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 585EA1EB157CA33A28EF8ADF /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; 5A9911000000000000000004 /* SparkleUpdater.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SparkleUpdater.swift; sourceTree = ""; }; - 77FDB9B8303431C100759E68 /* AppStudio.icon */ = {isa = PBXFileReference; lastKnownFileType = folder.iconcomposer.icon; path = AppStudio.icon; sourceTree = ""; }; 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 8CDA655EF489484D1D9F5E88 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; @@ -190,7 +188,6 @@ 5A9911000000000000000004 /* SparkleUpdater.swift */, 33E51913231747F40026EE4D /* DebugProfile.entitlements */, 33E51914231749380026EE4D /* Release.entitlements */, - 77FDB9B8303431C100759E68 /* AppStudio.icon */, 33CC11242044D66E0003C045 /* Resources */, 33BA886A226E78AF003329D5 /* Configs */, ); @@ -338,7 +335,6 @@ files = ( 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - 77FDB9B9303431C100759E68 /* AppStudio.icon in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -630,7 +626,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppStudio; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; @@ -765,7 +761,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppStudio; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; @@ -788,7 +784,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppStudio; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; diff --git a/macos/Runner/AppStudio.icon/Assets/logo-avatar.svg b/macos/Runner/AppStudio.icon/Assets/logo-avatar.svg deleted file mode 100644 index 85fa3a6..0000000 --- a/macos/Runner/AppStudio.icon/Assets/logo-avatar.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/macos/Runner/AppStudio.icon/icon.json b/macos/Runner/AppStudio.icon/icon.json deleted file mode 100644 index 0c3d07a..0000000 --- a/macos/Runner/AppStudio.icon/icon.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "fill-specializations" : [ - { - "value" : { - "linear-gradient" : [ - "display-p3:0.43922,0.85882,0.97647,1.00000", - "display-p3:0.20737,0.43690,0.96863,1.00000" - ], - "orientation" : { - "start" : { - "x" : 0.5, - "y" : 0 - }, - "stop" : { - "x" : 0.5, - "y" : 0.7 - } - } - } - }, - { - "appearance" : "dark", - "value" : { - "linear-gradient" : [ - "display-p3:0.19402,0.41054,0.68160,1.00000", - "display-p3:0.08777,0.15950,0.32372,1.00000" - ], - "orientation" : { - "start" : { - "x" : 0.5, - "y" : 0 - }, - "stop" : { - "x" : 0.5, - "y" : 0.7 - } - } - } - } - ], - "groups" : [ - { - "layers" : [ - { - "fill" : { - "solid" : "srgb:1.00000,1.00000,1.00000,1.00000" - }, - "image-name" : "logo-avatar.svg", - "name" : "logo-avatar", - "opacity-specializations" : [ - { - "value" : 0.9 - }, - { - "appearance" : "dark", - "value" : 0.8 - } - ], - "position" : { - "scale" : 3.17, - "translation-in-points" : [ - 0, - -1 - ] - } - } - ], - "shadow" : { - "kind" : "neutral", - "opacity" : 0.5 - }, - "translucency" : { - "enabled" : true, - "value" : 0.5 - } - }, - { - "layers" : [ - - ], - "shadow" : { - "kind" : "neutral", - "opacity" : 0.5 - }, - "translucency" : { - "enabled" : true, - "value" : 0.5 - } - } - ], - "supported-platforms" : { - "circles" : [ - "watchOS" - ], - "squares" : "shared" - } -} \ No newline at end of file diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png index 82b6f9d..0f987b1 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png index 13b35eb..59a45b8 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png index 0a3f5fa..4918e17 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png index bdb5722..4c4caca 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png index f083318..84a5526 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png index 326c0e7..fd6a2bf 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png index 2f1632c..c588bcf 100644 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/specs/windows_port.md b/specs/windows_port.md index 65b660f..bb1f60d 100644 --- a/specs/windows_port.md +++ b/specs/windows_port.md @@ -884,8 +884,9 @@ is greyed out (Phase 5). - **Runner:** - Product metadata: Serverpod, "App Studio". - - The App Studio icon, built from the macOS PNGs by - `tool/windows/make_icon.dart` (PNG entries in an `.ico`). + - The App Studio icon. It was first built from the macOS PNGs by + `tool/windows/make_icon.dart`; the icon set now ships its own Windows + artwork as an `.ico`, which is copied in as is, and the script is gone. - One instance at a time: the `Serverpod.AppStudio.Running` mutex; a second launch brings the first window forward. - AppUserModelID `Serverpod.AppStudio`. diff --git a/tool/windows/make_icon.dart b/tool/windows/make_icon.dart deleted file mode 100644 index 900ef5c..0000000 --- a/tool/windows/make_icon.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Builds windows/runner/resources/app_icon.ico from the macOS app icon PNGs, -// so both platforms show the same icon from one source. -// -// dart run tool/windows/make_icon.dart -// -// An .ico can hold PNG images directly (Windows Vista and later), so the -// PNGs go in unchanged: no resampling, no image library. -import 'dart:io'; -import 'dart:typed_data'; - -const _source = 'macos/Runner/Assets.xcassets/AppIcon.appiconset'; -const _target = 'windows/runner/resources/app_icon.ico'; -const _sizes = [16, 32, 64, 128, 256]; - -void main() { - final images = [ - for (final size in _sizes) - File('$_source/app_icon_$size.png').readAsBytesSync(), - ]; - final header = ByteData(6) - ..setUint16(0, 0, Endian.little) // reserved - ..setUint16(2, 1, Endian.little) // type: icon - ..setUint16(4, images.length, Endian.little); - final out = BytesBuilder()..add(header.buffer.asUint8List()); - var offset = 6 + 16 * images.length; - for (final (i, png) in images.indexed) { - final size = _sizes[i]; - final entry = ByteData(16) - ..setUint8(0, size == 256 ? 0 : size) // 0 means 256 - ..setUint8(1, size == 256 ? 0 : size) - ..setUint8(2, 0) // palette colours - ..setUint8(3, 0) // reserved - ..setUint16(4, 1, Endian.little) // colour planes - ..setUint16(6, 32, Endian.little) // bits per pixel - ..setUint32(8, png.length, Endian.little) - ..setUint32(12, offset, Endian.little); - out.add(entry.buffer.asUint8List()); - offset += png.length; - } - for (final png in images) { - out.add(png); - } - File(_target).writeAsBytesSync(out.takeBytes()); - stdout.writeln('Wrote $_target (${_sizes.join(', ')} px).'); -} diff --git a/windows/runner/resources/app_icon.ico b/windows/runner/resources/app_icon.ico index 54290a4..aef8ffc 100644 Binary files a/windows/runner/resources/app_icon.ico and b/windows/runner/resources/app_icon.ico differ