Use H*Layout totalSpacing wherever possible
This commit is contained in:
parent
455490b5af
commit
b8901dfc5b
2
TODO.md
2
TODO.md
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user