Skip to content

Commit ad8d5ba

Browse files
committed
Make the tutorial less fat
1 parent 73f6193 commit ad8d5ba

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

ltk/ltk.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
top: -1000px;
441441
left: -1000px;
442442
background: lightyellow;
443-
border: 5px solid gray;
443+
border: 3px solid orange;
444444
border-radius: 15px;
445445
overflow: hidden;
446446
padding: 10px;
@@ -452,9 +452,9 @@
452452

453453
.ltk-step-marker {
454454
position: absolute;
455-
width: 5px;
456-
height: 5px;
457-
background: gray;
455+
width: 3px;
456+
height: 3px;
457+
background: orange;
458458
z-index: 10000;
459459
}
460460

ltk/widgets.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,36 +1028,41 @@ def fix(self):
10281028

10291029
def add_markers(self):
10301030
self.content.css("visibility", "visible")
1031+
# the top part
10311032
ltk.find("body").append(ltk.Div()
10321033
.addClass("ltk-step-marker")
10331034
.css("left", self.widget.offset().left)
10341035
.css("top", self.widget.offset().top)
1035-
.css("width", self.widget.outerWidth())
1036+
.css("width", self.widget.outerWidth() + 1)
10361037
)
1038+
# the bottom part
10371039
ltk.find("body").append(ltk.Div()
10381040
.addClass("ltk-step-marker")
10391041
.css("left", self.widget.offset().left)
1040-
.css("top", self.widget.offset().top + self.widget.outerHeight() - 3)
1041-
.css("width", self.widget.outerWidth())
1042+
.css("top", self.widget.offset().top + self.widget.outerHeight() - 2)
1043+
.css("width", self.widget.outerWidth() + 1)
10421044
)
1045+
# the left part
10431046
ltk.find("body").append(ltk.Div()
10441047
.addClass("ltk-step-marker")
1045-
.css("left", self.widget.offset().left - 2)
1048+
.css("left", self.widget.offset().left)
10461049
.css("top", self.widget.offset().top)
1047-
.css("height", self.widget.outerHeight() + 2)
1050+
.css("height", self.widget.outerHeight())
10481051
)
1052+
# the right part
10491053
ltk.find("body").append(ltk.Div()
10501054
.addClass("ltk-step-marker")
1051-
.css("left", self.widget.offset().left + self.widget.outerWidth() - 3)
1055+
.css("left", self.widget.offset().left + self.widget.outerWidth() - 1)
10521056
.css("top", self.widget.offset().top)
1053-
.css("height", self.widget.outerHeight() + 2)
1057+
.css("height", self.widget.outerHeight())
10541058
)
1059+
# the connector
10551060
ltk.find("body").append(ltk.Div()
10561061
.addClass("ltk-step-marker")
1057-
.css("left", self.widget.offset().left + self.widget.outerWidth() - 3)
1062+
.css("left", self.widget.offset().left + self.widget.outerWidth() - 1)
10581063
.css("top", self.widget.offset().top + 12)
10591064
.css("width", 32)
1060-
.css("height", 7)
1065+
.css("height", 3)
10611066
)
10621067

10631068
def hide(self):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66

77
[project]
88
name = "pyscript-ltk"
9-
version = "0.1.35"
9+
version = "0.1.37"
1010
description = "A little toolkit for writing UIs in PyScript"
1111
readme = "README.md"
1212
authors = [{ name = "Chris Laffra", email = "[email protected]" }]

0 commit comments

Comments
 (0)