From 5d25f908a472d3010510953af948c3b8cc6ae863 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sun, 30 Apr 2023 18:10:58 +0200 Subject: [PATCH] Launcher: fix loading of mcicon (#1779) Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> --- Launcher.py | 5 +++-- data/mcicon.png | Bin 0 -> 594 bytes setup.py | 13 ++++++++++++- worlds/LauncherComponents.py | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 data/mcicon.png diff --git a/Launcher.py b/Launcher.py index a9c9a3181a5c..7acaeb78739c 100644 --- a/Launcher.py +++ b/Launcher.py @@ -146,7 +146,7 @@ def launch(exe, in_terminal=False): def run_gui(): from kvui import App, ContainerLayout, GridLayout, Button, Label - from kivy.uix.image import Image + from kivy.uix.image import AsyncImage from kivy.uix.relativelayout import RelativeLayout class Launcher(App): @@ -188,7 +188,8 @@ def build_button(component: Component): button.component = component button.bind(on_release=self.component_action) if component.icon != "icon": - image = Image(source=icon_paths[component.icon], size=(38, 38), size_hint=(None, 1), pos=(5, 0)) + image = AsyncImage(source=icon_paths[component.icon], + size=(38, 38), size_hint=(None, 1), pos=(5, 0)) box_layout = RelativeLayout() box_layout.add_widget(button) box_layout.add_widget(image) diff --git a/data/mcicon.png b/data/mcicon.png new file mode 100644 index 0000000000000000000000000000000000000000..6b8fc5489711f3faef5f367a3bdbade932e02f3b GIT binary patch literal 594 zcmV-Y06S<5JJs25Zy(c{>9)?<&lr$qVCWC* z{ylIFQP(^iICZgLaOFh24Fjerk{N~-GdoEPkgIR#-RKxNLsN|o4 zTB3S7T~GP!Q_b(Eh&lTwK3Gm$S@|gxDT$C)==|tMfy^_AUT)I45rbc>>Z5NZ$vt-@)k< zeIs1TYUu@^3)%^k9cRMb!y9%W#AkKibKK`~8s4$zxh}5&BY-8LhQa>@n}!khzUO$q|9AF~O(U-WBOud) z=tU*}3^*&z1mC+r-5&SdSF?bRp{Cd66%Zo>SR{}MT+G3BtRZKb{3dw?7y