tweak colors

This commit is contained in:
Michele Guerini Rocco 2022-09-30 17:14:24 +02:00
parent f3cea2f288
commit 9410670591
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
14 changed files with 34 additions and 32 deletions

View File

@ -25,7 +25,7 @@ AbstractButton {
background: Rectangle { background: Rectangle {
id: bg id: bg
color: palette.alternateBase color: palette.dark
radius: Settings.avatarCircles ? height / 2 : height / 8 radius: Settings.avatarCircles ? height / 2 : height / 8
} }

View File

@ -20,7 +20,7 @@ Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumHeight: 40 Layout.minimumHeight: 40
Layout.preferredHeight: row.implicitHeight Layout.preferredHeight: row.implicitHeight
color: palette.window color: palette.base
Component { Component {
id: placeCallDialog id: placeCallDialog

View File

@ -37,7 +37,7 @@ Page {
verticalPadding: 0 verticalPadding: 0
background: Rectangle { background: Rectangle {
color: palette.window color: palette.base
} }
contentItem: RowLayout { contentItem: RowLayout {
id: buttonRow id: buttonRow
@ -456,7 +456,7 @@ Page {
required property string directChatOtherUserId required property string directChatOtherUserId
required property bool hasLoudNotification required property bool hasLoudNotification
required property bool hasUnreadMessages required property bool hasUnreadMessages
property color importantText: palette.text property color importantText: palette.brightText
required property bool isDirect required property bool isDirect
required property bool isInvite required property bool isInvite
required property bool isSpace required property bool isSpace
@ -466,7 +466,7 @@ Page {
required property string roomName required property string roomName
required property var tags required property var tags
required property string time required property string time
property color unimportantText: palette.buttonText property color unimportantText: palette.text
ToolTip.delay: Nheko.tooltipDelay ToolTip.delay: Nheko.tooltipDelay
ToolTip.text: roomName ToolTip.text: roomName

View File

@ -33,7 +33,7 @@ Column {
id: dateBubble id: dateBubble
anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined
color: palette.text color: palette.brightText
height: Math.round(fontMetrics.height * 1.4) height: Math.round(fontMetrics.height * 1.4)
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: room ? room.formatDateSeparator(timestamp) : "" text: room ? room.formatDateSeparator(timestamp) : ""

View File

@ -97,7 +97,7 @@ Item {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
color: palette.base color: palette.window
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent

View File

@ -31,7 +31,7 @@ Pane {
z: 3 z: 3
background: Rectangle { background: Rectangle {
color: palette.window color: palette.base
} }
contentItem: Item { contentItem: Item {
GridLayout { GridLayout {
@ -86,7 +86,7 @@ Pane {
Layout.rowSpan: 2 Layout.rowSpan: 2
ToolTip.text: qsTr("Back to room list") ToolTip.text: qsTr("Back to room list")
ToolTip.visible: hovered ToolTip.visible: hovered
image: ":/icons/icons/ui/angle-arrow-left.svg" image: ":/icons/icons/ui/angle-arrow-left.svg?" + palette.light
visible: showBackButton visible: showBackButton
onClicked: Rooms.resetCurrentRoom() onClicked: Rooms.resetCurrentRoom()
@ -108,7 +108,7 @@ Pane {
Layout.column: 2 Layout.column: 2
Layout.fillWidth: true Layout.fillWidth: true
Layout.row: 1 Layout.row: 1
color: palette.text color: palette.brightText
elide: Text.ElideRight elide: Text.ElideRight
font.bold: true font.bold: true
font.pointSize: fontMetrics.font.pointSize * 1.1 font.pointSize: fontMetrics.font.pointSize * 1.1
@ -126,9 +126,9 @@ Pane {
clip: true clip: true
enabled: false enabled: false
// don't use the disabled color // don't use the disabled color
color: topBar.palette.text color: topBar.palette.brightText
selectByMouse: false selectByMouse: false
text: roomTopic text: "<style type=\"text/css\">a { font-weight: bold; color:" + topBar.palette.brightText + ";}</style>" + roomTopic
} }
ImageButton { ImageButton {
id: pinButton id: pinButton
@ -232,7 +232,7 @@ Pane {
Layout.rowSpan: 2 Layout.rowSpan: 2
ToolTip.text: qsTr("Room options") ToolTip.text: qsTr("Room options")
ToolTip.visible: hovered ToolTip.visible: hovered
image: ":/icons/icons/ui/options.svg" image: ":/icons/icons/ui/options.svg?" + palette.light
visible: !!room visible: !!room
onClicked: roomOptionsMenu.open(roomOptionsButton) onClicked: roomOptionsMenu.open(roomOptionsButton)

View File

@ -14,7 +14,7 @@ Item {
id: typingRect id: typingRect
anchors.fill: parent anchors.fill: parent
color: palette.base color: palette.dark
visible: (room && room.typingUsers.length > 0) visible: (room && room.typingUsers.length > 0)
z: 3 z: 3
@ -26,7 +26,7 @@ Item {
anchors.leftMargin: 10 anchors.leftMargin: 10
anchors.right: parent.right anchors.right: parent.right
anchors.rightMargin: 10 anchors.rightMargin: 10
color: palette.text color: palette.brightText
text: room ? room.formatTypingUsers(room.typingUsers, palette.base) : "" text: room ? room.formatTypingUsers(room.typingUsers, palette.base) : ""
textFormat: Text.RichText textFormat: Text.RichText
} }

View File

@ -30,7 +30,7 @@ Control {
Rectangle { Rectangle {
id: button id: button
color: palette.light color: palette.base
radius: 22 radius: 22
Layout.preferredHeight: 44 Layout.preferredHeight: 44
Layout.preferredWidth: 44 Layout.preferredWidth: 44
@ -44,7 +44,7 @@ Control {
sourceSize.width: 40 sourceSize.width: 40
anchors.centerIn: parent anchors.centerIn: parent
source: "qrc:/icons/icons/ui/download.svg" source: "qrc:/icons/icons/ui/download.svg?"+Nheko.colors.brightText
fillMode: Image.Pad fillMode: Image.Pad
} }
@ -71,7 +71,7 @@ Control {
text: evRoot.filename text: evRoot.filename
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: palette.text color: palette.brightText
} }
Text { Text {
@ -82,7 +82,7 @@ Control {
text: evRoot.filesize text: evRoot.filesize
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: palette.text color: palette.brightText
} }
} }
@ -90,7 +90,7 @@ Control {
} }
background: Rectangle { background: Rectangle {
color: palette.alternateBase color: palette.base
radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall radius: fontMetrics.lineSpacing / 2 + 2 * Nheko.paddingSmall
visible: !Settings.bubbles // the bubble in a bubble looks odd visible: !Settings.bubbles // the bubble in a bubble looks odd
} }

View File

@ -9,7 +9,7 @@ import im.nheko 1.0
TextMessage { TextMessage {
property bool isStateEvent property bool isStateEvent
font.italic: true font.italic: true
color: palette.buttonText color: palette.text
font.pointSize: isStateEvent? 0.8*Settings.fontSize : Settings.fontSize font.pointSize: isStateEvent? 0.8*Settings.fontSize : Settings.fontSize
horizontalAlignment: isStateEvent? Text.AlignHCenter : undefined horizontalAlignment: isStateEvent? Text.AlignHCenter : undefined
} }

View File

@ -7,14 +7,14 @@ import QtQuick.Controls 2.1
Label { Label {
property bool isStateEvent property bool isStateEvent
color: palette.text color: palette.brightText
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
height: Math.round(fontMetrics.height * 1.4) height: Math.round(fontMetrics.height * 1.4)
width: contentWidth * 1.2 width: contentWidth * 1.2
background: Rectangle { background: Rectangle {
radius: parent.height / 2 radius: parent.height / 2
color: palette.alternateBase color: palette.base
} }
} }

View File

@ -47,7 +47,7 @@ Item {
Rectangle { Rectangle {
id: videoContainer id: videoContainer
color: content.type == MtxEvent.VideoMessage ? palette.window : "transparent" color: content.type == MtxEvent.VideoMessage ? palette.dark : "transparent"
width: parent.width width: parent.width
height: parent.height - fileInfoLabel.height height: parent.height - fileInfoLabel.height
@ -98,8 +98,10 @@ Item {
anchors.top: videoContainer.bottom anchors.top: videoContainer.bottom
text: content.body + " [" + filesize + "]" text: content.body + " [" + filesize + "]"
textFormat: Text.RichText textFormat: Text.RichText
leftPadding: Nheko.paddingSmall * 2
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight elide: Text.ElideRight
color: palette.text color: palette.brightText
background: Rectangle { background: Rectangle {
color: palette.base color: palette.base

View File

@ -101,7 +101,7 @@ AbstractButton {
z: -1 z: -1
property color userColor: TimelineManager.userColor(r.userId, palette.base) property color userColor: TimelineManager.userColor(r.userId, palette.base)
property color bgColor: palette.base property color bgColor: palette.dark
color: Qt.tint(bgColor, Qt.hsla(userColor.hslHue, 0.5, userColor.hslLightness, 0.1)) color: Qt.tint(bgColor, Qt.hsla(userColor.hslHue, 0.5, userColor.hslLightness, 0.1))
} }

View File

@ -19,8 +19,8 @@ MatrixText {
// table border-collapse doesn't seem to work // table border-collapse doesn't seem to work
text: ` text: `
<style type="text/css"> <style type="text/css">
code { background-color: ` + palette.alternateBase + `; white-space: pre-wrap; } code { background-color: ` + palette.dark + `; white-space: pre-wrap; }
pre { background-color: ` + palette.alternateBase + `; white-space: pre-wrap; } pre { background-color: ` + palette.dark + `; white-space: pre-wrap; }
table { table {
border-width: 1px; border-width: 1px;
border-collapse: collapse; border-collapse: collapse;

View File

@ -50,7 +50,7 @@ Rectangle {
} }
color: { color: {
var wc = palette.alternateBase; var wc = palette.base;
return Qt.rgba(wc.r, wc.g, wc.b, 0.5); return Qt.rgba(wc.r, wc.g, wc.b, 0.5);
} }
opacity: control.shouldShowControls ? 1 : 0 opacity: control.shouldShowControls ? 1 : 0
@ -95,7 +95,7 @@ Rectangle {
id: playbackStateImage id: playbackStateImage
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
buttonTextColor: palette.text buttonTextColor: palette.brightText
Layout.preferredHeight: 24 Layout.preferredHeight: 24
Layout.preferredWidth: 24 Layout.preferredWidth: 24
image: { image: {
@ -115,7 +115,7 @@ Rectangle {
id: volumeButton id: volumeButton
Layout.alignment: Qt.AlignLeft Layout.alignment: Qt.AlignLeft
buttonTextColor: palette.text buttonTextColor: palette.brightText
Layout.preferredHeight: 24 Layout.preferredHeight: 24
Layout.preferredWidth: 24 Layout.preferredWidth: 24
image: { image: {
@ -204,7 +204,7 @@ Rectangle {
Label { Label {
Layout.alignment: Qt.AlignRight Layout.alignment: Qt.AlignRight
text: (!control.mediaLoaded ? "-- " : durationToString(control.positionValue)) + " / " + durationToString(control.duration) text: (!control.mediaLoaded ? "-- " : durationToString(control.positionValue)) + " / " + durationToString(control.duration)
color: palette.text color: palette.brightText
} }
} }