Add wordwrap to Bluetooth- and WiFi-Panel; some fixes for the German translation

This commit is contained in:
notiant
2025-11-08 02:39:58 +01:00
committed by GitHub
parent 48ff3314cc
commit 58dde183e0
3 changed files with 39 additions and 28 deletions
+17 -8
View File
@@ -13,12 +13,12 @@ SmartPanel {
id: root
preferredWidth: Math.round(340 * Style.uiScaleRatio)
preferredHeight: 500 * Style.uiScaleRatio
preferredHeight: Math.round(500 * Style.uiScaleRatio)
panelContent: Rectangle {
color: Color.transparent
property real contentPreferredHeight: Math.min(preferredHeight, Math.max(240, mainColumn.implicitHeight + Style.marginL * 2))
property real contentPreferredHeight: Math.min(preferredHeight, Math.max(280 * Style.uiScaleRatio, mainColumn.implicitHeight + Style.marginL * 2))
ColumnLayout {
id: mainColumn
@@ -29,13 +29,12 @@ SmartPanel {
// Header
NBox {
Layout.fillWidth: true
implicitHeight: headerRow.implicitHeight + (Style.marginM * 2)
Layout.preferredHeight: headerRow.implicitHeight + Style.marginM * 2
RowLayout {
id: headerRow
anchors.fill: parent
anchors.leftMargin: Style.marginM
anchors.rightMargin: Style.marginM
anchors.margins: Style.marginM
spacing: Style.marginM
NIcon {
@@ -90,9 +89,13 @@ SmartPanel {
// Center the content within this rectangle
ColumnLayout {
anchors.centerIn: parent
anchors.fill: parent
spacing: Style.marginM
Item {
Layout.fillHeight: true
}
NIcon {
icon: "bluetooth-off"
pointSize: 48
@@ -111,7 +114,13 @@ SmartPanel {
text: I18n.tr("bluetooth.panel.enable-message")
pointSize: Style.fontSizeS
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
wrapMode: Text.WordWrap
}
Item {
Layout.fillHeight: true
}
}
}
@@ -237,4 +246,4 @@ SmartPanel {
}
}
}
}
}
+4 -2
View File
@@ -150,7 +150,9 @@ SmartPanel {
text: I18n.tr("wifi.panel.enable-message")
pointSize: Style.fontSizeS
color: Color.mOnSurfaceVariant
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
wrapMode: Text.WordWrap
}
Item {
@@ -590,4 +592,4 @@ SmartPanel {
}
}
}
}
}