Skip to content

Commit 2cb0e6a

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 b41534a commit 2cb0e6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ui/app/mainui/AppMain.qml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,16 +2394,19 @@ 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
24002401
active: appMain.rootStore.sectionsLoaded && opened
24012402

24022403
anchors.top: parent.top
2403-
anchors.topMargin: 8
2404-
anchors.rightMargin: 8
2404+
anchors.topMargin: Theme.halfPadding
2405+
anchors.rightMargin: Theme.halfPadding
2406+
anchors.leftMargin: Theme.halfPadding
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)