Commit c8722b5f authored by Black Hat's avatar Black Hat

Add dark theme.

parent 900eaf3c
package ui package matrix
import ( import (
"github.com/matrix-org/gomatrix" "github.com/matrix-org/gomatrix"
"github.com/therecipe/qt/core"
"time" "time"
) )
type Message struct { type Message struct {
core.QObject
eventID string eventID string
event *gomatrix.Event event *gomatrix.Event
authorID string authorID string
......
...@@ -82,7 +82,7 @@ Page { ...@@ -82,7 +82,7 @@ Page {
background: Rectangle { background: Rectangle {
implicitHeight: 48 implicitHeight: 48
color: "#eaeaea" color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
border.color: parent.activeFocus ? Material.accent : "transparent" border.color: parent.activeFocus ? Material.accent : "transparent"
border.width: 2 border.width: 2
} }
...@@ -102,7 +102,7 @@ Page { ...@@ -102,7 +102,7 @@ Page {
background: Rectangle { background: Rectangle {
implicitHeight: 48 implicitHeight: 48
color: "#eaeaea" color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
border.color: parent.activeFocus ? Material.accent : "transparent" border.color: parent.activeFocus ? Material.accent : "transparent"
border.width: 2 border.width: 2
} }
...@@ -123,7 +123,7 @@ Page { ...@@ -123,7 +123,7 @@ Page {
background: Rectangle { background: Rectangle {
implicitHeight: 48 implicitHeight: 48
color: "#eaeaea" color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
border.color: parent.activeFocus ? Material.accent : "transparent" border.color: parent.activeFocus ? Material.accent : "transparent"
border.width: 2 border.width: 2
} }
......
import QtQuick 2.10 import QtQuick 2.10
import QtQuick.Controls 2.3 import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.3
Item { Item {
property alias icon: iconText.text property alias icon: iconText.text
property var color: "white" property var color: Material.theme == Material.Light ? "black" : "white"
id: item id: item
......
...@@ -43,7 +43,7 @@ Item { ...@@ -43,7 +43,7 @@ Item {
width: mini ? 0 : parent.width - parent.height - parent.spacing width: mini ? 0 : parent.width - parent.height - parent.spacing
height: parent.height height: parent.height
Text { Label {
width: parent.width width: parent.width
text: { text: {
if (name != "") { if (name != "") {
...@@ -54,15 +54,14 @@ Item { ...@@ -54,15 +54,14 @@ Item {
} }
return id return id
} }
color: "#424242"
font.pointSize: 16 font.pointSize: 16
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.NoWrap wrapMode: Text.NoWrap
} }
Text {
Label {
width: parent.width width: parent.width
text: topic === "" ? "No topic yet." : topic text: topic === "" ? "No topic yet." : topic
color: "#424242"
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.NoWrap wrapMode: Text.NoWrap
} }
...@@ -115,6 +114,7 @@ Item { ...@@ -115,6 +114,7 @@ Item {
MaterialIcon { MaterialIcon {
icon: "\ue8b6" icon: "\ue8b6"
color: "white"
width: mini ? parent.width : parent.height width: mini ? parent.width : parent.height
height: parent.height height: parent.height
...@@ -157,13 +157,12 @@ Item { ...@@ -157,13 +157,12 @@ Item {
anchors.fill: parent anchors.fill: parent
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: "#eaeaea" color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
} }
Text { Label {
z: 10 z: 10
text: mini ? "Empty" : "Here? No, not here." text: mini ? "Empty" : "Here? No, not here."
color: "#424242"
anchors.centerIn: parent anchors.centerIn: parent
visible: listView.count === 0 visible: listView.count === 0
} }
......
...@@ -15,15 +15,13 @@ Item { ...@@ -15,15 +15,13 @@ Item {
background: Item { background: Item {
anchors.fill: parent anchors.fill: parent
visible: currentRoom == null visible: currentRoom == null
Rectangle { Pane {
anchors.fill: parent anchors.fill: parent
color: "white"
} }
Text { Label {
z: 10 z: 10
text: "Please choose a room." text: "Please choose a room."
color: "#424242"
anchors.centerIn: parent anchors.centerIn: parent
} }
} }
...@@ -42,7 +40,7 @@ Item { ...@@ -42,7 +40,7 @@ Item {
Layout.preferredHeight: 80 Layout.preferredHeight: 80
background: Rectangle { background: Rectangle {
color: "#eaeaea" color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
} }
RowLayout { RowLayout {
...@@ -59,18 +57,17 @@ Item { ...@@ -59,18 +57,17 @@ Item {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
Text { Label {
Layout.fillWidth: true Layout.fillWidth: true
text: currentRoom != null ? currentRoom.name : "" text: currentRoom != null ? currentRoom.name : ""
font.pointSize: 18 font.pointSize: 18
color: "#424242"
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.NoWrap wrapMode: Text.NoWrap
} }
Text {
Label {
Layout.fillWidth: true Layout.fillWidth: true
text: currentRoom != null ? currentRoom.topic : "" text: currentRoom != null ? currentRoom.topic : ""
color: "#424242"
elide: Text.ElideRight elide: Text.ElideRight
wrapMode: Text.NoWrap wrapMode: Text.NoWrap
} }
...@@ -142,7 +139,7 @@ Item { ...@@ -142,7 +139,7 @@ Item {
Layout.preferredWidth: height Layout.preferredWidth: height
Layout.fillHeight: true Layout.fillHeight: true
contentItem: MaterialIcon { icon: "\ue226"; color: "black" } contentItem: MaterialIcon { icon: "\ue226" }
} }
TextField { TextField {
...@@ -155,7 +152,7 @@ Item { ...@@ -155,7 +152,7 @@ Item {
selectByMouse: true selectByMouse: true
background: Rectangle { background: Rectangle {
color: "#eaeaea" color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
} }
} }
...@@ -163,10 +160,10 @@ Item { ...@@ -163,10 +160,10 @@ Item {
Layout.preferredWidth: height Layout.preferredWidth: height
Layout.fillHeight: true Layout.fillHeight: true
contentItem: MaterialIcon { icon: "\ue24e"; color: "black" } contentItem: MaterialIcon { icon: "\ue24e" }
background: Rectangle { background: Rectangle {
color: "#eaeaea" color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
} }
} }
} }
......
...@@ -132,13 +132,13 @@ ApplicationWindow { ...@@ -132,13 +132,13 @@ ApplicationWindow {
} }
SideNavButton { SideNavButton {
contentItem: MaterialIcon { icon: "\ue8b8" } contentItem: MaterialIcon { icon: "\ue8b8"; color: "white" }
onClicked: matriqueController.logout() onClicked: matriqueController.logout()
} }
SideNavButton { SideNavButton {
contentItem: MaterialIcon { icon: "\ue879" } contentItem: MaterialIcon { icon: "\ue879"; color: "white" }
onClicked: Qt.quit() onClicked: Qt.quit()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment