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

View File

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

View File

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

View File

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

View File

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