Notification: adjust layout
This commit is contained in:
parent
c8a056f332
commit
c16e6e7423
3 changed files with 16 additions and 8 deletions
|
|
@ -38,7 +38,12 @@ Item {
|
||||||
function toggleHistory() {
|
function toggleHistory() {
|
||||||
notificationHistoryPanel.toggle(getActiveScreen())
|
notificationHistoryPanel.toggle(getActiveScreen())
|
||||||
}
|
}
|
||||||
function toggleDoNotDisturb() {// TODO
|
function toggleDND() {
|
||||||
|
Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb
|
||||||
|
ToastService.showNotice(
|
||||||
|
Settings.data.notifications.doNotDisturb ? "Do Not Disturb enabled" : "Do Not Disturb disabled",
|
||||||
|
Settings.data.notifications.doNotDisturb ? "Notifications will be hidden but saved to history" : "Notifications will be shown normally",
|
||||||
|
"notice", false, 2000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,8 +159,8 @@ Variants {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: contentRow
|
id: contentRow
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Style.marginL * scaling
|
anchors.margins: Style.marginM * scaling
|
||||||
spacing: Style.marginL * scaling
|
spacing: Style.marginM * scaling
|
||||||
|
|
||||||
// Right: header on top, then avatar + texts
|
// Right: header on top, then avatar + texts
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
@ -248,12 +248,12 @@ Variants {
|
||||||
NIconButton {
|
NIconButton {
|
||||||
icon: "close"
|
icon: "close"
|
||||||
tooltipText: "Close"
|
tooltipText: "Close"
|
||||||
// Compact target (~24dp) and glyph (~16dp)
|
sizeRatio: 0.6
|
||||||
sizeRatio: 0.75
|
fontPointSize: 12
|
||||||
fontPointSize: 16
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: Style.marginM * scaling
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.margins: Style.marginS * scaling
|
anchors.rightMargin: Style.marginM * scaling
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
animateOut()
|
animateOut()
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,10 @@ Item {
|
||||||
icon: "close"
|
icon: "close"
|
||||||
visible: root.persistent || root.duration === 0
|
visible: root.persistent || root.duration === 0
|
||||||
|
|
||||||
color: Color.mOnSurface
|
colorBg: Color.mSurfaceVariant
|
||||||
|
colorFg: Color.mOnSurface
|
||||||
|
colorBorder: Color.transparent
|
||||||
|
colorBorderHover: Color.mOutline
|
||||||
|
|
||||||
fontPointSize: Style.fontSizeM * scaling
|
fontPointSize: Style.fontSizeM * scaling
|
||||||
sizeRatio: 0.8
|
sizeRatio: 0.8
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue