booru: add api provider indicator

This commit is contained in:
end-4
2025-04-29 13:18:27 +02:00
parent f21f670d21
commit 54514522d4
2 changed files with 39 additions and 2 deletions
@@ -71,6 +71,41 @@ Item {
id: columnLayout
anchors.fill: parent
Rectangle {
Layout.alignment: Qt.AlignHCenter
implicitHeight: providerRowLayout.implicitHeight + 5 * 2
implicitWidth: providerRowLayout.implicitWidth + 10 * 2
radius: Appearance.rounding.small
color: Appearance.colors.colLayer1
RowLayout {
id: providerRowLayout
anchors.centerIn: parent
MaterialSymbol {
text: "api"
font.pixelSize: Appearance.font.pixelSize.large
}
StyledText {
id: providerName
font.pixelSize: Appearance.font.pixelSize.large
font.weight: Font.DemiBold
color: Appearance.m3colors.m3onSurface
text: Booru.providers[Booru.currentProvider].name
}
}
StyledToolTip {
id: toolTip
alternativeVisibleCondition: mouseArea.containsMouse // Show tooltip when hovered
content: qsTr("The current API used. Endpoint: ") + Booru.providers[Booru.currentProvider].url + qsTr("\nSet with /mode PROVIDER")
}
MouseArea {
id: mouseArea
anchors.fill: parent
hoverEnabled: true
}
}
Item {
Layout.fillWidth: true
Layout.fillHeight: true