Remove uneeded HRectangle component

This commit is contained in:
miruka 2019-08-27 22:46:31 -04:00
parent 77dbc3a502
commit 560981a97e
20 changed files with 24 additions and 29 deletions

View File

@ -3,7 +3,7 @@ import QtQuick.Controls 2.12
import "../Base" import "../Base"
import "../utils.js" as Utils import "../utils.js" as Utils
HRectangle { Rectangle {
id: avatar id: avatar
implicitWidth: theme.controls.avatar.size implicitWidth: theme.controls.avatar.size
implicitHeight: theme.controls.avatar.size implicitHeight: theme.controls.avatar.size

View File

@ -1,7 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12 import QtQuick.Controls 2.12
HRectangle { Rectangle {
color: buttonTheme.background color: buttonTheme.background
opacity: loading ? theme.loadingElementsOpacity : opacity: loading ? theme.loadingElementsOpacity :
enabled ? 1 : theme.disabledElementsOpacity enabled ? 1 : theme.disabledElementsOpacity
@ -14,7 +14,7 @@ HRectangle {
Behavior on opacity { HNumberAnimation {} } Behavior on opacity { HNumberAnimation {} }
HRectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
radius: parent.radius radius: parent.radius
color: button.checked ? buttonTheme.checkedOverlay : color: button.checked ? buttonTheme.checkedOverlay :

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick 2.12
HRectangle { Rectangle {
id: rectangle id: rectangle
property bool checkable: false // TODO property bool checkable: false // TODO
@ -11,7 +11,7 @@ HRectangle {
readonly property QtObject _ir: theme.controls.interactiveRectangle readonly property QtObject _ir: theme.controls.interactiveRectangle
color: _ir.background color: _ir.background
HRectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
visible: opacity > 0 visible: opacity > 0

View File

@ -1,7 +1,7 @@
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
HRectangle { Rectangle {
id: interfaceBox id: interfaceBox
color: theme.controls.box.background color: theme.controls.box.background
implicitWidth: Math.min( implicitWidth: Math.min(

View File

@ -17,7 +17,7 @@ ListView {
currentItem ? currentItem.height : 0 currentItem ? currentItem.height : 0
highlight: HRectangle { highlight: Rectangle {
color: theme.controls.listView.highlight color: theme.controls.listView.highlight
} }

View File

@ -23,7 +23,7 @@ Menu {
) )
} }
background: HRectangle { background: Rectangle {
color: "transparent" color: "transparent"
border.color: theme.controls.menu.border border.color: theme.controls.menu.border
border.width: theme.controls.menu.borderWidth border.width: theme.controls.menu.borderWidth

View File

@ -35,7 +35,7 @@ SwipeView {
id: innerPage id: innerPage
background: null background: null
header: HRectangle { header: Rectangle {
implicitWidth: parent ? parent.width : 0 implicitWidth: parent ? parent.width : 0
color: theme.controls.header.background color: theme.controls.header.background

View File

@ -36,7 +36,7 @@ Popup {
HNumberAnimation { property: "scale"; to: 0 } HNumberAnimation { property: "scale"; to: 0 }
} }
background: HRectangle { background: Rectangle {
color: theme.controls.popup.background color: theme.controls.popup.background
} }

View File

@ -1,6 +0,0 @@
import QtQuick 2.12
Rectangle {
id: rectangle
color: theme.controls.box.background
}

View File

@ -6,7 +6,7 @@ ToolTip {
delay: theme.controls.toolTip.delay delay: theme.controls.toolTip.delay
padding: background.border.width padding: background.border.width
background: HRectangle { background: Rectangle {
id: background id: background
color: theme.controls.toolTip.background color: theme.controls.toolTip.background
border.color: theme.controls.toolTip.border border.color: theme.controls.toolTip.border

View File

@ -2,9 +2,10 @@ import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../Base"
HRectangle { Rectangle {
id: banner id: banner
implicitHeight: childrenRect.height implicitHeight: childrenRect.height
color: theme.controls.box.background
property alias avatar: bannerAvatar property alias avatar: bannerAvatar
property alias icon: bannerIcon property alias icon: bannerIcon
@ -25,7 +26,7 @@ HRectangle {
HRowLayout { HRowLayout {
id: bannerRow id: bannerRow
HRectangle { Rectangle {
id: bannerAvatarWrapper id: bannerAvatarWrapper
color: "black" color: "black"
@ -79,7 +80,7 @@ HRectangle {
} }
} }
HRectangle { Rectangle {
id: buttonsRightPadding id: buttonsRightPadding
color: theme.controls.button.background color: theme.controls.button.background
visible: bannerGrid.flow == GridLayout.TopToBottom visible: bannerGrid.flow == GridLayout.TopToBottom

View File

@ -2,7 +2,7 @@ import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../Base"
HRectangle { Rectangle {
property alias buttonsImplicitWidth: viewButtons.implicitWidth property alias buttonsImplicitWidth: viewButtons.implicitWidth
property int buttonsWidth: viewButtons.Layout.preferredWidth property int buttonsWidth: viewButtons.Layout.preferredWidth
property var activeButton: "members" property var activeButton: "members"

View File

@ -2,7 +2,7 @@ import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../Base"
HRectangle { Rectangle {
id: roomSidePane id: roomSidePane
color: theme.chat.roomSidePane.background color: theme.chat.roomSidePane.background

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts 1.12
import "../Base" import "../Base"
import "../utils.js" as Utils import "../utils.js" as Utils
HRectangle { Rectangle {
function setFocus() { areaScrollView.forceActiveFocus() } function setFocus() { areaScrollView.forceActiveFocus() }
property string indent: " " property string indent: " "

View File

@ -2,7 +2,7 @@ import QtQuick 2.12
import "../../Base" import "../../Base"
import "../../utils.js" as Utils import "../../utils.js" as Utils
HRectangle { Rectangle {
property alias listView: eventList property alias listView: eventList
color: theme.chat.eventList.background color: theme.chat.eventList.background

View File

@ -2,7 +2,7 @@ import QtQuick 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../Base" import "../Base"
HRectangle { Rectangle {
id: typingMembersBar id: typingMembersBar
property alias label: typingLabel property alias label: typingLabel

View File

@ -33,7 +33,7 @@ HPage {
id: repeater id: repeater
model: ["Profile.qml", "Encryption.qml"] model: ["Profile.qml", "Encryption.qml"]
HRectangle { Rectangle {
color: ready ? theme.controls.box.background : "transparent" color: ready ? theme.controls.box.background : "transparent"
Behavior on color { HColorAnimation {} } Behavior on color { HColorAnimation {} }

View File

@ -66,7 +66,7 @@ HGridLayout {
Layout.preferredWidth: Math.min(flickable.height, avatarPreferredSize) Layout.preferredWidth: Math.min(flickable.height, avatarPreferredSize)
Layout.preferredHeight: Layout.preferredWidth Layout.preferredHeight: Layout.preferredWidth
HRectangle { Rectangle {
z: 10 z: 10
visible: opacity > 0 visible: opacity > 0
opacity: ! fileDialog.dialog.visible && opacity: ! fileDialog.dialog.visible &&

View File

@ -3,7 +3,7 @@ import QtQuick.Layouts 1.12
import "../Base" import "../Base"
import "../utils.js" as Utils import "../utils.js" as Utils
HRectangle { Rectangle {
id: sidePane id: sidePane
clip: true clip: true
opacity: mainUI.accountsPresent && ! reduce ? 1 : 0 opacity: mainUI.accountsPresent && ! reduce ? 1 : 0

View File

@ -5,7 +5,7 @@ import QtQuick.Window 2.7
import "Base" import "Base"
import "SidePane" import "SidePane"
HRectangle { Rectangle {
id: mainUI id: mainUI
color: theme.ui.background color: theme.ui.background
Component.onCompleted: window.mainUI = mainUI Component.onCompleted: window.mainUI = mainUI