Skip to content

Commit 2bcbb78

Browse files
committed
Fix weird text layout behaviour with GtkBackend, never tell Pango the desired height
Might want to change this behaviour in future but for now it lines up with AppKitBackend's text layout anyway. And it prevents weird behaviour where Pango says the text will be one line but Gtk renders it as multiple.
1 parent 548125f commit 2bcbb78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/GtkBackend/GtkBackend.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public final class GtkBackend: AppBackend {
293293
let (width, height) = pango.getTextSize(
294294
text,
295295
proposedWidth: (proposedFrame?.x).map(Double.init),
296-
proposedHeight: (proposedFrame?.y).map(Double.init)
296+
proposedHeight: nil
297297
)
298298
return SIMD2(width, height)
299299
}

0 commit comments

Comments
 (0)