diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-01-11 04:12:42 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-01-11 04:12:42 +0100 |
commit | 59bc8307c8e9cd50c4d70d11e418a427c5c86fa2 (patch) | |
tree | 3af1a8d61aa8ea51f24925e04d826ca8c672b22e /resources/qml | |
parent | Port usersettings to qml (diff) | |
download | nheko-59bc8307c8e9cd50c4d70d11e418a427c5c86fa2.tar.xz |
Address review comments
Diffstat (limited to 'resources/qml')
-rw-r--r-- | resources/qml/UserSettingsPage.qml | 19 | ||||
-rw-r--r-- | resources/qml/components/FlatButton.qml | 1 |
2 files changed, 8 insertions, 12 deletions
diff --git a/resources/qml/UserSettingsPage.qml b/resources/qml/UserSettingsPage.qml index 025f44fa..588f0c2c 100644 --- a/resources/qml/UserSettingsPage.qml +++ b/resources/qml/UserSettingsPage.qml @@ -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 diff --git a/resources/qml/components/FlatButton.qml b/resources/qml/components/FlatButton.qml index 1978b373..8ca3f104 100644 --- a/resources/qml/components/FlatButton.qml +++ b/resources/qml/components/FlatButton.qml @@ -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 |