Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
0d4ddadb
Verified
Commit
0d4ddadb
authored
3 years ago
by
Nicolas Werner
Browse files
Options
Downloads
Patches
Plain Diff
Fix emoji picker appearing in wrong locations
parent
e46ddbbb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#914
passed
3 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/qml/MessageView.qml
+0
-1
0 additions, 1 deletion
resources/qml/MessageView.qml
resources/qml/TimelineView.qml
+5
-6
5 additions, 6 deletions
resources/qml/TimelineView.qml
resources/qml/emoji/EmojiPicker.qml
+12
-15
12 additions, 15 deletions
resources/qml/emoji/EmojiPicker.qml
with
17 additions
and
22 deletions
resources/qml/MessageView.qml
+
0
−
1
View file @
0d4ddadb
...
...
@@ -12,7 +12,6 @@ import QtQuick.Window 2.2
import
im
.
nheko
1.0
ScrollView
{
contentWidth
:
availableWidth
clip
:
false
palette
:
colors
padding
:
8
...
...
This diff is collapsed.
Click to expand it.
resources/qml/TimelineView.qml
+
5
−
6
View file @
0d4ddadb
...
...
@@ -35,8 +35,6 @@ Page {
EmojiPicker
{
id
:
emojiPopup
width
:
7
*
52
+
20
height
:
6
*
52
colors
:
palette
model
:
EmojiProxyModel
{
...
...
@@ -96,22 +94,23 @@ Page {
property
string
eventId
property
int
eventType
property
bool
isEncrypted
property
bool
isEditable
property
bool
isEditable
function
show
(
eventId_
,
eventType_
,
isEncrypted_
,
isEditable_
,
showAt_
)
{
eventId
=
eventId_
;
eventType
=
eventType_
;
isEncrypted
=
isEncrypted_
;
isEditable
=
isEditable_
;
isEditable
=
isEditable_
;
if
(
showAt_
)
open
(
showAt_
);
else
open
();
}
Platform.MenuItem
{
Platform.MenuItem
{
id
:
reactionOption
text
:
qsTr
(
"
React
"
)
onTriggered
:
emojiPopup
.
show
(
messageContextMenu
.
parent
,
function
(
emoji
)
{
onTriggered
:
emojiPopup
.
show
(
null
,
function
(
emoji
)
{
TimelineManager
.
queueReactionMessage
(
messageContextMenu
.
eventId
,
emoji
);
})
}
...
...
This diff is collapsed.
Click to expand it.
resources/qml/emoji/EmojiPicker.qml
+
12
−
15
View file @
0d4ddadb
...
...
@@ -10,7 +10,7 @@ import QtQuick.Layouts 1.3
import
im
.
nheko
1.0
import
im
.
nheko
.
EmojiModel
1.0
Popup
{
Menu
{
id
:
emojiPopup
property
var
callback
...
...
@@ -24,13 +24,8 @@ Popup {
function
show
(
showAt
,
callback
)
{
console
.
debug
(
"
Showing emojiPicker
"
);
if
(
showAt
)
{
parent
=
showAt
;
x
=
Math
.
round
((
showAt
.
width
-
width
)
/
2
);
y
=
showAt
.
height
;
}
emojiPopup
.
callback
=
callback
;
op
en
(
);
p
op
up
(
showAt
?
showAt
:
null
);
}
margins
:
0
...
...
@@ -41,23 +36,25 @@ Popup {
focus
:
true
closePolicy
:
Popup
.
CloseOnEscape
|
Popup
.
CloseOnPressOutside
height
:
columnView
.
implicitHeight
+
4
ColumnLayout
{
id
:
columnView
anchors.fill
:
parent
spacing
:
0
Layout.bottomMargin
:
0
Layout.leftMargin
:
3
Layout.rightMargin
:
3
Layout.topMargin
:
2
anchors.leftMargin
:
3
anchors.rightMargin
:
3
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.topMargin
:
2
// emoji grid
GridView
{
id
:
gridView
Layout.preferredHeight
:
emojiPopup
.
height
Layout.fillWidth
:
true
Layout.fillHeight
:
true
Layout.preferredHeight
:
cellHeight
*
5
Layout.preferredWidth
:
7
*
52
+
20
Layout.leftMargin
:
4
cellWidth
:
52
cellHeight
:
52
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment