Skip to content

Commit ebb43b0

Browse files
committed
fix(CreateChat):Fix CreateChatView clipping in portrait layout
Applies a conditional left anchor to the `CreateChatView` loader to ensure proper width allocation in portrait mode. Prevents the view from being cut off on the left while keeping the previous layout behavior in landscape. Fixes #19062
1 parent 6f8736b commit ebb43b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ui/app/mainui/AppMain.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,6 +2394,7 @@ Item {
23942394
Loader {
23952395
id: createChatView
23962396

2397+
readonly property bool isPortraitMode: appMain.width < Theme.portraitBreakpoint.width
23972398
property bool opened: false
23982399
readonly property real defaultWidth: parent.width - Constants.chatSectionLeftColumnWidth -
23992400
anchors.rightMargin - anchors.leftMargin
@@ -2402,8 +2403,10 @@ Item {
24022403
anchors.top: parent.top
24032404
anchors.topMargin: 8
24042405
anchors.rightMargin: 8
2406+
anchors.leftMargin: 8
24052407
anchors.bottom: parent.bottom
24062408
anchors.right: parent.right
2409+
anchors.left: isPortraitMode ? parent.left : undefined
24072410

24082411
sourceComponent: CreateChatView {
24092412
width: Math.min(Math.max(implicitWidth, createChatView.defaultWidth), createChatView.parent.width)

0 commit comments

Comments
 (0)