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 bool circle: false
property int fontSize: HStyle.fontSize.normal property int fontSize: HStyle.fontSize.normal
property color backgroundColor: "lightgray" property color backgroundColor: HStyle.controls.button.background
property alias overlayOpacity: buttonBackgroundOverlay.opacity property alias overlayOpacity: buttonBackgroundOverlay.opacity
property bool loading: false property bool loading: false

View File

@ -2,6 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.2 import QtQuick.Controls 2.2
ScrollView { ScrollView {
property alias backgroundColor: textAreaBackground.color
property alias placeholderText: textArea.placeholderText property alias placeholderText: textArea.placeholderText
property alias text: textArea.text property alias text: textArea.text
property alias area: textArea property alias area: textArea
@ -18,7 +19,12 @@ ScrollView {
wrapMode: TextEdit.Wrap wrapMode: TextEdit.Wrap
font.family: HStyle.fontFamily.sans font.family: HStyle.fontFamily.sans
font.pixelSize: HStyle.fontSize.normal font.pixelSize: HStyle.fontSize.normal
color: HStyle.colors.foreground 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 string mono: "Hack"
} }
property int radius: 5
readonly property QtObject colors: QtObject { readonly property QtObject colors: QtObject {
property color background0: Qt.hsla(0, 0, 0.8, 0.5) property color background0: Qt.hsla(0, 0, 0.8, 0.5)
property color background1: Qt.hsla(0, 0, 0.8, 0.7) 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 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 { readonly property QtObject sidePane: QtObject {
property color background: colors.background1 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 { readonly property QtObject chat: QtObject {

View File

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

View File

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

View File

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