feat: App-Icon auf Eiskunstlauf-Silhouette umstellen
- Icon aus der Workbench-Vorlage (Biellmann-Silhouette) als weißes Motiv auf dunklem Navy, 1024 px Master für Desktop/macOS - Android-Launcher-Icons (Legacy, Adaptive, Monochrom) neu erzeugt - tools/make_app_icons.py erzeugt alle Varianten reproduzierbar aus einer Silhouetten-PNG - alte SVG-Icons entfernt, project.godot zeigt auf app_icon.png - docs/builds.md angepasst
|
|
@ -87,7 +87,8 @@ dem Godot-Template. Das Manifest referenziert nur `@mipmap/icon`; die Warnung
|
|||
ist folgenlos.
|
||||
|
||||
- Paket: `de.rinkplanner.app`, Label „Rinkplanner“, Version 0.1.0
|
||||
- App-Icon aus `rinkplanner/icon.svg` (Launcher-Icons unter
|
||||
- App-Icon aus der Silhouetten-Vorlage, erzeugt mit
|
||||
`tools/make_app_icons.py` (Launcher-Icons unter
|
||||
`rinkplanner/assets/icons/android/`)
|
||||
- `minSdk 24`, `targetSdk 36`, ABI **arm64-v8a** (Galaxy Tab S9+)
|
||||
- Landscape, Immersive Mode, `resizeableActivity=true`
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 9.5 KiB |
BIN
rinkplanner/assets/icons/app_icon.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c360p00qqrprd"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
uid="uid://dx1ysnce0moky"
|
||||
path="res://.godot/imported/app_icon.png-9a69111674c8dca1e760c9c054aa6873.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
source_file="res://assets/icons/app_icon.png"
|
||||
dest_files=["res://.godot/imported/app_icon.png-9a69111674c8dca1e760c9c054aa6873.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -38,6 +38,3 @@ process/hdr_as_srgb=false
|
|||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="432" height="432" viewBox="0 0 128 128">
|
||||
<g transform="translate(64 64) scale(0.66) translate(-64 -64)">
|
||||
<rect x="20" y="34" width="88" height="60" rx="22" fill="none" stroke="#eef6fb" stroke-width="5"/>
|
||||
<line x1="64" y1="34" x2="64" y2="94" stroke="#dc2626" stroke-width="4" opacity="0.55"/>
|
||||
<path d="M28 82 C 46 82 50 60 64 60 C 78 60 82 76 100 76"
|
||||
fill="none" stroke="#dc2626" stroke-width="7"
|
||||
stroke-linecap="round"/>
|
||||
<circle cx="100" cy="76" r="6" fill="#f8fafc" stroke="#dc2626" stroke-width="3.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 605 B |
|
|
@ -1,43 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c57tr8h4rw10t"
|
||||
path="res://.godot/imported/icon_foreground.svg-9362c3bcea0c351cf11ae5f264f1c60b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/icons/icon_foreground.svg"
|
||||
dest_files=["res://.godot/imported/icon_foreground.svg-9362c3bcea0c351cf11ae5f264f1c60b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128">
|
||||
<rect width="128" height="128" rx="26" fill="#0b1220"/>
|
||||
<rect x="20" y="34" width="88" height="60" rx="22" fill="none" stroke="#eef6fb" stroke-width="4"/>
|
||||
<line x1="64" y1="34" x2="64" y2="94" stroke="#dc2626" stroke-width="3" opacity="0.55"/>
|
||||
<path d="M28 82 C 46 82 50 60 64 60 C 78 60 82 76 100 76"
|
||||
fill="none" stroke="#dc2626" stroke-width="6"
|
||||
stroke-linecap="round"/>
|
||||
<circle cx="100" cy="76" r="5" fill="#f8fafc" stroke="#dc2626" stroke-width="3"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 576 B |
|
|
@ -13,7 +13,7 @@ config_version=5
|
|||
config/name="Rinkplanner"
|
||||
run/main_scene="res://scenes/whiteboard/whiteboard.tscn"
|
||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
config/icon="res://assets/icons/app_icon.png"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
|
|
|
|||
108
tools/make_app_icons.py
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Erzeugt die App-Icons aus einer Silhouetten-Vorlage.
|
||||
|
||||
Aufruf:
|
||||
python3 tools/make_app_icons.py pfad/zur/silhouette.png
|
||||
|
||||
Die Vorlage muss eine Silhouette mit Alphakanal sein (Form = Deckkraft).
|
||||
Erzeugt:
|
||||
rinkplanner/assets/icons/app_icon.png 1024x1024 (Desktop/macOS)
|
||||
rinkplanner/assets/icons/android/ic_launcher_192.png Legacy-Launcher
|
||||
.../ic_launcher_foreground_432.png Adaptive Foreground
|
||||
.../ic_launcher_background_432.png Adaptive Background
|
||||
.../ic_launcher_monochrome_432.png Themed Icon
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
REPO = Path(__file__).resolve().parent.parent
|
||||
ICONS = REPO / "rinkplanner" / "assets" / "icons"
|
||||
ANDROID = ICONS / "android"
|
||||
|
||||
BACKGROUND = (11, 18, 32, 255) # #0b1220, passt zur App-Oberfläche
|
||||
SILHOUETTE = (255, 255, 255, 255)
|
||||
MASTER_SIZE = 1024
|
||||
CORNER_RADIUS = 220
|
||||
|
||||
|
||||
def load_mask(path: Path) -> Image.Image:
|
||||
source = Image.open(path).convert("RGBA")
|
||||
return source.getchannel("A")
|
||||
|
||||
|
||||
def fitted(mask: Image.Image, target_height: int) -> Image.Image:
|
||||
bbox = mask.getbbox()
|
||||
if bbox is None:
|
||||
raise SystemExit("Die Vorlage enthält keine sichtbare Silhouette.")
|
||||
cropped = mask.crop(bbox)
|
||||
scale = target_height / cropped.height
|
||||
size = (max(1, round(cropped.width * scale)), target_height)
|
||||
return cropped.resize(size, Image.LANCZOS)
|
||||
|
||||
|
||||
def tinted(mask: Image.Image, color) -> Image.Image:
|
||||
layer = Image.new("RGBA", mask.size, color)
|
||||
layer.putalpha(mask)
|
||||
return layer
|
||||
|
||||
|
||||
def rounded_background(size: int, radius: int) -> Image.Image:
|
||||
tile = Image.new("RGBA", (size, size), (0, 0, 0, 0))
|
||||
draw = ImageDraw.Draw(tile)
|
||||
draw.rounded_rectangle((0, 0, size - 1, size - 1), radius=radius, fill=BACKGROUND)
|
||||
return tile
|
||||
|
||||
|
||||
def compose_master(mask: Image.Image) -> Image.Image:
|
||||
tile = rounded_background(MASTER_SIZE, CORNER_RADIUS)
|
||||
shape = fitted(mask, int(MASTER_SIZE * 0.74))
|
||||
position = (
|
||||
(MASTER_SIZE - shape.width) // 2,
|
||||
(MASTER_SIZE - shape.height) // 2,
|
||||
)
|
||||
tile.alpha_composite(tinted(shape, SILHOUETTE), position)
|
||||
return tile
|
||||
|
||||
|
||||
def compose_foreground(mask: Image.Image) -> Image.Image:
|
||||
canvas = Image.new("RGBA", (432, 432), (0, 0, 0, 0))
|
||||
shape = fitted(mask, int(432 * 0.60))
|
||||
position = ((432 - shape.width) // 2, (432 - shape.height) // 2)
|
||||
canvas.alpha_composite(tinted(shape, SILHOUETTE), position)
|
||||
return canvas
|
||||
|
||||
|
||||
def main() -> None:
|
||||
if len(sys.argv) != 2:
|
||||
raise SystemExit("Aufruf: python3 tools/make_app_icons.py <silhouette.png>")
|
||||
source = Path(sys.argv[1])
|
||||
if not source.exists():
|
||||
raise SystemExit(f"Vorlage nicht gefunden: {source}")
|
||||
|
||||
ANDROID.mkdir(parents=True, exist_ok=True)
|
||||
mask = load_mask(source)
|
||||
|
||||
master = compose_master(mask)
|
||||
master.save(ICONS / "app_icon.png")
|
||||
master.resize((192, 192), Image.LANCZOS).save(ANDROID / "ic_launcher_192.png")
|
||||
|
||||
foreground = compose_foreground(mask)
|
||||
foreground.save(ANDROID / "ic_launcher_foreground_432.png")
|
||||
|
||||
background = Image.new("RGBA", (432, 432), BACKGROUND)
|
||||
background.save(ANDROID / "ic_launcher_background_432.png")
|
||||
|
||||
monochrome = Image.new("RGBA", (432, 432), (0, 0, 0, 0))
|
||||
monochrome.alpha_composite(foreground)
|
||||
monochrome.save(ANDROID / "ic_launcher_monochrome_432.png")
|
||||
|
||||
print(f"Vorlage: {source}")
|
||||
for path in sorted(ICONS.rglob("*.png")):
|
||||
print(f" {path.relative_to(REPO)}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||