Use H*Layout totalSpacing wherever possible

This commit is contained in:
miruka 2019-04-28 14:53:45 -04:00
parent 455490b5af
commit b8901dfc5b
7 changed files with 5 additions and 10 deletions

View File

@ -1,5 +1,4 @@
- Refactoring - Refactoring
- Use totalSpacing everywhere
- Migrate more JS functions to their own files / Implement in Python instead - Migrate more JS functions to their own files / Implement in Python instead
- Don't bake in size properties for components - Don't bake in size properties for components
@ -49,7 +48,6 @@
- Push instead of replacing in stack view - Push instead of replacing in stack view
- Make links in room subtitle clickable, formatting? - Make links in room subtitle clickable, formatting?
- `<pre>` scrollbar on overflow - `<pre>` scrollbar on overflow
- Use Loader? for MessageDelegate to show sub-components based on condition
- Handle cases where an avatar char is # or @ (#alias room, @user\_id) - Handle cases where an avatar char is # or @ (#alias room, @user\_id)
- Proper logoff when closing client - Proper logoff when closing client
- When inviting someone to direct chat, room is "Empty room" until accepted, - When inviting someone to direct chat, room is "Empty room" until accepted,

View File

@ -45,7 +45,6 @@ Base.HGlassRectangle {
Base.HRowLayout { Base.HRowLayout {
id: bannerButtons id: bannerButtons
spacing: 0
function getButtonsWidth() { function getButtonsWidth() {
var total = 0 var total = 0

View File

@ -1,10 +1,11 @@
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
import QtQuick.Layouts 1.4 import QtQuick.Layouts 1.4
import "../Base" as Base
import "Banners" import "Banners"
import "RoomEventList" import "RoomEventList"
ColumnLayout { Base.HColumnLayout {
property string userId: "" property string userId: ""
property string roomId: "" property string roomId: ""
@ -16,7 +17,6 @@ ColumnLayout {
Component.onCompleted: console.log("replaced") Component.onCompleted: console.log("replaced")
id: chatPage id: chatPage
spacing: 0
onFocusChanged: sendBox.setFocus() onFocusChanged: sendBox.setFocus()
RoomHeader { RoomHeader {

View File

@ -4,7 +4,7 @@ import QtQuick.Layouts 1.4
import "../../Base" as Base import "../../Base" as Base
import "../utils.js" as ChatJS import "../utils.js" as ChatJS
RowLayout { Base.HRowLayout {
id: eventContent id: eventContent
spacing: standardSpacing / 2 spacing: standardSpacing / 2
layoutDirection: isOwn ? Qt.RightToLeft : Qt.LeftToRight layoutDirection: isOwn ? Qt.RightToLeft : Qt.LeftToRight

View File

@ -10,7 +10,7 @@ Row {
Base.HAvatar { id: avatar; hidden: combine; name: displayName } Base.HAvatar { id: avatar; hidden: combine; name: displayName }
ColumnLayout { Base.HColumnLayout {
spacing: 0 spacing: 0
Base.HLabel { Base.HLabel {
@ -56,7 +56,7 @@ Row {
Layout.minimumWidth: nameLabel.implicitWidth Layout.minimumWidth: nameLabel.implicitWidth
Layout.maximumWidth: Math.min( Layout.maximumWidth: Math.min(
600, roomEventListView.width - avatar.width - row.spacing 600, roomEventListView.width - avatar.width - row.totalSpacing
) )
} }
} }

View File

@ -16,7 +16,6 @@ Base.HGlassRectangle {
Base.HRowLayout { Base.HRowLayout {
anchors.fill: parent anchors.fill: parent
spacing: 0
Base.HAvatar { Base.HAvatar {
id: avatar id: avatar

View File

@ -5,7 +5,6 @@ import "../Base" as Base
Base.HRowLayout { Base.HRowLayout {
id: toolBar id: toolBar
spacing: 0
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 32 Layout.preferredHeight: 32