feat(launcher): Integrate TextFormatter for enhanced preview UI

This commit is contained in:
loner
2025-11-19 16:07:07 +08:00
parent 87f62b288b
commit b2978113c5
2 changed files with 39 additions and 1 deletions
+5 -1
View File
@@ -4,6 +4,7 @@ import QtQuick.Controls
import qs.Commons
import qs.Widgets
import qs.Services.Keyboard
import "../../../Helpers/TextFormatter.js" as TextFormatter
Item {
id: previewPanel
@@ -35,7 +36,7 @@ Item {
} else {
loadingFullContent = true;
ClipboardService.decode(currentItem.clipboardId, function(content) {
fullContent = content;
fullContent = TextFormatter.wrapTextForDisplay(content);
loadingFullContent = false;
});
}
@@ -116,6 +117,9 @@ Item {
text: fullContent
readOnly: true
wrapMode: Text.Wrap
textFormat: TextArea.RichText // Enable HTML rendering
font.pointSize: Style.fontSizeM // Adjust font size for readability
color: Color.mOnSurface // Consistent text color
}
}
}