Initial themes implementation, new default theme

This commit is contained in:
miruka
2019-07-24 02:14:34 -04:00
parent 345b17b21f
commit ec27ecf498
89 changed files with 956 additions and 165 deletions

View File

@@ -16,6 +16,9 @@ HSplitView {
Layout.fillWidth: true
EventList {
// Avoid a certain binding loop
Layout.minimumWidth: theme.minimumSupportedWidth
Layout.fillWidth: true
Layout.fillHeight: true
}
@@ -79,11 +82,11 @@ HSplitView {
to: target.oldWidth
onStopped: target.Layout.minimumWidth = Qt.binding(
() => theme.avatar.size
() => theme.controls.avatar.size
)
}
collapsed: width < theme.avatar.size + theme.spacing
collapsed: width < theme.controls.avatar.size + theme.spacing
property bool wasSnapped: false
property int referenceWidth: roomHeader.buttonsWidth
@@ -110,7 +113,7 @@ HSplitView {
}
width: referenceWidth // Initial width
Layout.minimumWidth: theme.avatar.size
Layout.minimumWidth: theme.controls.avatar.size
Layout.maximumWidth:
parent.width - theme.minimumSupportedWidthPlusSpacing
}

View File

@@ -38,6 +38,7 @@ HRectangle {
id: roomName
text: displayName
font.pixelSize: theme.fontSize.big
color: theme.chat.roomHeader.name
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
@@ -54,6 +55,7 @@ HRectangle {
id: roomTopic
text: topic
font.pixelSize: theme.fontSize.small
color: theme.chat.roomHeader.topic
elide: Text.ElideRight
verticalAlignment: Text.AlignVCenter
@@ -78,6 +80,7 @@ HRectangle {
"members", "files", "notifications", "history", "settings"
]
HUIButton {
backgroundColor: theme.chat.selectViewBar.background
iconName: "room-view-" + modelData
iconDimension: 22
autoExclusive: true
@@ -96,9 +99,13 @@ HRectangle {
HUIButton {
id: expandButton
z: 1
width: theme.controls.avatar.size
height: width
anchors.right: parent.right
opacity: collapseButtons ? 1 : 0
visible: opacity > 0
backgroundColor: theme.chat.selectViewBar.background
iconName: "reduced-room-buttons"
Behavior on opacity {

View File

@@ -7,6 +7,7 @@ import "../../Base"
HRectangle {
id: roomSidePane
color: theme.chat.roomSidePane.background
property bool collapsed: false
property var activeView: null

View File

@@ -6,7 +6,7 @@ import "../../Base"
HNoticePage {
text: model.date.toLocaleDateString()
color: theme.chat.daybreak.foreground
color: theme.chat.daybreak.text
backgroundColor: theme.chat.daybreak.background
radius: theme.chat.daybreak.radius
}