mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-27 06:04:33 +00:00
added cone button on notifications
This commit is contained in:
parent
62ad4b5464
commit
95f756a395
@ -35,21 +35,70 @@ BasePopUp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
autoClose: true;
|
autoClose: true;
|
||||||
closeInterval: 5000
|
closeInterval: 10000
|
||||||
|
|
||||||
margins: 0
|
margins: 0
|
||||||
margin: 0
|
margin: 0
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
|
||||||
backgroundColor: Material.background
|
backgroundColor: Material.background
|
||||||
|
|
||||||
|
header: Pane {
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
width: popup.width
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: title
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.bold: true
|
||||||
|
font.pointSize: 13
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
ToolButton {
|
||||||
|
text: "X"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
contentItem:
|
contentItem:
|
||||||
Control {
|
Control {
|
||||||
id: control;
|
id: control;
|
||||||
implicitHeight: rowLayout.implicitHeight
|
implicitHeight: rowLayout.implicitHeight
|
||||||
implicitWidth: 0x0
|
implicitWidth: 0x0
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
autoclosePause();
|
||||||
|
}
|
||||||
|
|
||||||
|
onExited: {
|
||||||
|
autocloseResume();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
|
||||||
|
if (!autoClose) {
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (autoClosePasused) {
|
||||||
|
autocloseResume()
|
||||||
|
} else {
|
||||||
|
autoclosePause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: rowLayout
|
id: rowLayout
|
||||||
spacing: 5
|
spacing: 5
|
||||||
@ -78,34 +127,23 @@ BasePopUp {
|
|||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
|
linkColor: Material.accent
|
||||||
|
|
||||||
|
onLinkActivated: (link) => {
|
||||||
|
Qt.openUrlExternally(link)
|
||||||
|
}
|
||||||
|
onLinkHovered: (link) => {
|
||||||
|
if (link.length) {
|
||||||
|
message.ToolTip.show(link)
|
||||||
|
} else {
|
||||||
|
message.ToolTip.hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
hoverEnabled: true
|
|
||||||
onEntered: {
|
|
||||||
autoclosePause();
|
|
||||||
}
|
|
||||||
|
|
||||||
onExited: {
|
|
||||||
autocloseResume();
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
|
|
||||||
if (!autoClose) {
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (autoClosePasused) {
|
|
||||||
autocloseResume()
|
|
||||||
} else {
|
|
||||||
autoclosePause();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user