mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
feat(launcher): UI improvements for clipboard preview window
This commit is contained in:
@@ -74,20 +74,10 @@ Item {
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginM
|
||||
spacing: Style.marginM
|
||||
anchors.margins: Style.marginS
|
||||
spacing: Style.marginS
|
||||
|
||||
NText {
|
||||
text: currentItem ? (currentItem.name || "Preview") : "Preview"
|
||||
font.weight: Style.fontWeightBold
|
||||
Layout.fillWidth: true
|
||||
pointSize: Style.fontSizeM
|
||||
color: Color.mOnSurface
|
||||
}
|
||||
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -17,7 +17,7 @@ SmartPanel {
|
||||
|
||||
// Panel configuration
|
||||
readonly property int listPanelWidth: Math.round(600 * Style.uiScaleRatio)
|
||||
readonly property int previewPanelWidth: Math.round(300 * Style.uiScaleRatio)
|
||||
readonly property int previewPanelWidth: Math.round(400 * Style.uiScaleRatio)
|
||||
readonly property int totalBaseWidth: listPanelWidth + (Style.marginL * 2)
|
||||
|
||||
preferredWidth: totalBaseWidth
|
||||
@@ -278,9 +278,15 @@ SmartPanel {
|
||||
id: previewBox
|
||||
visible: root.previewActive
|
||||
width: root.previewPanelWidth
|
||||
height: ui.height
|
||||
height: Math.round(400 * Style.uiScaleRatio)
|
||||
x: ui.width + Style.marginM
|
||||
y: 0
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user