summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authoradasauce <60991921+adasauce@users.noreply.github.com>2020-04-09 22:05:48 -0300
committerGitHub <noreply@github.com>2020-04-09 22:05:48 -0300
commit5f7f564e572110dc140a051aa51131ed504a67ab (patch)
treed4985d2954ff17c0410c66d1ba45eb7d863060e5 /resources
parentMerge pull request #160 from cloudrac3r/ubuntu-19.10-dependencies (diff)
parentAdd comment on why we surpress some of those log messages (diff)
downloadnheko-5f7f564e572110dc140a051aa51131ed504a67ab.tar.xz
Merge pull request #161 from Nheko-Reborn/palettes
Use palettes for most theming
Diffstat (limited to 'resources')
-rw-r--r--resources/qml/Avatar.qml7
-rw-r--r--resources/qml/TimelineRow.qml30
-rw-r--r--resources/qml/TimelineView.qml17
-rw-r--r--resources/qml/delegates/FileMessage.qml2
-rw-r--r--resources/qml/delegates/NoticeMessage.qml2
-rw-r--r--resources/qml/delegates/Pill.qml4
-rw-r--r--resources/qml/delegates/PlayableMediaMessage.qml2
-rw-r--r--resources/qtquickcontrols2.conf2
-rw-r--r--resources/res.qrc2
-rw-r--r--resources/styles/nheko-dark.qss16
-rw-r--r--resources/styles/nheko.qss10
-rw-r--r--resources/styles/system.qss14
12 files changed, 59 insertions, 49 deletions
diff --git a/resources/qml/Avatar.qml b/resources/qml/Avatar.qml

