qml format

This commit is contained in:
loner
2025-11-19 16:07:08 +08:00
parent 4a0c2b7ef3
commit e4e3b1b85c
2 changed files with 8 additions and 14 deletions
+5 -7
View File
@@ -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
+3 -7
View File
@@ -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