#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, Pango

class Splash(Gtk.Window):

    def __init__(self):
        Gtk.Window.__init__(self, title="splashtitle")
        maingrid = Gtk.Grid()
        self.add(maingrid)
        maingrid.set_border_width(80)
        # set text for the spash window
        label = Gtk.Label("Gslapt is configuring itself...")
        label.modify_font(Pango.FontDescription('sans 22'))
        maingrid.attach(label, 0, 0, 1, 1)

def splashwindow():
    window = Splash()
    window.set_decorated(False)
    window.set_resizable(False)
    window.override_background_color(Gtk.StateType.NORMAL, Gdk.RGBA(0,0,0,1))
    window.modify_fg(Gtk.StateFlags.NORMAL, Gdk.color_parse("grey"))
    window.set_opacity(0.8)
    window.set_position(Gtk.WindowPosition.CENTER)
    window.show_all()
    Gtk.main()

splashwindow()
