Commit c8722b5f authored by Black Hat's avatar Black Hat

Add dark theme.

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