From 560981a97ef44d901946239f872e8b361f9d3624 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 27 Aug 2019 22:46:31 -0400 Subject: [PATCH] Remove uneeded HRectangle component --- src/qml/Base/HAvatar.qml | 2 +- src/qml/Base/HButtonBackground.qml | 4 ++-- src/qml/Base/HInteractiveRectangle.qml | 4 ++-- src/qml/Base/HInterfaceBox.qml | 2 +- src/qml/Base/HListView.qml | 2 +- src/qml/Base/HMenu.qml | 2 +- src/qml/Base/HPage.qml | 2 +- src/qml/Base/HPasswordPopup.qml | 2 +- src/qml/Base/HRectangle.qml | 6 ------ src/qml/Base/HToolTip.qml | 2 +- src/qml/Chat/Banners/Banner.qml | 7 ++++--- src/qml/Chat/RoomHeader.qml | 2 +- src/qml/Chat/RoomSidePane/RoomSidePane.qml | 2 +- src/qml/Chat/SendBox.qml | 2 +- src/qml/Chat/Timeline/EventList.qml | 2 +- src/qml/Chat/TypingMembersBar.qml | 2 +- src/qml/Pages/EditAccount/EditAccount.qml | 2 +- src/qml/Pages/EditAccount/Profile.qml | 2 +- src/qml/SidePane/SidePane.qml | 2 +- src/qml/UI.qml | 2 +- 20 files changed, 24 insertions(+), 29 deletions(-) delete mode 100644 src/qml/Base/HRectangle.qml diff --git a/src/qml/Base/HAvatar.qml b/src/qml/Base/HAvatar.qml index dd3ddddb..af768b6d 100644 --- a/src/qml/Base/HAvatar.qml +++ b/src/qml/Base/HAvatar.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.12 import "../Base" import "../utils.js" as Utils -HRectangle { +Rectangle { id: avatar implicitWidth: theme.controls.avatar.size implicitHeight: theme.controls.avatar.size diff --git a/src/qml/Base/HButtonBackground.qml b/src/qml/Base/HButtonBackground.qml index 117957d2..4d9accbb 100644 --- a/src/qml/Base/HButtonBackground.qml +++ b/src/qml/Base/HButtonBackground.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 -HRectangle { +Rectangle { color: buttonTheme.background opacity: loading ? theme.loadingElementsOpacity : enabled ? 1 : theme.disabledElementsOpacity @@ -14,7 +14,7 @@ HRectangle { Behavior on opacity { HNumberAnimation {} } - HRectangle { + Rectangle { anchors.fill: parent radius: parent.radius color: button.checked ? buttonTheme.checkedOverlay : diff --git a/src/qml/Base/HInteractiveRectangle.qml b/src/qml/Base/HInteractiveRectangle.qml index 93d5e01f..72e9b215 100644 --- a/src/qml/Base/HInteractiveRectangle.qml +++ b/src/qml/Base/HInteractiveRectangle.qml @@ -1,6 +1,6 @@ import QtQuick 2.12 -HRectangle { +Rectangle { id: rectangle property bool checkable: false // TODO @@ -11,7 +11,7 @@ HRectangle { readonly property QtObject _ir: theme.controls.interactiveRectangle color: _ir.background - HRectangle { + Rectangle { anchors.fill: parent visible: opacity > 0 diff --git a/src/qml/Base/HInterfaceBox.qml b/src/qml/Base/HInterfaceBox.qml index 9e71a8e1..05fce859 100644 --- a/src/qml/Base/HInterfaceBox.qml +++ b/src/qml/Base/HInterfaceBox.qml @@ -1,7 +1,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 -HRectangle { +Rectangle { id: interfaceBox color: theme.controls.box.background implicitWidth: Math.min( diff --git a/src/qml/Base/HListView.qml b/src/qml/Base/HListView.qml index efa1e717..f1a66802 100644 --- a/src/qml/Base/HListView.qml +++ b/src/qml/Base/HListView.qml @@ -17,7 +17,7 @@ ListView { currentItem ? currentItem.height : 0 - highlight: HRectangle { + highlight: Rectangle { color: theme.controls.listView.highlight } diff --git a/src/qml/Base/HMenu.qml b/src/qml/Base/HMenu.qml index 8e96d896..8483a18d 100644 --- a/src/qml/Base/HMenu.qml +++ b/src/qml/Base/HMenu.qml @@ -23,7 +23,7 @@ Menu { ) } - background: HRectangle { + background: Rectangle { color: "transparent" border.color: theme.controls.menu.border border.width: theme.controls.menu.borderWidth diff --git a/src/qml/Base/HPage.qml b/src/qml/Base/HPage.qml index 2fd86c2e..0b8ebdaf 100644 --- a/src/qml/Base/HPage.qml +++ b/src/qml/Base/HPage.qml @@ -35,7 +35,7 @@ SwipeView { id: innerPage background: null - header: HRectangle { + header: Rectangle { implicitWidth: parent ? parent.width : 0 color: theme.controls.header.background diff --git a/src/qml/Base/HPasswordPopup.qml b/src/qml/Base/HPasswordPopup.qml index 7b1793b9..8050fa31 100644 --- a/src/qml/Base/HPasswordPopup.qml +++ b/src/qml/Base/HPasswordPopup.qml @@ -36,7 +36,7 @@ Popup { HNumberAnimation { property: "scale"; to: 0 } } - background: HRectangle { + background: Rectangle { color: theme.controls.popup.background } diff --git a/src/qml/Base/HRectangle.qml b/src/qml/Base/HRectangle.qml deleted file mode 100644 index 5bc388b5..00000000 --- a/src/qml/Base/HRectangle.qml +++ /dev/null @@ -1,6 +0,0 @@ -import QtQuick 2.12 - -Rectangle { - id: rectangle - color: theme.controls.box.background -} diff --git a/src/qml/Base/HToolTip.qml b/src/qml/Base/HToolTip.qml index 03fd2372..f0da90b2 100644 --- a/src/qml/Base/HToolTip.qml +++ b/src/qml/Base/HToolTip.qml @@ -6,7 +6,7 @@ ToolTip { delay: theme.controls.toolTip.delay padding: background.border.width - background: HRectangle { + background: Rectangle { id: background color: theme.controls.toolTip.background border.color: theme.controls.toolTip.border diff --git a/src/qml/Chat/Banners/Banner.qml b/src/qml/Chat/Banners/Banner.qml index 8e453b92..77712eb2 100644 --- a/src/qml/Chat/Banners/Banner.qml +++ b/src/qml/Chat/Banners/Banner.qml @@ -2,9 +2,10 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import "../../Base" -HRectangle { +Rectangle { id: banner implicitHeight: childrenRect.height + color: theme.controls.box.background property alias avatar: bannerAvatar property alias icon: bannerIcon @@ -25,7 +26,7 @@ HRectangle { HRowLayout { id: bannerRow - HRectangle { + Rectangle { id: bannerAvatarWrapper color: "black" @@ -79,7 +80,7 @@ HRectangle { } } - HRectangle { + Rectangle { id: buttonsRightPadding color: theme.controls.button.background visible: bannerGrid.flow == GridLayout.TopToBottom diff --git a/src/qml/Chat/RoomHeader.qml b/src/qml/Chat/RoomHeader.qml index e4b98ce2..3ffd95f4 100644 --- a/src/qml/Chat/RoomHeader.qml +++ b/src/qml/Chat/RoomHeader.qml @@ -2,7 +2,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import "../Base" -HRectangle { +Rectangle { property alias buttonsImplicitWidth: viewButtons.implicitWidth property int buttonsWidth: viewButtons.Layout.preferredWidth property var activeButton: "members" diff --git a/src/qml/Chat/RoomSidePane/RoomSidePane.qml b/src/qml/Chat/RoomSidePane/RoomSidePane.qml index db46311e..22423e79 100644 --- a/src/qml/Chat/RoomSidePane/RoomSidePane.qml +++ b/src/qml/Chat/RoomSidePane/RoomSidePane.qml @@ -2,7 +2,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import "../../Base" -HRectangle { +Rectangle { id: roomSidePane color: theme.chat.roomSidePane.background diff --git a/src/qml/Chat/SendBox.qml b/src/qml/Chat/SendBox.qml index 1df37af7..0da1df39 100644 --- a/src/qml/Chat/SendBox.qml +++ b/src/qml/Chat/SendBox.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts 1.12 import "../Base" import "../utils.js" as Utils -HRectangle { +Rectangle { function setFocus() { areaScrollView.forceActiveFocus() } property string indent: " " diff --git a/src/qml/Chat/Timeline/EventList.qml b/src/qml/Chat/Timeline/EventList.qml index ab69afe8..ec5ef3af 100644 --- a/src/qml/Chat/Timeline/EventList.qml +++ b/src/qml/Chat/Timeline/EventList.qml @@ -2,7 +2,7 @@ import QtQuick 2.12 import "../../Base" import "../../utils.js" as Utils -HRectangle { +Rectangle { property alias listView: eventList color: theme.chat.eventList.background diff --git a/src/qml/Chat/TypingMembersBar.qml b/src/qml/Chat/TypingMembersBar.qml index bca64ebd..69c69d4e 100644 --- a/src/qml/Chat/TypingMembersBar.qml +++ b/src/qml/Chat/TypingMembersBar.qml @@ -2,7 +2,7 @@ import QtQuick 2.12 import QtQuick.Layouts 1.12 import "../Base" -HRectangle { +Rectangle { id: typingMembersBar property alias label: typingLabel diff --git a/src/qml/Pages/EditAccount/EditAccount.qml b/src/qml/Pages/EditAccount/EditAccount.qml index bf01831a..5c5d32a5 100644 --- a/src/qml/Pages/EditAccount/EditAccount.qml +++ b/src/qml/Pages/EditAccount/EditAccount.qml @@ -33,7 +33,7 @@ HPage { id: repeater model: ["Profile.qml", "Encryption.qml"] - HRectangle { + Rectangle { color: ready ? theme.controls.box.background : "transparent" Behavior on color { HColorAnimation {} } diff --git a/src/qml/Pages/EditAccount/Profile.qml b/src/qml/Pages/EditAccount/Profile.qml index fb4e1545..8cd37b36 100644 --- a/src/qml/Pages/EditAccount/Profile.qml +++ b/src/qml/Pages/EditAccount/Profile.qml @@ -66,7 +66,7 @@ HGridLayout { Layout.preferredWidth: Math.min(flickable.height, avatarPreferredSize) Layout.preferredHeight: Layout.preferredWidth - HRectangle { + Rectangle { z: 10 visible: opacity > 0 opacity: ! fileDialog.dialog.visible && diff --git a/src/qml/SidePane/SidePane.qml b/src/qml/SidePane/SidePane.qml index 3e84ffaa..5e7dd57e 100644 --- a/src/qml/SidePane/SidePane.qml +++ b/src/qml/SidePane/SidePane.qml @@ -3,7 +3,7 @@ import QtQuick.Layouts 1.12 import "../Base" import "../utils.js" as Utils -HRectangle { +Rectangle { id: sidePane clip: true opacity: mainUI.accountsPresent && ! reduce ? 1 : 0 diff --git a/src/qml/UI.qml b/src/qml/UI.qml index 75b83b4f..2c348a45 100644 --- a/src/qml/UI.qml +++ b/src/qml/UI.qml @@ -5,7 +5,7 @@ import QtQuick.Window 2.7 import "Base" import "SidePane" -HRectangle { +Rectangle { id: mainUI color: theme.ui.background Component.onCompleted: window.mainUI = mainUI