[Lint] Fixup files

This commit is contained in:
Calum Lind 2023-11-19 21:16:17 +00:00
parent b2005ecd78
commit 8dba0efa85
No known key found for this signature in database
GPG Key ID: 90597A687B836BA3
2 changed files with 17 additions and 17 deletions

View File

@ -11,6 +11,7 @@
# See LICENSE for more details. # See LICENSE for more details.
import logging import logging
import gi # isort:skip (Required before Gtk import). import gi # isort:skip (Required before Gtk import).
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')

View File

@ -10,9 +10,8 @@
# #
import shutil import shutil
import subprocess import subprocess
from pathlib import Path
from dataclasses import dataclass, field from dataclasses import dataclass, field
from pathlib import Path
@dataclass @dataclass
@ -156,20 +155,20 @@ def create_web_icons(app_pngs, sizes, dest_dir):
def main(): def main():
DATA_DIR = Path.cwd() / 'deluge' / 'ui' / 'data' data_dir = Path.cwd() / 'deluge' / 'ui' / 'data'
if not DATA_DIR.is_dir(): if not data_dir.is_dir():
exit(f'No path to UI data dir: {DATA_DIR}') exit(f'No path to UI data dir: {data_dir}')
# Create Deluge UI icons # Create Deluge UI icons
ICON_PACK_SIZES = [16, 22, 24, 32, 36, 48, 64, 72, 96, 128, 192, 256, 512] icon_pack_sizes = [16, 22, 24, 32, 36, 48, 64, 72, 96, 128, 192, 256, 512]
PANEL_ICON_SIZES = [16, 22, 24] panel_icon_sizes = [16, 22, 24]
ICO_ICON_SIZES = [16, 32, 48, 64, 128, 256] ico_icon_sizes = [16, 32, 48, 64, 128, 256]
ui_icons = IconPack( ui_icons = IconPack(
name='deluge', name='deluge',
dir=DATA_DIR, dir=data_dir,
icon_sizes=ICON_PACK_SIZES, icon_sizes=icon_pack_sizes,
panel_sizes=PANEL_ICON_SIZES, panel_sizes=panel_icon_sizes,
ico_sizes=ICO_ICON_SIZES, ico_sizes=ico_icon_sizes,
) )
# Theme icons for GTK # Theme icons for GTK
@ -184,13 +183,13 @@ def main():
create_logo(ui_icons.theme_pngs[48], ui_icons.logo_png) create_logo(ui_icons.theme_pngs[48], ui_icons.logo_png)
# Web UI Icons # Web UI Icons
WEB_ICON_SIZES = [32, 192, 512] web_icon_sizes = [32, 192, 512]
FAVICON_SIZES = [16, 32, 48] favicon_sizes = [16, 32, 48]
web_icons = WebIconPack( web_icons = WebIconPack(
name='deluge', name='deluge',
dir=DATA_DIR / '..' / 'web', dir=data_dir / '..' / 'web',
icon_sizes=WEB_ICON_SIZES, icon_sizes=web_icon_sizes,
favicon_sizes=FAVICON_SIZES, favicon_sizes=favicon_sizes,
) )
create_web_icons(ui_icons.theme_pngs, web_icons.icon_sizes, web_icons.icons_dir) create_web_icons(ui_icons.theme_pngs, web_icons.icon_sizes, web_icons.icons_dir)
create_web_status_icons(ui_icons.pixmaps_dir, web_icons.icons_dir) create_web_status_icons(ui_icons.pixmaps_dir, web_icons.icons_dir)