From e4e3b1b85c1897fd7fd7fa1108d6ca56fd39a9a6 Mon Sep 17 00:00:00 2001 From: loner <2788892716@qq.com> Date: Wed, 19 Nov 2025 08:17:31 +0800 Subject: [PATCH] qml format --- Modules/Panels/Launcher/ClipboardPreview.qml | 12 +++++------- Modules/Panels/Launcher/Launcher.qml | 10 +++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Modules/Panels/Launcher/ClipboardPreview.qml b/Modules/Panels/Launcher/ClipboardPreview.qml index 7b9ee16e..81c23f11 100644 --- a/Modules/Panels/Launcher/ClipboardPreview.qml +++ b/Modules/Panels/Launcher/ClipboardPreview.qml @@ -1,10 +1,10 @@ import QtQuick -import QtQuick.Layouts import QtQuick.Controls -import qs.Commons -import qs.Widgets -import qs.Services.Keyboard +import QtQuick.Layouts import "../../../Helpers/TextFormatter.js" as TextFormatter +import qs.Commons +import qs.Services.Keyboard +import qs.Widgets Item { id: previewPanel @@ -35,7 +35,7 @@ Item { } } else { loadingFullContent = true; - ClipboardService.decode(currentItem.clipboardId, function(content) { + ClipboardService.decode(currentItem.clipboardId, function (content) { fullContent = TextFormatter.wrapTextForDisplay(content); loadingFullContent = false; }); @@ -78,8 +78,6 @@ Item { anchors.margins: Style.marginS spacing: Style.marginS - - Rectangle { Layout.fillWidth: true Layout.fillHeight: true diff --git a/Modules/Panels/Launcher/Launcher.qml b/Modules/Panels/Launcher/Launcher.qml index b51f256f..8e84cb65 100644 --- a/Modules/Panels/Launcher/Launcher.qml +++ b/Modules/Panels/Launcher/Launcher.qml @@ -280,13 +280,9 @@ SmartPanel { width: root.previewPanelWidth height: Math.round(400 * Style.uiScaleRatio) x: ui.width + Style.marginM - y: Math.max( - Style.marginL, // Minimum y is the top margin of the content area - Math.min( - resultsList.mapToItem(ui, 0, (root.selectedIndex * (root.entryHeight + resultsList.spacing)) - resultsList.contentY).y, - ui.height - previewBox.height - Style.marginL // Maximum y, considering bottom margin - ) - ) + y: Math.max(Style.marginL // Minimum y is the top margin of the content area + , Math.min(resultsList.mapToItem(ui, 0, (root.selectedIndex * (root.entryHeight + resultsList.spacing)) - resultsList.contentY).y, ui.height - previewBox.height - Style.marginL // Maximum y, considering bottom margin + )) z: -1 // Draw behind main panel content if it ever overlaps opacity: visible ? 1.0 : 0.0