ui: update icon
2
BUGS.md
@@ -1,6 +1,6 @@
|
||||
# Bugs
|
||||
|
||||
- annotation playback: check what happens if some songs are not paired in the playlist. I believe the index is wrong and the player plays a different song from what is displayed as title and artist.
|
||||
X> annotation playback: check what happens if some songs are not paired in the playlist. I believe the index is wrong and the player plays a different song from what is displayed as title and artist.
|
||||
|
||||
- syncJukeboxIfToken() is always called at startup, even if we have a jukebox already
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.LockstepPlayer">
|
||||
<activity
|
||||
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_bg" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
5
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_bg" />
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 6.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 15 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
66
media/shoe_logo4.svg
Normal file
|
After Width: | Height: | Size: 51 KiB |
53
scripts/generate_launcher_icons.py
Normal file
@@ -0,0 +1,53 @@
|
||||
"""Downscale launcher icon PNGs from mipmap-xxxhdpi masters to lower densities."""
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from PIL import Image
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
RES = ROOT / "app" / "src" / "main" / "res"
|
||||
SOURCE_FOLDER = "mipmap-xxxhdpi"
|
||||
|
||||
SOURCES = {
|
||||
"ic_launcher.png": {
|
||||
"mipmap-xxxhdpi": 192,
|
||||
"mipmap-xxhdpi": 144,
|
||||
"mipmap-xhdpi": 96,
|
||||
"mipmap-hdpi": 72,
|
||||
"mipmap-mdpi": 48,
|
||||
},
|
||||
"ic_launcher_foreground.png": {
|
||||
"mipmap-xxxhdpi": 432,
|
||||
"mipmap-xxhdpi": 324,
|
||||
"mipmap-xhdpi": 216,
|
||||
"mipmap-hdpi": 162,
|
||||
"mipmap-mdpi": 108,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
for filename, sizes in SOURCES.items():
|
||||
source_path = RES / SOURCE_FOLDER / filename
|
||||
source = Image.open(source_path)
|
||||
expected = sizes[SOURCE_FOLDER]
|
||||
if source.size != (expected, expected):
|
||||
raise RuntimeError(
|
||||
f"{source_path} is {source.size[0]}x{source.size[1]}, expected {expected}x{expected}"
|
||||
)
|
||||
|
||||
for folder, size in sizes.items():
|
||||
if folder == SOURCE_FOLDER:
|
||||
continue
|
||||
out_dir = RES / folder
|
||||
out_dir.mkdir(parents=True, exist_ok=True)
|
||||
resized = source.resize((size, size), Image.Resampling.LANCZOS)
|
||||
resized.save(out_dir / filename)
|
||||
print(f"Wrote {folder}/{filename} ({size}x{size})")
|
||||
|
||||
print("Done.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||