Skip to content

Commit ccbdf84

Browse files
committed
Fix text tooltip placement by making Text element unconditional
1 parent 2cf83f0 commit ccbdf84

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

internal/compiler/widgets/common/tooltip-base.slint

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ export component ToolTipImpl inherits Rectangle {
1212
border-color: Palette.border;
1313

1414
VerticalLayout {
15-
padding-left: root.text != "" ? 9px : 0px;
16-
padding-right: root.text != "" ? 9px : 0px;
17-
padding-top: root.text != "" ? 6px : 0px;
18-
padding-bottom: root.text != "" ? 6px : 0px;
15+
padding-left: 9px;
16+
padding-right: 9px;
17+
padding-top: 6px;
18+
padding-bottom: 6px;
1919

20-
if root.text != "": Text {
20+
Text {
2121
text: root.text;
2222
color: Palette.foreground;
2323
}
24-
25-
@children
2624
}
25+
26+
@children
2727
}

0 commit comments

Comments
 (0)