mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Address review comments
This commit is contained in:
parent
f1a23355bd
commit
59bc8307c8
3 changed files with 8 additions and 13 deletions
|
@ -6,22 +6,18 @@
|
|||
import "ui"
|
||||
import Qt.labs.platform 1.1 as Platform
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Window 2.13
|
||||
import QtQuick.Window 2.15
|
||||
import im.nheko 1.0
|
||||
|
||||
Rectangle {
|
||||
id: userSettingsDialog
|
||||
|
||||
property bool collapsed: width < 800
|
||||
property int collapsePoint: 800
|
||||
property bool collapsed: width < collapsePoint
|
||||
color: Nheko.colors.window
|
||||
|
||||
Shortcut {
|
||||
sequence: StandardKey.Cancel
|
||||
onActivated: userSettingsDialog.close()
|
||||
}
|
||||
|
||||
ScrollView {
|
||||
id: scroll
|
||||
|
||||
|
@ -51,8 +47,8 @@ Rectangle {
|
|||
columnSpacing: Nheko.paddingMedium
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: userSettingsDialog.collapsed ? Nheko.paddingLarge : (userSettingsDialog.width-600) * 0.4
|
||||
anchors.rightMargin: userSettingsDialog.collapsed ? Nheko.paddingLarge : (userSettingsDialog.width-600) * 0.4
|
||||
anchors.leftMargin: userSettingsDialog.collapsed ? Nheko.paddingLarge : (userSettingsDialog.width-userSettingsDialog.collapsePoint) * 0.4
|
||||
anchors.rightMargin: anchors.leftMargin
|
||||
|
||||
Repeater {
|
||||
model: UserSettingsModel
|
||||
|
@ -63,7 +59,6 @@ Rectangle {
|
|||
|
||||
Component.onCompleted: {
|
||||
while (children.length) {
|
||||
console.log("Reparenting: " + children[0]);
|
||||
children[0].parent = grid;
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +74,7 @@ Rectangle {
|
|||
Layout.minimumWidth: implicitWidth
|
||||
Layout.leftMargin: model.type == UserSettingsModel.SectionTitle ? 0 : Nheko.paddingMedium
|
||||
Layout.topMargin: model.type == UserSettingsModel.SectionTitle ? Nheko.paddingLarge : 0
|
||||
font.pointSize: 1.1 * fontInfo.pointSize
|
||||
font.pointSize: 1.1 * fontMetrics.font.pointSize
|
||||
|
||||
HoverHandler {
|
||||
id: hovered
|
||||
|
|
|
@ -8,6 +8,7 @@ import QtQuick 2.9
|
|||
import QtQuick.Controls 2.5
|
||||
import im.nheko 1.0
|
||||
|
||||
// FIXME(Nico): Don't use hardcoded colors.
|
||||
Button {
|
||||
id: control
|
||||
|
||||
|
|
|
@ -964,7 +964,6 @@ UserSettingsModel::data(const QModelIndex &index, int role) const
|
|||
return data(index, Values).toStringList().indexOf(i->emojiFont());
|
||||
case Ringtone: {
|
||||
auto v = i->ringtone();
|
||||
nhlog::ui()->critical("ringtone: {}", v.toStdString());
|
||||
if (v == QStringView(u"Mute"))
|
||||
return 0;
|
||||
else if (v == QStringView(u"Default"))
|
||||
|
|
Loading…
Reference in a new issue