From d302a5cf5f36ed270b88fd81579ce2d332bd11bc Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 16 Jul 2019 05:13:19 -0400 Subject: [PATCH] Rename bottomElementsHeight to baseElementsHeight --- TODO.md | 1 - src/qml/Chat/Banners/Banner.qml | 2 +- src/qml/Chat/RoomSidePane/MembersView.qml | 2 +- src/qml/Chat/SendBox.qml | 2 +- src/qml/Pages/EditAccount/EditAccount.qml | 4 ++-- src/qml/SidePane/PaneToolBar.qml | 2 +- src/qml/Theme.qml | 6 +++--- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/TODO.md b/TODO.md index c1a82568..d9fcab27 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,4 @@ - Use childrenRect stuff -- Rename theme.bottomElementsHeight - Account delegate name color - If avatar is set, name color from average color? - normalSpacing in Theme diff --git a/src/qml/Chat/Banners/Banner.qml b/src/qml/Chat/Banners/Banner.qml index c7749cab..8d681402 100644 --- a/src/qml/Chat/Banners/Banner.qml +++ b/src/qml/Chat/Banners/Banner.qml @@ -8,7 +8,7 @@ import "../../Base" HRectangle { id: banner Layout.fillWidth: true - Layout.preferredHeight: theme.bottomElementsHeight + Layout.preferredHeight: theme.baseElementsHeight property alias avatar: bannerAvatar property alias icon: bannerIcon diff --git a/src/qml/Chat/RoomSidePane/MembersView.qml b/src/qml/Chat/RoomSidePane/MembersView.qml index cdc91b9c..ea9a5952 100644 --- a/src/qml/Chat/RoomSidePane/MembersView.qml +++ b/src/qml/Chat/RoomSidePane/MembersView.qml @@ -45,6 +45,6 @@ HColumnLayout { backgroundColor: theme.sidePane.filterRooms.background Layout.fillWidth: true - Layout.preferredHeight: theme.bottomElementsHeight + Layout.preferredHeight: theme.baseElementsHeight } } diff --git a/src/qml/Chat/SendBox.qml b/src/qml/Chat/SendBox.qml index fbaead21..45e70b00 100644 --- a/src/qml/Chat/SendBox.qml +++ b/src/qml/Chat/SendBox.qml @@ -10,7 +10,7 @@ HRectangle { id: sendBox Layout.fillWidth: true - Layout.minimumHeight: theme.bottomElementsHeight + Layout.minimumHeight: theme.baseElementsHeight Layout.preferredHeight: textArea.implicitHeight // parent.height / 2 causes binding loop? Layout.maximumHeight: pageStack.height / 2 diff --git a/src/qml/Pages/EditAccount/EditAccount.qml b/src/qml/Pages/EditAccount/EditAccount.qml index 0da03cf7..5494ee2b 100644 --- a/src/qml/Pages/EditAccount/EditAccount.qml +++ b/src/qml/Pages/EditAccount/EditAccount.qml @@ -25,9 +25,9 @@ Page { height: window.height < avatarPreferredSize + - theme.bottomElementsHeight + + theme.baseElementsHeight + currentSpacing * 2 ? - 0 : theme.bottomElementsHeight + 0 : theme.baseElementsHeight Behavior on height { HNumberAnimation {} } visible: height > 0 diff --git a/src/qml/SidePane/PaneToolBar.qml b/src/qml/SidePane/PaneToolBar.qml index 0ac5c703..346de188 100644 --- a/src/qml/SidePane/PaneToolBar.qml +++ b/src/qml/SidePane/PaneToolBar.qml @@ -10,7 +10,7 @@ HRowLayout { property alias roomFilter: filterField.text Layout.fillWidth: true - Layout.preferredHeight: theme.bottomElementsHeight + Layout.preferredHeight: theme.baseElementsHeight HUIButton { iconName: "settings" diff --git a/src/qml/Theme.qml b/src/qml/Theme.qml index 7e35af02..a933c710 100644 --- a/src/qml/Theme.qml +++ b/src/qml/Theme.qml @@ -11,6 +11,8 @@ QtObject { property int minimumSupportedWidth: 240 property int minimumSupportedHeight: 120 + property int baseElementsHeight: 36 + property QtObject fontSize: QtObject { property int smallest: 6 property int smaller: 8 @@ -134,7 +136,7 @@ QtObject { } property QtObject avatar: QtObject { - property int size: 36 + property int size: baseElementsHeight property int radius: theme.radius property color letter: "white" @@ -150,6 +152,4 @@ QtObject { property real saturation: 0.32 property real lightness: 0.3 } - - property int bottomElementsHeight: 36 }