Remove more old MPalette stuff

This commit is contained in:
Carl Schwan
2020-11-17 11:21:56 +01:00
parent d9218b203d
commit 8e52f645a2
7 changed files with 18 additions and 104 deletions

View File

@@ -12,7 +12,6 @@ import NeoChat.Component 1.0
import NeoChat.Component.Emoji 1.0
import NeoChat.Dialog 1.0
import NeoChat.Effect 1.0
import NeoChat.Setting 1.0
import org.kde.neochat 1.0
@@ -121,7 +120,7 @@ ToolBar {
background: Rectangle {
visible: !isEmoji
color: highlighted ? border.color : "transparent"
border.color: isEmoji ? MPalette.accent : modelData.color
border.color: isEmoji ? Kirigami.Theme.focusColor : modelData.color
border.width: 2
radius: height / 2
}

View File

@@ -23,8 +23,8 @@ RowLayout {
readonly property bool darkBackground: !sentByMe
readonly property bool replyVisible: reply ?? false
readonly property bool failed: marks == EventStatus.SendingFailed
readonly property color authorColor: eventType == "notice" ? MPalette.primary : author.color
readonly property color replyAuthorColor: replyVisible ? reply.author.color : MPalette.accent
readonly property color authorColor: eventType == "notice" ? Kirigami.Theme.activeTextColor : author.color
readonly property color replyAuthorColor: replyVisible ? reply.author.color : Kirigami.Theme.focusColor
property alias mouseArea: controlContainer.children

View File

@@ -138,9 +138,7 @@ Kirigami.OverlaySheet {
Label {
text: modelData
font.pixelSize: 12
color: MPalette.lighter
color: Kirigami.Theme.disabledColor
}
ToolButton {

View File

@@ -6,6 +6,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import org.kde.kirigami 2.0 as Kirigami
import NeoChat.Component 1.0
import NeoChat.Effect 1.0
@@ -100,13 +101,11 @@ Dialog {
spacing: 0
Label {
Kirigami.Heading {
Layout.fillWidth: true
Layout.fillHeight: true
text: name
color: MPalette.foreground
font.pixelSize: 13
textFormat: Text.PlainText
elide: Text.ElideRight
wrapMode: Text.NoWrap
@@ -117,53 +116,32 @@ Dialog {
Layout.fillHeight: true
text: userID
color: MPalette.lighter
font.pixelSize: 10
color: Kirigami.Theme.disabledColor
textFormat: Text.PlainText
elide: Text.ElideRight
wrapMode: Text.NoWrap
}
}
Control {
Button {
Layout.preferredWidth: 32
Layout.preferredHeight: 32
visible: directChats != null
contentItem: MaterialIcon {
icon: "\ue89e"
color: MPalette.lighter
font.pixelSize: 20
}
background: RippleEffect {
circular: true
onClicked: {
roomListForm.joinRoom(connection.room(directChats[0]))
root.close()
}
icon.name: "document-send"
onClicked: {
roomListForm.joinRoom(connection.room(directChats[0]))
root.close()
}
}
Control {
Layout.preferredWidth: 32
Layout.preferredHeight: 32
Button {
icon.name: "irc-join-channel"
contentItem: MaterialIcon {
icon: "\ue7f0"
color: MPalette.lighter
font.pixelSize: 20
}
background: RippleEffect {
circular: true
onClicked: {
Controller.createDirectChat(connection, userID)
root.close()
}
onClicked: {
Controller.createDirectChat(connection, userID)
root.close()
}
}
}
@@ -177,7 +155,6 @@ Dialog {
visible: userDictListView.count < 1
text: i18n("No users available")
color: MPalette.foreground
}
}
}

View File

@@ -1,60 +0,0 @@
/**
* SPDX-FileCopyrightText: 2018-2019 Black Hat <bhat@encom.eu.org>
*
* SPDX-License-Identifier: GPL-3.0-only
*/
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQuick.Controls.Material 2.12
import org.kde.neochat 1.0
import NeoChat.Effect 1.0
import NeoChat.Component 1.0
import NeoChat.Setting 1.0
Control {
signal clicked()
id: header
background: Rectangle {
color: MPalette.background
layer.enabled: true
layer.effect: ElevationEffect {
elevation: 2
}
}
RowLayout {
anchors.fill: parent
anchors.leftMargin: 18
Layout.alignment: Qt.AlignVCenter
spacing: 12
Label {
Layout.fillWidth: true
text: currentRoom ? currentRoom.displayName : ""
color: MPalette.foreground
font.pixelSize: 18
elide: Text.ElideRight
wrapMode: Text.NoWrap
}
ToolButton {
Layout.preferredWidth: height
Layout.fillHeight: true
contentItem: MaterialIcon {
icon: "\ue5d4"
color: MPalette.lighter
}
onClicked: header.clicked()
}
}
}

View File

@@ -38,7 +38,6 @@
<file>imports/NeoChat/Setting/Palette.qml</file>
<file>imports/NeoChat/Panel/qmldir</file>
<file>imports/NeoChat/Panel/RoomDrawer.qml</file>
<file>imports/NeoChat/Panel/RoomHeader.qml</file>
<file>imports/NeoChat/Effect/RippleEffect.qml</file>
<file>imports/NeoChat/Effect/CircleMask.qml</file>
<file>imports/NeoChat/Effect/ElevationEffect.qml</file>

View File

@@ -47,6 +47,7 @@ if(ANDROID)
"go-up"
"go-down"
"list-add"
"irc-join-channel"
)
else()
target_link_libraries(neochat PRIVATE Qt5::Widgets ${QTKEYCHAIN_LIBRARIES})