index 54875f9f..b1007469 100644 --- a/resources/qml/Avatar.qml +++ b/resources/qml/Avatar.qml
@@ -1,4 +1,5 @@ import QtQuick 2.6 +import QtQuick.Controls 2.3 import QtGraphicalEffects 1.0 Rectangle { @@ -10,15 +11,15 @@ Rectangle { property alias url: img.source property string displayName - Text { + Label { anchors.fill: parent text: chat.model.escapeEmoji(String.fromCodePoint(displayName.codePointAt(0))) textFormat: Text.RichText - color: colors.text font.pixelSize: avatar.height/2 verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter visible: img.status != Image.Ready + color: colors.brightText } Image { @@ -42,5 +43,5 @@ Rectangle { } } } - color: colors.base + color: colors.dark } diff --git a/resources/qml/TimelineRow.qml b/resources/qml/TimelineRow.qml
index a9ae5f5c..e13cde28 100644 --- a/resources/qml/TimelineRow.qml +++ b/resources/qml/TimelineRow.qml
@@ -54,6 +54,20 @@ MouseArea { } } + StatusIndicator { + state: model.state + Layout.alignment: Qt.AlignRight | Qt.AlignTop + Layout.preferredHeight: 16 + width: 16 + } + + EncryptionIndicator { + visible: model.isEncrypted + Layout.alignment: Qt.AlignRight | Qt.AlignTop + Layout.preferredHeight: 16 + width: 16 + } + ImageButton { visible: timelineSettings.buttons Layout.alignment: Qt.AlignRight | Qt.AlignTop @@ -87,21 +101,7 @@ MouseArea { } - StatusIndicator { - state: model.state - Layout.alignment: Qt.AlignRight | Qt.AlignTop - Layout.preferredHeight: 16 - width: 16 - } - - EncryptionIndicator { - visible: model.isEncrypted - Layout.alignment: Qt.AlignRight | Qt.AlignTop - Layout.preferredHeight: 16 - width: 16 - } - - Text { + Label { Layout.alignment: Qt.AlignRight | Qt.AlignTop text: model.timestamp.toLocaleTimeString("HH:mm") color: inactiveColors.text diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 5612b04c..5b051235 100644 --- a/resources/qml/TimelineView.qml +++ b/resources/qml/TimelineView.qml
@@ -9,12 +9,14 @@ import im.nheko 1.0 import "./delegates" -Item { +Page { property var colors: currentActivePalette property var systemInactive: SystemPalette { colorGroup: SystemPalette.Disabled } property var inactiveColors: currentInactivePalette ? currentInactivePalette : systemInactive property int avatarSize: 40 + palette: colors + Settings { id: settings category: "user" @@ -29,7 +31,6 @@ Item { Menu { id: messageContextMenu - palette: colors modal: true function show(eventId_, eventType_, showAt) { @@ -73,12 +74,11 @@ Item { anchors.fill: parent color: colors.window - Text { + Label { visible: !timelineManager.timeline && !timelineManager.isInitialSync anchors.centerIn: parent text: qsTr("No room open") font.pointSize: 24 - color: colors.windowText } BusyIndicator { @@ -206,14 +206,14 @@ Item { anchors.horizontalCenter: parent ? parent.horizontalCenter : undefined visible: section.includes(" ") text: chat.model.formatDateSeparator(modelData.timestamp) - color: colors.windowText + color: colors.brightText height: contentHeight * 1.2 width: contentWidth * 1.2 horizontalAlignment: Text.AlignHCenter background: Rectangle { radius: parent.height / 2 - color: colors.base + color: colors.dark } } Row { @@ -233,7 +233,7 @@ Item { } } - Text { + Label { id: userName text: chat.model.escapeEmoji(modelData.userName) color: timelineManager.userColor(modelData.userId, colors.window) @@ -268,7 +268,7 @@ Item { anchors.left: parent.left anchors.right: parent.right - Text { + Label { id: typingDisplay anchors.left: parent.left anchors.right: parent.right @@ -277,7 +277,6 @@ Item { text: chat.model ? chat.model.formatTypingUsers(chat.model.typingUsers, colors.window) : "" textFormat: Text.RichText - color: colors.windowText } Rectangle { diff --git a/resources/qml/delegates/FileMessage.qml b/resources/qml/delegates/FileMessage.qml
index 2fe0a490..9a5300bb 100644 --- a/resources/qml/delegates/FileMessage.qml +++ b/resources/qml/delegates/FileMessage.qml
@@ -3,7 +3,7 @@ import QtQuick.Layouts 1.2 Rectangle { radius: 10 - color: colors.base + color: colors.dark height: row.height + 24 width: parent ? parent.width : undefined diff --git a/resources/qml/delegates/NoticeMessage.qml b/resources/qml/delegates/NoticeMessage.qml
index 12664fb5..62ada6d1 100644 --- a/resources/qml/delegates/NoticeMessage.qml +++ b/resources/qml/delegates/NoticeMessage.qml
@@ -1,4 +1,4 @@ TextMessage { font.italic: true - color: inactiveColors.text + color: colors.buttonText } diff --git a/resources/qml/delegates/Pill.qml b/resources/qml/delegates/Pill.qml
index b19d9a54..27985b58 100644 --- a/resources/qml/delegates/Pill.qml +++ b/resources/qml/delegates/Pill.qml
@@ -2,13 +2,13 @@ import QtQuick 2.5 import QtQuick.Controls 2.1 Label { - color: inactiveColors.text + color: colors.brightText horizontalAlignment: Text.AlignHCenter height: contentHeight * 1.2 width: contentWidth * 1.2 background: Rectangle { radius: parent.height / 2 - color: colors.base + color: colors.dark } } diff --git a/resources/qml/delegates/PlayableMediaMessage.qml b/resources/qml/delegates/PlayableMediaMessage.qml
index a4096864..20177a04 100644 --- a/resources/qml/delegates/PlayableMediaMessage.qml +++ b/resources/qml/delegates/PlayableMediaMessage.qml
@@ -8,7 +8,7 @@ import im.nheko 1.0 Rectangle { id: bg radius: 10 - color: colors.base + color: colors.dark height: content.height + 24 width: parent ? parent.width : undefined diff --git a/resources/qtquickcontrols2.conf b/resources/qtquickcontrols2.conf new file mode 100644
index 00000000..d64f816e --- /dev/null +++ b/resources/qtquickcontrols2.conf
@@ -0,0 +1,2 @@ +[Controls] +FallbackStyle=Fusion diff --git a/resources/res.qrc b/resources/res.qrc
index 7080fdd6..c94f0f19 100644 --- a/resources/res.qrc +++ b/resources/res.qrc
@@ -109,6 +109,8 @@ <file>styles/nheko-dark.qss</file> </qresource> <qresource prefix="/"> + <file>qtquickcontrols2.conf</file> + <file>qml/TimelineView.qml</file> <file>qml/Avatar.qml</file> <file>qml/ImageButton.qml</file> diff --git a/resources/styles/nheko-dark.qss b/resources/styles/nheko-dark.qss
index c0d91f99..875a3828 100644 --- a/resources/styles/nheko-dark.qss +++ b/resources/styles/nheko-dark.qss
@@ -31,7 +31,6 @@ UserMentionsWidget > * { } QLineEdit, -QListWidget, WelcomePage, LoginPage, RegisterPage, @@ -160,7 +159,7 @@ CommunitiesListItem { qproperty-backgroundColor: #2d3139; qproperty-avatarBgColor: #202228; - qproperty-avatarFgColor: white; + qproperty-avatarFgColor: palette(window); } LoadingIndicator { @@ -177,14 +176,6 @@ UserInfoWidget { border-bottom: 1px solid #202228; } -#UserSettingScrollWidget > QComboBox { - color: #202228; -} - -#UserSettingScrollWidget > QComboBox { - color: #202228; -} - Avatar { qproperty-textColor: white; qproperty-backgroundColor: #2d3139; @@ -246,6 +237,11 @@ Toggle { qproperty-trackColor: rgb(240, 240, 240); } +QListWidget { + color: #caccd1; + background-color: #202228; +} + SnackBar { qproperty-textColor: #caccd1; qproperty-bgColor: #202228; diff --git a/resources/styles/nheko.qss b/resources/styles/nheko.qss
index 960809de..51e5d64e 100644 --- a/resources/styles/nheko.qss +++ b/resources/styles/nheko.qss
@@ -183,6 +183,8 @@ TopSection { WelcomePage, LoginPage, +QComboBox, +QPushButton, RegisterPage { background-color: white; color: #333; @@ -221,6 +223,14 @@ TextField { qproperty-labelColor: #333; } +QListWidget, +TextInputWidget, +QTextEdit, +QLineEdit { + background-color: white; + color: #333; +} + TextInputWidget { border: none; border-top: 1px solid #dcdcdc; diff --git a/resources/styles/system.qss b/resources/styles/system.qss
index 3ae3147a..dd2a90ef 100644 --- a/resources/styles/system.qss +++ b/resources/styles/system.qss
@@ -70,7 +70,7 @@ FileItem { } RaisedButton { - qproperty-foregroundColor: palette(buttonText); + qproperty-foregroundColor: palette(button-text); } TextField { @@ -95,18 +95,18 @@ UserMentionsWidget { qproperty-titleColor: palette(text); qproperty-subtitleColor: palette(text); - qproperty-highlightedTitleColor: palette(highlightedtext); - qproperty-highlightedSubtitleColor: palette(highlightedtext); + qproperty-highlightedTitleColor: palette(highlighted-text); + qproperty-highlightedSubtitleColor: palette(highlighted-text); qproperty-hoverTitleColor: palette(highlightedtext); qproperty-hoverSubtitleColor: palette(highlightedtext); - qproperty-btnColor: palette(button); - qproperty-btnTextColor: palette(buttonText); + qproperty-btnColor: palette(dark); + qproperty-btnTextColor: palette(bright-text); qproperty-timestampColor: palette(text); - qproperty-highlightedTimestampColor: palette(highlightedtext); - qproperty-hoverTimestampColor: palette(highlightedtext); + qproperty-highlightedTimestampColor: palette(highlighted-text); + qproperty-hoverTimestampColor: palette(highlighted-text); qproperty-bubbleBgColor: palette(base); qproperty-bubbleFgColor: palette(text);