2023-08-24 15:50:37 +08:00
import QtQuick
import QtQuick . Layouts
import QtQuick . Window
import QtQuick . Controls
import FluentUI
2024-01-25 17:26:50 +08:00
import "../component"
2023-08-24 15:50:37 +08:00
FluScrollablePage {
2024-03-09 15:35:48 +08:00
title: qsTr ( "Badge" )
2023-08-24 15:50:37 +08:00
FluArea {
Layout.fillWidth: true
Layout.topMargin: 20
2024-03-09 15:35:48 +08:00
height: 120
2023-08-24 15:50:37 +08:00
paddings: 10
Column {
spacing: 15
anchors {
verticalCenter: parent . verticalCenter
left: parent . left
2024-03-09 15:35:48 +08:00
right: parent . right
2023-08-24 15:50:37 +08:00
}
FluText {
2024-03-09 22:19:10 +08:00
wrapMode: Text . WrapAnywhere
2024-03-09 15:35:48 +08:00
width: parent . width
text: qsTr ( "It usually appears in the upper right corner of the notification icon or avatar to display the number of messages that need to be processed" )
2023-08-24 15:50:37 +08:00
}
Row {
spacing: 20
Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
topRight: true
showZero: true
count: 0
}
}
Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
topRight: true
showZero: true
count: 5
}
}
Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
topRight: true
showZero: true
count: 50
}
}
Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
topRight: true
showZero: true
count: 100
}
}
Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
topRight: true
showZero: true
isDot: true
}
}
Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
topRight: true
showZero: true
count: 99
color: Qt . rgba ( 250 / 255 , 173 / 255 , 20 / 255 , 1 )
}
}
Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
topRight: true
showZero: true
count: 99
color: Qt . rgba ( 82 / 255 , 196 / 255 , 26 / 255 , 1 )
}
}
}
}
}
CodeExpander {
Layout.fillWidth: true
Layout.topMargin: - 1
code: ' Rectangle {
width: 40
height: 40
radius: 8
color: Qt . rgba ( 191 / 255 , 191 / 255 , 191 / 255 , 1 )
FluBadge {
count: 100
isDot: false
color: Qt . rgba ( 82 / 255 , 196 / 255 , 26 / 255 , 1 )
}
} '
}
}