diff --git a/Modules/Panels/Launcher/Launcher.qml b/Modules/Panels/Launcher/Launcher.qml index 4a89dafd..8185221e 100644 --- a/Modules/Panels/Launcher/Launcher.qml +++ b/Modules/Panels/Launcher/Launcher.qml @@ -13,12 +13,12 @@ import qs.Widgets SmartPanel { id: root - readonly property int baseWidth: Math.round(500 * Style.uiScaleRatio) - readonly property int previewWidth: Math.round(400 * Style.uiScaleRatio) + readonly property real clipListRatio: 0.6 // 60% for the list + readonly property real clipPreviewRatio: 0.4 // 40% for the preview readonly property bool previewActive: activePlugin && activePlugin.name === I18n.tr("plugins.clipboard") && results.length > 0 // Panel configuration - preferredWidth: baseWidth + (previewActive ? previewWidth : 0) + preferredWidth: Math.round(700 * Style.uiScaleRatio) // Base width when both are shown, scaled appropriately preferredHeight: Math.round(600 * Style.uiScaleRatio) preferredWidthRatio: 0.3 preferredHeightRatio: 0.5 @@ -348,7 +348,10 @@ SmartPanel { ColumnLayout { id: leftPane Layout.fillHeight: true - Layout.preferredWidth: root.baseWidth + Layout.fillWidth: root.previewActive // Fill width proportionally when preview is active + Layout.preferredWidth: root.previewActive ? + Math.round(root.clipListRatio * (root.preferredWidth - (Style.marginL * 2))) : + (root.preferredWidth - (Style.marginL * 2)) anchors.margins: Style.marginL spacing: Style.marginM @@ -656,7 +659,9 @@ SmartPanel { // --- Right Pane (Preview) --- Item { Layout.fillHeight: true - Layout.preferredWidth: root.previewActive ? root.previewWidth : 0 + Layout.fillWidth: root.previewActive // Fill width proportionally when preview is active + Layout.preferredWidth: root.previewActive ? + Math.round(root.clipPreviewRatio * (root.preferredWidth - (Style.marginL * 2))) : 0 visible: root.previewActive Behavior on Layout.preferredWidth { diff --git a/Widgets/ClipboardPreview.qml b/Widgets/ClipboardPreview.qml index f439a5a8..4e29ef86 100644 --- a/Widgets/ClipboardPreview.qml +++ b/Widgets/ClipboardPreview.qml @@ -13,7 +13,6 @@ Item { property bool loadingFullContent: false implicitHeight: contentColumn.implicitHeight + Style.marginL * 2 - implicitWidth: 350 // A default width Connections { target: previewPanel