From e5df82548df1e63be689d0b96de2e2865c01c99f Mon Sep 17 00:00:00 2001 From: laffra Date: Thu, 7 Mar 2024 11:05:25 +0100 Subject: [PATCH] Move tutorial css to ltk.css --- ltk/ltk.css | 13 +++++++++++++ ltk/widgets.py | 10 +--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ltk/ltk.css b/ltk/ltk.css index f231cb8..01049e6 100644 --- a/ltk/ltk.css +++ b/ltk/ltk.css @@ -434,6 +434,19 @@ z-index: 100000; } +.ltk-bubble { + font-family: Arial; + position: absolute; + top: -1000px; + left: -1000px; + background: lightyellow; + border: 5px solid gray; + border-radius: 15px; + overflow: hidden; + padding: 10px; + z-index: 10000; +} + body { margin: 0; font-family: var(--ltk-body-font-family); diff --git a/ltk/widgets.py b/ltk/widgets.py index 2b87947..e985836 100644 --- a/ltk/widgets.py +++ b/ltk/widgets.py @@ -972,15 +972,6 @@ def __init__(self, widget, content): Div.__init__(self, content) self.content = content self.widget = widget - self.css("font-family", "Arial") - self.css("position", "absolute") - self.css("top", -1000) - self.css("left", -1000) - self.css("background", "lightyellow") - self.css("border", "5px solid gray") - self.css("overflow", "hidden") - self.css("border-radius", 15) - self.css("padding", 5) self.appendTo(ltk.find("body")) self.width = self.width() self.height = self.height() @@ -1002,6 +993,7 @@ def hide(self): "height": 0, }), 250, ltk.proxy(lambda: self.remove())) + class Tutorial(): tag = None def __init__(self, steps):