From 189c7def5b0f71450b575332dff4e5da62d882c7 Mon Sep 17 00:00:00 2001 From: "Eshan Roy (Eshanized)" Date: Fri, 19 Apr 2024 02:11:13 +0530 Subject: [PATCH] =?UTF-8?q?=E2=8F=B3=20@eshanized=20updated=20the=20reposi?= =?UTF-8?q?tory!!!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hello.py | 1 - usr/share/blackbox/splash.py | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 usr/share/blackbox/splash.py diff --git a/hello.py b/hello.py index 4287ca8..e69de29 100644 --- a/hello.py +++ b/hello.py @@ -1 +0,0 @@ -# \ No newline at end of file diff --git a/usr/share/blackbox/splash.py b/usr/share/blackbox/splash.py new file mode 100644 index 0000000..9ae550e --- /dev/null +++ b/usr/share/blackbox/splash.py @@ -0,0 +1,30 @@ + +import gi +import functions as fn + +gi.require_version("Gtk", "3.0") +from gi.repository import Gtk, GdkPixbuf + +base_dir = fn.path.dirname(fn.path.realpath(__file__)) + + +class splashScreen(Gtk.Window): + def __init__(self): + Gtk.Window.__init__(self, Gtk.WindowType.POPUP, title="") + self.set_decorated(False) + self.set_resizable(False) + self.set_size_request(500, 250) + self.set_position(Gtk.WindowPosition.CENTER) + + main_vbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=1) + self.add(main_vbox) + + self.image = Gtk.Image() + pimage = GdkPixbuf.Pixbuf().new_from_file_at_size( + base_dir + "/images/snigdhaos-splash.png", 600, 400 + ) + self.image.set_from_pixbuf(pimage) + + main_vbox.pack_start(self.image, True, True, 0) + + self.show_all() \ No newline at end of file