Make emoji picker follow theme

This commit is contained in:
Nicolas Werner 2021-07-03 22:45:36 +02:00
parent 683a24d2aa
commit f6f5d2615a
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
5 changed files with 243 additions and 220 deletions

View File

@ -24,7 +24,6 @@ Rectangle {
id: communityListC
visible: Settings.groupView
minimumWidth: communitiesList.avatarSize * 4 + Nheko.paddingMedium * 2
collapsedWidth: communitiesList.avatarSize + 2 * Nheko.paddingMedium
preferredWidth: Settings.communityListWidth >= minimumWidth ? Settings.communityListWidth : collapsedWidth

View File

@ -154,6 +154,7 @@ Item {
NoticeMessage {
text: qsTr("%1 changed the room avatar").arg(model.data.userName)
}
}
DelegateChoice {

View File

@ -59,8 +59,8 @@ Item {
MessageDelegate {
id: reply
enabled: false
enabled: false
width: parent.width
isReply: true
}

View File

@ -35,8 +35,14 @@ Menu {
modal: true
focus: true
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
//height: columnView.implicitHeight + 4
//width: columnView.implicitWidth
width: 7 * 52 + 20
Rectangle {
color: Nheko.colors.window
height: columnView.implicitHeight + 4
width: columnView.implicitWidth
width: 7 * 52 + 20
ColumnLayout {
id: columnView
@ -53,9 +59,12 @@ Menu {
TextField {
id: emojiSearch
//width: gridView.width - 6
Layout.topMargin: 3
Layout.preferredWidth: 7 * 52 + 20 - 6
palette: Nheko.colors
background: null
placeholderTextColor: Nheko.colors.buttonText
color: Nheko.colors.text
placeholderText: qsTr("Search")
selectByMouse: true
rightPadding: clearSearch.width
@ -83,6 +92,8 @@ Menu {
icon.source: "image://colorimage/:/icons/icons/ui/round-remove-button.png?" + (clearSearch.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
focusPolicy: Qt.NoFocus
onClicked: emojiSearch.clear()
hoverEnabled: true
background: null
anchors {
verticalCenter: parent.verticalCenter
@ -90,7 +101,17 @@ Menu {
}
// clear the default hover effects.
background: Item {
Image {
height: parent.height - 2 * Nheko.paddingSmall
width: height
source: "image://colorimage/:/icons/icons/ui/round-remove-button.png?" + (clearSearch.hovered ? Nheko.colors.highlight : Nheko.colors.buttonText)
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
margins: Nheko.paddingSmall
}
}
}
@ -142,6 +163,7 @@ Menu {
font.family: Settings.emojiFont
font.pixelSize: 36
text: model.unicode
color: Nheko.colors.text
}
background: Rectangle {
@ -163,7 +185,7 @@ Menu {
visible: emojiSearch.text === ''
Layout.fillWidth: true
Layout.preferredHeight: 1
color: emojiPopup.Nheko.colors.alternateBase
color: emojiPopup.Nheko.theme.separator
}
// Category picker row
@ -284,3 +306,5 @@ Menu {
}
}
}

View File

@ -41,8 +41,7 @@ using webrtc::CallType;
using webrtc::State;
WebRTCSession::WebRTCSession()
: QObject()
, devices_(CallDevices::instance())
: devices_(CallDevices::instance())
{
qRegisterMetaType<webrtc::CallType>();
qmlRegisterUncreatableMetaObject(