fix tt
This commit is contained in:
1 parent
2b21007e67
commit
241d1c715e
2 files changed
+1
-6
No files matched your search
@@ -26,7 +26,6 @@ class ToolTipLabel(Label):
|
||||
|
||||
class ToolTipBehavior(Widget):
|
||||
tooltip_text = StringProperty("")
|
||||
tooltip_font_size = NumericProperty(10)
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
@@ -49,8 +48,6 @@ class ToolTipBehavior(Widget):
|
||||
|
||||
def on_size(self, *args):
|
||||
mid = (self.pos[0] + self.width / 2, self.pos[1] + self.height / 2)
|
||||
self.tooltip.font_size = self.tooltip_font_size
|
||||
print(self.tooltip.font_size)
|
||||
self.set_position(mid)
|
||||
|
||||
def set_position(self, pos):
|
||||
@@ -59,8 +56,6 @@ class ToolTipBehavior(Widget):
|
||||
def display_tooltip(self, pos):
|
||||
self.open = True
|
||||
self.tooltip.text = self.tooltip_text
|
||||
self.tooltip.font_size = self.tooltip_font_size
|
||||
print(self.tooltip.font_size)
|
||||
Window.add_widget(self.tooltip)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -24,11 +24,11 @@
|
||||
size: self.size
|
||||
|
||||
<ToolTipBehavior>:
|
||||
tooltip_font_size: app.gui.board_controls.pass_btn.height*0.6 if app.gui else 12
|
||||
|
||||
<ToolTipLabel>:
|
||||
size_hint: None, None
|
||||
size: self.texture_size
|
||||
tooltip_font_size: dp(14)
|
||||
padding: (2,2)
|
||||
halign: 'center'
|
||||
canvas.before:
|
||||
|
||||
Reference in new issue
Block a user