mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-26 05:34:34 +00:00
added cone button on notifications
This commit is contained in:
parent
62ad4b5464
commit
95f756a395
@ -35,21 +35,70 @@ BasePopUp {
|
||||
}
|
||||
|
||||
autoClose: true;
|
||||
closeInterval: 5000
|
||||
closeInterval: 10000
|
||||
|
||||
margins: 0
|
||||
margin: 0
|
||||
spacing: 0
|
||||
|
||||
|
||||
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:
|
||||
Control {
|
||||
id: control;
|
||||
implicitHeight: rowLayout.implicitHeight
|
||||
implicitWidth: 0x0
|
||||
|
||||
MouseArea {
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
autoclosePause();
|
||||
}
|
||||
|
||||
onExited: {
|
||||
autocloseResume();
|
||||
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
|
||||
if (!autoClose) {
|
||||
close();
|
||||
}
|
||||
|
||||
if (autoClosePasused) {
|
||||
autocloseResume()
|
||||
} else {
|
||||
autoclosePause();
|
||||
}
|
||||
}
|
||||
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: rowLayout
|
||||
spacing: 5
|
||||
@ -78,34 +127,23 @@ BasePopUp {
|
||||
wrapMode: Text.WordWrap
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
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