Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions dcc-network/qml/PageDetails.qml
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,42 @@ DccObject {
text: dccObj.displayName
elide: Text.ElideMiddle
}
D.IconLabel {
D.ActionButton {
property bool clipboard: false
Layout.alignment: Qt.AlignRight
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
Layout.preferredWidth: 30
Layout.preferredHeight: 30
icon {
name: "copy"
palette: D.DTK.makeIconPalette(palette)
width: 16
height: 16
}
D.ToolTip {
id: tip
palette: parent.palette
}
MouseArea {
hoverEnabled: true
background: Rectangle {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onClicked: {
let text = [infoItem.name]
for (let i in infoItem.details) {
text.push(infoItem.details[i][0] + "\t" + infoItem.details[i][1])
}
dccData.setClipboard(text.join("\n"))
tip.show(qsTr("Details has been copied"), 2000)
property D.Palette pressedColor: D.Palette {
normal: Qt.rgba(0, 0, 0, 0.2)
normalDark: Qt.rgba(1, 1, 1, 0.25)
}
property D.Palette hoveredColor: D.Palette {
normal: Qt.rgba(0, 0, 0, 0.1)
normalDark: Qt.rgba(1, 1, 1, 0.1)
}
radius: 6
color: parent.pressed ? D.ColorSelector.pressedColor : (parent.hovered ? D.ColorSelector.hoveredColor : "transparent")
}
focusPolicy: Qt.StrongFocus
onClicked: {
let text = [infoItem.name]
for (let i in infoItem.details) {
text.push(infoItem.details[i][0] + "\t" + infoItem.details[i][1])
}
dccData.setClipboard(text.join("\n"))
tip.show(qsTr("Details has been copied"), 2000)
}
}
}
Expand All @@ -107,6 +121,7 @@ DccObject {
delegate: ItemDelegate {
implicitHeight: 36
text: modelData[0]
font: D.DTK.fontManager.t6
checked: false
backgroundVisible: true
corners: getCornersForBackground(index, repeater.count)
Expand All @@ -118,6 +133,7 @@ DccObject {
id: textInput
text: modelData[1]
color: palette.text
font: D.DTK.fontManager.t7
selectedTextColor: palette.highlightedText
selectionColor: palette.highlight
readOnly: true
Expand Down
16 changes: 16 additions & 0 deletions dcc-network/qml/PageHotspot.qml
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,27 @@ DccObject {
D.ActionButton {
Layout.alignment: Qt.AlignRight
focusPolicy: Qt.NoFocus
Layout.preferredWidth: 30
Layout.preferredHeight: 30
icon {
name: "dcc_network_edit"
width: 16
height: 16
}
hoverEnabled: true
background: Rectangle {
anchors.fill: parent
property D.Palette pressedColor: D.Palette {
normal: Qt.rgba(0, 0, 0, 0.2)
normalDark: Qt.rgba(1, 1, 1, 0.25)
}
property D.Palette hoveredColor: D.Palette {
normal: Qt.rgba(0, 0, 0, 0.1)
normalDark: Qt.rgba(1, 1, 1, 0.1)
}
radius: 6
color: parent.pressed ? D.ColorSelector.pressedColor : (parent.hovered ? D.ColorSelector.hoveredColor : "transparent")
}
onClicked: editDialog.createObject(this, {
"config": root.config
}).show()
Expand Down
Binary file modified dcc-network/qml/dcc_network_edit.dci
Binary file not shown.
Binary file modified net-view/window/qrc/built-in-icons/copy.dci
100644 → 100755
Binary file not shown.
Loading