mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Make emoji picker follow theme
This commit is contained in:
parent
683a24d2aa
commit
f6f5d2615a
5 changed files with 243 additions and 220 deletions
|
@ -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
|
||||
|
|
|
@ -154,6 +154,7 @@ Item {
|
|||
NoticeMessage {
|
||||
text: qsTr("%1 changed the room avatar").arg(model.data.userName)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DelegateChoice {
|
||||
|
|
|
@ -59,8 +59,8 @@ Item {
|
|||
|
||||
MessageDelegate {
|
||||
id: reply
|
||||
enabled: false
|
||||
|
||||
enabled: false
|
||||
width: parent.width
|
||||
isReply: true
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -283,4 +305,6 @@ Menu {
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,8 +41,7 @@ using webrtc::CallType;
|
|||
using webrtc::State;
|
||||
|
||||
WebRTCSession::WebRTCSession()
|
||||
: QObject()
|
||||
, devices_(CallDevices::instance())
|
||||
: devices_(CallDevices::instance())
|
||||
{
|
||||
qRegisterMetaType<webrtc::CallType>();
|
||||
qmlRegisterUncreatableMetaObject(
|
||||
|
|
Loading…
Reference in a new issue