Icone in struttura standard Sailfish (icons/86x86 e icons/108x108 con nome esatto) + yaml ripristinato in rpm/
This commit is contained in:
@@ -26,13 +26,14 @@ OTHER_FILES += \
|
||||
qml/pages/*.qml \
|
||||
qml/cover/*.qml \
|
||||
rpm/harbour-calibreweb.spec \
|
||||
rpm/harbour-calibreweb.desktop
|
||||
rpm/harbour-calibreweb.desktop \
|
||||
rpm/harbour-calibreweb.yaml
|
||||
|
||||
DISTFILES += $$OTHER_FILES
|
||||
|
||||
# Icone installate via make install (path assoluti = robusti rispetto al tar sorgente)
|
||||
# Icone installate via make install (struttura standard Sailfish: icons/<size>/<name>.png)
|
||||
icons86.path = /usr/share/icons/hicolor/86x86/apps
|
||||
icons86.files = $$PWD/icons/harbour-calibreweb.png
|
||||
icons86.files = $$PWD/icons/86x86/harbour-calibreweb.png
|
||||
icons108.path = /usr/share/icons/hicolor/108x108/apps
|
||||
icons108.files = $$PWD/icons/harbour-calibreweb-108.png
|
||||
icons108.files = $$PWD/icons/108x108/harbour-calibreweb.png
|
||||
INSTALLS += icons86 icons108
|
||||
|
||||
|
Before Width: | Height: | Size: 796 B After Width: | Height: | Size: 796 B |
|
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 629 B |
+12
-13
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Genera le icone dell'app: harbour-calibreweb.png (86x86) e -108 (108x108)."""
|
||||
"""Genera le icone dell'app nella struttura standard Sailfish:
|
||||
icons/86x86/harbour-calibreweb.png e icons/108x108/harbour-calibreweb.png"""
|
||||
import os
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
BG = (46, 52, 64) # #2E3440
|
||||
ACCENT = (136, 192, 208) # #88C0D0
|
||||
PAGE = (229, 233, 240) # #E5E9F0
|
||||
SPINE = (94, 129, 172) # #5E81AC
|
||||
BG = (46, 52, 64) # #2E3440
|
||||
ACCENT = (136, 192, 208) # #88C0D0
|
||||
PAGE = (229, 233, 240) # #E5E9F0
|
||||
SPINE = (94, 129, 172) # #5E81AC
|
||||
|
||||
|
||||
def draw_icon(size):
|
||||
@@ -13,11 +15,9 @@ def draw_icon(size):
|
||||
d = ImageDraw.Draw(img)
|
||||
margin = size * 0.045
|
||||
radius = size * 0.16
|
||||
# sfondo arrotondato
|
||||
d.rounded_rectangle([margin, margin, size - margin, size - margin],
|
||||
radius=radius, fill=BG)
|
||||
|
||||
# libro aperto: due pagine trapezoidali + dorso
|
||||
cx = size / 2
|
||||
top = size * 0.34
|
||||
bot = size * 0.68
|
||||
@@ -30,11 +30,8 @@ def draw_icon(size):
|
||||
|
||||
d.polygon(left_page, fill=ACCENT)
|
||||
d.polygon(right_page, fill=ACCENT)
|
||||
|
||||
# dorso
|
||||
d.rectangle([cx - size * 0.014, top, cx + size * 0.014, bot], fill=SPINE)
|
||||
|
||||
# righe delle pagine
|
||||
lw = max(1, int(size * 0.012))
|
||||
for y_frac in (0.45, 0.52, 0.59):
|
||||
y = size * y_frac
|
||||
@@ -46,9 +43,11 @@ def draw_icon(size):
|
||||
|
||||
|
||||
def main():
|
||||
draw_icon(108).save("icons/harbour-calibreweb-108.png")
|
||||
draw_icon(86).save("icons/harbour-calibreweb.png")
|
||||
print("icone scritte")
|
||||
os.makedirs("icons/86x86", exist_ok=True)
|
||||
os.makedirs("icons/108x108", exist_ok=True)
|
||||
draw_icon(86).save("icons/86x86/harbour-calibreweb.png")
|
||||
draw_icon(108).save("icons/108x108/harbour-calibreweb.png")
|
||||
print("icone scritte in icons/86x86/ e icons/108x108/")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
Name: harbour-calibreweb
|
||||
Summary: Client OPDS per Calibre Web
|
||||
Version: 0.1.0
|
||||
Release: 1
|
||||
Group: Qt/Qt
|
||||
License: MIT
|
||||
URL: https://github.com/kaneda/harbour-calibreweb
|
||||
Description: |
|
||||
Client per navigare e scaricare libri da un'istanza Calibre Web
|
||||
(o dal Content Server di Calibre) tramite il protocollo OPDS.
|
||||
Supporta autenticazione di base, ricerca, copertine, lettore EPUB
|
||||
e download in tutti i formati disponibili.
|
||||
Sources:
|
||||
- '%{name}-%{version}.tar.gz'
|
||||
Builder: qmake5
|
||||
Reference in New Issue
Block a user