make PopoverTruncated customizable

This commit is contained in:
Lukáš Kucharczyk 2024-11-13 21:28:17 +01:00
parent 5c5fd5f26a
commit 6b7a96dc06
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 2 additions and 2 deletions

View File

@ -68,8 +68,8 @@ def Popover(
)
def PopoverTruncated(input_string: str) -> str:
if (truncated := truncate(input_string)) != input_string:
def PopoverTruncated(input_string: str, length: int = 30, ellipsis: str = "") -> str:
if (truncated := truncate(input_string, length, ellipsis)) != input_string:
return Popover(wrapped_content=truncated, popover_content=input_string)
else:
return input_string