emojier: Improve resizing performance
AbandonedPublic

Authored by apol on Feb 12 2020, 2:14 PM.

Details

Reviewers
None
Group Reviewers
Plasma
Summary

Don't calculate the most fitting size, adopt a reasonable size and go with it.

BUG: 417454

Test Plan

Played around with it

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22400
Build 22418: arc lint + arc unit
apol created this revision.Feb 12 2020, 2:14 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 12 2020, 2:14 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
apol requested review of this revision.Feb 12 2020, 2:14 PM
Zren added a subscriber: Zren.Feb 12 2020, 4:50 PM

FixedSize 25pt does help, but "2 glyph emojis" will overlap each other.


Rectangle {
    width: parent.contentWidth
    height: parent.contentHeight
    border.color: "#f00"
    anchors.centerIn: parent
    border.width: 1
    color: "transparent"
}
apol added a comment.Feb 12 2020, 5:18 PM

uh right, didn't see that. Actually, do you know what's up with those? we should just be showing them as 1 glyph...

Zren added a comment.Feb 12 2020, 5:38 PM

Not sure. Backwards compatibility?

Firefox renders a couple of them fine, while the TaskManager widget doesn't. Could it be the "Noto" font? The facepalm ones not working are 3 glyphs merged together (facepalm+skincolor+sex). It's rendering (facepalm+skincolor) fine though.

There are some glyphs that don't render in firefox either. They don't have a Google (who works on Noto) emoji.

So we'll need to account for double glyphs.

What's the status of this? Is it ready?

apol added a comment.Feb 16 2020, 12:51 AM

What's the status of this? Is it ready?

No, it's not.

@Zren
Another thing we could do is taking such multiglyph renders as a bug on the font. We can clip them so they don't overlap each other. In the end, it's not like seeing them resized is pleasing to the eye either...

Zren added a comment.Feb 16 2020, 1:10 AM

As in clip: true?

delegate: MouseArea {
    width: emojiView.cellWidth
    height: emojiView.cellHeight
    clip: true

    Rectangle { border.color: "#ff0"; anchors.fill: parent; border.width: 1; color: "transparent" }

    QQC2.Label {
        font.pointSize: -1
        font.pixelSize: Math.floor(emojiView.desiredSize / 2)

        Rectangle {
            width: parent.contentWidth
            height: parent.contentHeight
            border.color: "#f00"
            anchors.centerIn: parent
            border.width: 1
            color: "transparent"
        }
    }
}