Merge pull request #679 from notiant/patch-15

Add wordwrap to Bluetooth- and WiFi-Panel; some fixes for the German translation
This commit is contained in:
Lemmy
2025-11-09 16:04:19 -05:00
committed by GitHub
3 changed files with 37 additions and 26 deletions
+15 -6
View File
@@ -18,7 +18,7 @@ SmartPanel {
panelContent: Rectangle {
color: Color.transparent
property real contentPreferredHeight: Math.min(preferredHeight, Math.max(240, mainColumn.implicitHeight + Style.marginL * 2))
property real contentPreferredHeight: !(BluetoothService.adapter && BluetoothService.adapter.enabled) ? Math.min(preferredHeight, Math.max(280 * Style.uiScaleRatio, mainColumn.implicitHeight + Style.marginL * 2)) : (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
}
}
}
+4 -2
View File
@@ -149,7 +149,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 {
@@ -589,4 +591,4 @@ SmartPanel {
}
}
}
}
}