Imporove alignment in clipboard and show hint when empty

Adds a hint when the clipboard history is empty to be consistent with all the
other plasmoids, it's not pixel-perfect but good enough. Also improve alignment
of the search and highlight

BUG: 344159
wilder-5.14
Kai Uwe Broulik 11 years ago
parent 7561fadf3a
commit 31012789b8
  1. 5
      applets/clipboard/contents/ui/ClipboardItemDelegate.qml
  2. 16
      applets/clipboard/contents/ui/ClipboardPage.qml
  3. 5
      applets/clipboard/contents/ui/Menu.qml

@ -33,11 +33,8 @@ PlasmaComponents.ListItem {
signal barcode(string uuid)
signal action(string uuid)
width: parent.width - units.gridUnit * 2
height: Math.max(label.height, toolButtonsLayout.implicitHeight) + 2 * units.smallSpacing
x: -listMargins.left
enabled: true
onClicked: menuItem.itemSelected(UuidRole)
@ -54,7 +51,7 @@ PlasmaComponents.ListItem {
height: childrenRect.height
anchors {
left: parent.left
leftMargin: units.gridUnit / 2
leftMargin: units.gridUnit / 2 - listMargins.left
right: parent.right
verticalCenter: parent.verticalCenter
}

@ -22,6 +22,7 @@ import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
ColumnLayout {
Keys.onPressed: {
@ -76,12 +77,19 @@ ColumnLayout {
}
}
PlasmaExtras.Heading {
id: emptyHint
Layout.fillWidth: true
level: 3
opacity: 0.6
visible: clipboardMenu.model.count === 0
text: i18n("Clipboard history is empty.")
}
RowLayout {
Layout.fillWidth: true
Item {
width: units.gridUnit / 2 - parent.spacing
height: 1
}
visible: !emptyHint.visible
PlasmaComponents.TextField {
id: filter
placeholderText: i18n("Search")

@ -37,10 +37,7 @@ PlasmaExtras.ScrollArea {
boundsBehavior: Flickable.StopAtBounds
interactive: contentHeight > height
highlight: PlasmaComponents.Highlight {
anchors.bottomMargin: -listMargins.bottom
y: 1
}
highlight: PlasmaComponents.Highlight { }
highlightMoveDuration: 0
highlightResizeDuration: 0
currentIndex: -1

Loading…
Cancel
Save