Refine mobileform settings
Numerous refinements to the new mobileform setting pages - Ensure left and right padding at the top level is 0 for mobile - Centre align the avatar in the account editor page and add tooltip to button - Fix the bubble/compact mode setting so that it fits when thin, i.e on mobile - Fix the loading placeholder in device settings
This commit is contained in:
@@ -18,6 +18,8 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
readonly property bool compact: width > Kirigami.Units.gridUnit * 30 ? 2 : 1
|
readonly property bool compact: width > Kirigami.Units.gridUnit * 30 ? 2 : 1
|
||||||
|
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: 0
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
MobileForm.FormCard {
|
MobileForm.FormCard {
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
@@ -29,9 +31,14 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
MobileForm.AbstractFormDelegate {
|
MobileForm.AbstractFormDelegate {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
Kirigami.Avatar {
|
Kirigami.Avatar {
|
||||||
id: avatar
|
id: avatar
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
source: root.connection && root.connection.localUser.avatarMediaId ? ("image://mxc/" + root.connection.localUser.avatarMediaId) : ""
|
source: root.connection && root.connection.localUser.avatarMediaId ? ("image://mxc/" + root.connection.localUser.avatarMediaId) : ""
|
||||||
name: root.connection.localUser.displayName ?? root.connection.localUser.id
|
name: root.connection.localUser.displayName ?? root.connection.localUser.id
|
||||||
|
|
||||||
@@ -60,10 +67,16 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
QQC2.Button {
|
QQC2.Button {
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
visible: avatar.source.toString().length !== 0
|
visible: avatar.source.toString().length !== 0
|
||||||
icon.name: "edit-clear"
|
icon.name: "edit-clear"
|
||||||
|
text: i18n("Remove current avatar")
|
||||||
|
display: QQC2.AbstractButton.IconOnly
|
||||||
|
|
||||||
onClicked: avatar.source = ""
|
onClicked: avatar.source = ""
|
||||||
|
|
||||||
|
QQC2.ToolTip.text: text
|
||||||
|
QQC2.ToolTip.visible: hovered
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -26,13 +26,18 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
MobileForm.AbstractFormDelegate {
|
MobileForm.AbstractFormDelegate {
|
||||||
|
id: timelineModeSetting
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: RowLayout {
|
contentItem: RowLayout {
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
spacing: Kirigami.Units.gridUnit * 2
|
spacing: Kirigami.Units.largeSpacing
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
QQC2.ButtonGroup { id: themeGroup }
|
QQC2.ButtonGroup { id: themeGroup }
|
||||||
ThemeRadioButton {
|
ThemeRadioButton {
|
||||||
|
thin: timelineModeSetting.width < Kirigami.Units.gridUnit * 22
|
||||||
innerObject: [
|
innerObject: [
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -121,7 +126,8 @@ Kirigami.ScrollablePage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ThemeRadioButton {
|
ThemeRadioButton {
|
||||||
Layout.alignment: Qt.AlignRight
|
// Layout.alignment: Qt.AlignRight
|
||||||
|
thin: timelineModeSetting.width < Kirigami.Units.gridUnit * 22
|
||||||
innerObject: [
|
innerObject: [
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -188,6 +194,9 @@ Kirigami.ScrollablePage {
|
|||||||
Config.save();
|
Config.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,13 @@ Kirigami.ScrollablePage {
|
|||||||
MobileForm.FormCardHeader {
|
MobileForm.FormCardHeader {
|
||||||
title: i18n("Devices")
|
title: i18n("Devices")
|
||||||
}
|
}
|
||||||
|
MobileForm.AbstractFormDelegate {
|
||||||
Kirigami.LoadingPlaceholder {
|
Layout.fillWidth: true
|
||||||
Layout.alignment: Qt.AlignHCenter
|
visible: deviceRepeater.count === 0 // We can assume 0 means loading since there is at least one device
|
||||||
visible: parent.count === 0 // We can assume 0 means loading since there is at least one device
|
contentItem: Kirigami.LoadingPlaceholder { }
|
||||||
}
|
}
|
||||||
Repeater {
|
Repeater {
|
||||||
|
id: deviceRepeater
|
||||||
model: DevicesModel {
|
model: DevicesModel {
|
||||||
id: devices
|
id: devices
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import org.kde.neochat 1.0
|
|||||||
|
|
||||||
Kirigami.ScrollablePage {
|
Kirigami.ScrollablePage {
|
||||||
title: i18nc("@title:window", "Notifications")
|
title: i18nc("@title:window", "Notifications")
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: 0
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: notificationLayout
|
id: notificationLayout
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ Kirigami.ScrollablePage {
|
|||||||
property int currentType
|
property int currentType
|
||||||
property bool proxyConfigChanged: false
|
property bool proxyConfigChanged: false
|
||||||
|
|
||||||
|
leftPadding: 0
|
||||||
|
rightPadding: 0
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
MobileForm.FormCard {
|
MobileForm.FormCard {
|
||||||
Layout.topMargin: Kirigami.Units.largeSpacing
|
Layout.topMargin: Kirigami.Units.largeSpacing
|
||||||
|
|||||||
@@ -15,11 +15,12 @@ QQC2.RadioButton {
|
|||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
|
|
||||||
property alias innerObject: contentLayout.children
|
property alias innerObject: contentLayout.children
|
||||||
|
property bool thin
|
||||||
|
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
Kirigami.ShadowedRectangle {
|
Kirigami.ShadowedRectangle {
|
||||||
implicitWidth: implicitHeight * 1.6
|
implicitWidth: implicitHeight * 1.6
|
||||||
implicitHeight: Kirigami.Units.gridUnit * 6
|
implicitHeight: delegate.thin ? Kirigami.Units.gridUnit * 5 : Kirigami.Units.gridUnit * 6
|
||||||
radius: Kirigami.Units.smallSpacing
|
radius: Kirigami.Units.smallSpacing
|
||||||
Kirigami.Theme.inherit: false
|
Kirigami.Theme.inherit: false
|
||||||
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
Kirigami.Theme.colorSet: Kirigami.Theme.View
|
||||||
|
|||||||
Reference in New Issue
Block a user