Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Fix clipped messages #205

Closed
wants to merge 1 commit into from

Conversation

daneos
Copy link
Contributor

@daneos daneos commented Mar 2, 2019

  1. Explanation:

    • Force the message label's height to be more than its content height.
  2. Fixed issues:

  3. Testing environment:

    • Sailfish OS version: 3.0.1.14
    • Sailfish OS hardware: Xperia XA2 Plus

This is not an ideal solution because of two problems:

  • Sometimes message text overlaps with the timestamp despite padding
  • It generates many QML Label: Binding loop detected for property "height" messages, but I don't know if this is a serious problem

but at least the full message text should always be visible :)

@DylanVanAssche
Copy link
Owner

DylanVanAssche commented Mar 2, 2019

Well the first side effect is related to the second one.
QML gets into a loop when the height changes. According to StackOverflow, a Connections QML object should do the trick:
https://stackoverflow.com/questions/31670920/qt-quick-5-5-how-to-omit-binding-loop-detected-for-property-warning-qml

@daneos What do you think?

Nevertheless, great job!

@DylanVanAssche DylanVanAssche self-requested a review March 2, 2019 07:24
@DylanVanAssche DylanVanAssche added this to the V4.7 milestone Mar 2, 2019
@daneos
Copy link
Contributor Author

daneos commented Mar 3, 2019

I don't know what I'm doing wrong, but if I do anything other than setting the height directly, the messages still end up clipped (but the code setting the height is run, for sure, I have a debug message there).
What I tried:

  • onContentHeightChanged
  • onContentSizeChanged
  • onTextChanged
  • onHeightChanged
  • onPaintedHeightChanged
  • Connections object, which gives me just QML Connections: Cannot assign to non-existent property "..." for all of the above
  • Component.onCompleted
  • and a few other signals, that unfortunately aren't emitted in this case

I posted a question on StackOverflow, so maybe someone will know how to do that properly.

@daneos
Copy link
Contributor Author

daneos commented Mar 5, 2019

I noticed another problem with messages height, I recently received a really long message, and it seems there is some limit (may be related to screen height, I think). What's also interesting, I can't enter this conversation again, as the application just dies after loading messages. I was not able to reproduce it on the emulator, so I will try to debug this on the device, when I learn how to do it :)

@DylanVanAssche
Copy link
Owner

DylanVanAssche commented Mar 6, 2019 via email

@DylanVanAssche
Copy link
Owner

Hmmm the same fix is applied in #210 closing this one...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message text not always completely visible
2 participants