Programm-Icon an allen Stellen gesetzt
Das Projekt setzte nirgends ein Icon - weder <ApplicationIcon> noch Window.Icon, und in der Web-UI kein Favicon. Auf dem Server trugen dadurch alle unsere Anwendungen dasselbe generische Platzhalter-Icon und waren in Explorer und Taskleiste nicht auseinanderzuhalten. Assets/predictalytics.ico ist die einzige Quelle, alles andere daraus abgeleitet (Ableitung und Neuerzeugung: Assets/README.md): * <ApplicationIcon> im Shell-Projekt - Explorer, Taskleiste, Task-Manager * Window.Icon in MainWindow und LicenseWindow; die im Code gebauten Dialoge erben es vom Besitzerfenster * favicon.ico, apple-touch-icon.png und icon-192/512.png in der Web-UI, verlinkt aus index.html, landing.html und docs.html Fuer das Fenstericon bewusst PNG statt ICO: Skia dekodiert kein ICO, unter Linux waere der Fensteraufbau sonst gescheitert. Die .ico bleibt per Exclude aus dem AvaloniaResource-Glob - sie geht ueber <ApplicationIcon> in die Programmdatei und muss nicht zusaetzlich in die Assembly. Der XAML-Compiler prueft Asset-URIs nicht (ein falscher Pfad baut fehlerfrei durch), deshalb gegen die gebaute Assembly verifiziert: beide relativen URIs loesen auf, WindowIcon dekodiert sie, der Gegentest mit einem nicht vorhandenen Pfad schlaegt fehl. Bugtracker: #418 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -4,6 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Predictalytics API Reference</title>
|
||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||||
<link rel="icon" type="image/png" href="/icon-192.png" sizes="192x192">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Roboto+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -5,6 +5,9 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Predictalytics — Multi-Platform Prediction Market Smart-Money Tracker & Analytics">
|
||||
<title>Predictalytics</title>
|
||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||||
<link rel="icon" type="image/png" href="/icon-192.png" sizes="192x192">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<link rel="stylesheet" href="css/style.css?v=20260715">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.4/dist/chart.umd.min.js"></script>
|
||||
</head>
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Predictalytics — See every trader and market before the crowd does</title>
|
||||
<link rel="icon" href="/favicon.ico" sizes="any">
|
||||
<link rel="icon" type="image/png" href="/icon-192.png" sizes="192x192">
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Roboto+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# Programm-Icon
|
||||
|
||||
`predictalytics.ico` ist die **einzige Quelle**. Alles andere ist daraus abgeleitet:
|
||||
|
||||
| Datei | Wozu |
|
||||
|---|---|
|
||||
| `predictalytics.ico` (9 Größen, 16–256) | `<ApplicationIcon>` in `Predictalytics.Shell.csproj` — Explorer, Taskleiste, Task-Manager unter Windows |
|
||||
| `predictalytics.png` (256) | `Window.Icon` in `MainWindow.axaml` und `LicenseWindow.axaml`; Dialoge erben es vom Besitzerfenster. Bewusst PNG, weil Skia unter Linux kein ICO dekodiert |
|
||||
| `Predictalytics.Api/wwwroot/favicon.ico` (16–48) | Browser-Tab der Web-UI |
|
||||
| `Predictalytics.Api/wwwroot/apple-touch-icon.png` (180) | iOS-Homescreen |
|
||||
| `Predictalytics.Api/wwwroot/icon-192.png`, `icon-512.png` | Verlinkt aus `index.html`, `landing.html`, `docs.html` |
|
||||
|
||||
Ersetzt du das Icon, tausche `predictalytics.ico` aus und erzeuge den Rest neu:
|
||||
|
||||
```bash
|
||||
python - <<'PY'
|
||||
from PIL import Image
|
||||
src = 'src/Predictalytics.Shell/Assets/predictalytics.ico'
|
||||
im = Image.open(src); im.size = (256, 256); im.load(); im = im.convert('RGBA')
|
||||
im.save('src/Predictalytics.Shell/Assets/predictalytics.png', optimize=True)
|
||||
im.save('src/Predictalytics.Api/wwwroot/favicon.ico',
|
||||
sizes=[(16,16),(24,24),(32,32),(48,48)])
|
||||
for n, name in [(180,'apple-touch-icon.png'), (192,'icon-192.png'), (512,'icon-512.png')]:
|
||||
im.resize((n,n), Image.LANCZOS).save(f'src/Predictalytics.Api/wwwroot/{name}', optimize=True)
|
||||
PY
|
||||
```
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 166 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
@@ -9,8 +9,18 @@
|
||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<!-- Icon der Programmdatei. Unter Windows das, was Explorer, Taskleiste und
|
||||
Task-Manager anzeigen — ohne das traegt jede unserer Anwendungen auf dem
|
||||
Server dasselbe generische Platzhalter-Icon. -->
|
||||
<ApplicationIcon>Assets\predictalytics.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Fenstericon fuer Avalonia. Die .ico bleibt aussen vor: sie geht ueber
|
||||
<ApplicationIcon> in die Programmdatei, und Skia dekodiert ohnehin nur PNG. -->
|
||||
<AvaloniaResource Include="Assets\**" Exclude="Assets\predictalytics.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" />
|
||||
<PackageReference Include="Avalonia.Desktop" />
|
||||
|
||||
@@ -37,7 +37,10 @@ public static class Dialogs
|
||||
MaxWidth = 640,
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner,
|
||||
CanResize = false,
|
||||
ShowInTaskbar = false
|
||||
ShowInTaskbar = false,
|
||||
// Ohne das zeigt die Titelleiste des Dialogs das leere Standardsymbol
|
||||
// statt des Programmicons.
|
||||
Icon = owner.Icon
|
||||
};
|
||||
|
||||
for (var i = 0; i < buttons.Length; i++)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="Predictalytics.Shell.Views.LicenseWindow"
|
||||
Title="Predictalytics — Lizenzaktivierung"
|
||||
Icon="/Assets/predictalytics.png"
|
||||
Width="580" SizeToContent="Height"
|
||||
CanResize="False"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
x:Class="Predictalytics.Shell.Views.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Title="Predictalytics Analytics — Backend Server"
|
||||
Icon="/Assets/predictalytics.png"
|
||||
Width="1400" Height="900"
|
||||
MinWidth="900" MinHeight="600"
|
||||
WindowStartupLocation="CenterScreen">
|
||||
|
||||
Reference in New Issue
Block a user