Colors for controls and PaneToolBar

This commit is contained in:
miruka 2019-04-28 15:13:18 -04:00
parent b8901dfc5b
commit 89fcfbea82
6 changed files with 43 additions and 3 deletions

View File

@ -8,7 +8,7 @@ Button {
property bool circle: false
property int fontSize: HStyle.fontSize.normal
property color backgroundColor: "lightgray"
property color backgroundColor: HStyle.controls.button.background
property alias overlayOpacity: buttonBackgroundOverlay.opacity
property bool loading: false

View File

@ -2,6 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.2
ScrollView {
property alias backgroundColor: textAreaBackground.color
property alias placeholderText: textArea.placeholderText
property alias text: textArea.text
property alias area: textArea
@ -18,7 +19,12 @@ ScrollView {
wrapMode: TextEdit.Wrap
font.family: HStyle.fontFamily.sans
font.pixelSize: HStyle.fontSize.normal
color: HStyle.colors.foreground
background: Rectangle {
id: textAreaBackground
color: HStyle.controls.textArea.background
}
}
}

View File

@ -20,6 +20,8 @@ QtObject {
property string mono: "Hack"
}
property int radius: 5
readonly property QtObject colors: QtObject {
property color background0: Qt.hsla(0, 0, 0.8, 0.5)
property color background1: Qt.hsla(0, 0, 0.8, 0.7)
@ -28,10 +30,30 @@ QtObject {
property color foregroundError: Qt.hsla(0.95, 0.64, 0.32, 1)
}
property int radius: 5
readonly property QtObject controls: QtObject {
readonly property QtObject button: QtObject {
property color background: colors.background1
}
readonly property QtObject textField: QtObject {
property color background: colors.background1
}
readonly property QtObject textArea: QtObject {
property color background: colors.background1
}
}
readonly property QtObject sidePane: QtObject {
property color background: colors.background1
readonly property QtObject settingsButton: QtObject {
property color background: colors.background1
}
readonly property QtObject filterRooms: QtObject {
property color background: colors.background1
}
}
readonly property QtObject chat: QtObject {

View File

@ -2,9 +2,16 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
TextField {
property alias backgroundColor: textFieldBackground.color
font.family: HStyle.fontFamily.sans
font.pixelSize: HStyle.fontSize.normal
color: HStyle.colors.foreground
background: Rectangle {
id: textFieldBackground
color: HStyle.controls.textField.background
}
selectByMouse: true
}

View File

@ -29,6 +29,7 @@ Base.HGlassRectangle {
id: textArea
placeholderText: qsTr("Type a message...")
backgroundColor: "transparent"
area.focus: true
function setTyping(typing) {

View File

@ -9,11 +9,15 @@ Base.HRowLayout {
Layout.fillWidth: true
Layout.preferredHeight: 32
Base.HButton { iconName: "settings" }
Base.HButton {
iconName: "settings"
backgroundColor: Base.HStyle.sidePane.settingsButton.background
}
Base.HTextField {
id: filterField
placeholderText: qsTr("Filter rooms")
backgroundColor: Base.HStyle.sidePane.filterRooms.background
Layout.fillWidth: true
Layout.preferredHeight: 32