Commit graph

11 commits

Author SHA1 Message Date
John Gibbon
d35419d656 press effect for more items
there are still a few areas where there's no press effect (message items themselves: Text, profile thumbnail, sent icon,…)
but for now I've just aligned the components to the image changes
2020-12-04 22:47:03 +01:00
John Gibbon
1e877dec22 extend #224 to LocationPreview and VideoPreview 2020-12-04 20:22:21 +01:00
Sebastian Wolf
541036d796 Display extra content in message overlay 2020-11-18 14:59:51 +01:00
John Gibbon
fdb8cc5852 replace variant with var
https://doc.qt.io/archives/qt-5.6/qtquick-performance.html
In general, "property var" should be considered to be superior to "property variant" for every use-case from QtQuick 2.0 and newer (note that "property variant" is marked as obsolete), as it allows a true JavaScript reference to be stored (which can reduce the number of conversions required in certain expressions).
2020-11-05 23:23:37 +01:00
Sebastian Wolf
cccb48ced5
Merge pull request #119 from jgibbon/feature/qml-import-versions
clean up qml imports
2020-11-01 19:37:49 +01:00
John Gibbon
2cd4012b6a QtQuick 2.6 2020-10-31 20:49:03 +01:00
John Gibbon
1fa7192728 Reduce ChatPage.qml jit compile time
First of all: Take all measurements I mention with a grain of salt – all of them are rough and not necessarily measured more than a few times. All times were measured on an Xperia X run via SDK.

Visiting a chat page can take a long time, especially before the qml is cached by the engine.
When opening it for the first time after application launch, it sometimes takes >1000ms from onClicked (OverviewPage) to Component.OnCompleted (Chatpage).
Subsequent activations take roughly 470-480ms.

With these changes, I was able to reduce these times to ~450ms for the first, ~100ms for subsequent activations of the ChatPage on my test device.

Things changed:
- The components for displaying extra content to a message are (mostly) gone and replaced by a single Loader. This Loader does not use sourceComponent to trade the initial compilation boost for a neglegible bit of runtime penalty.
- Connections were consolidated
- I was surprised how costly the inclusion of the RemorseItem was (compiling ~75ms, initializing up to ~20ms for every delegate). So I traded a bit for a compromise. deleteMessageRemorseItem is now defined on the appWindow level, where it gets a bit mitigated by the animations at application start. Also, only one deletion at a time is now possible. We can easily revert this change, but I thought it worthwhile despite its drawbacks.
- profileThumbnailComponent is now defined directly as sourceComponent, removing the need for its id. Probably didn't do anything.
- InReplyToRow had width: parent.width, so I removed horizontalCenter. Also probably didn't change compilation time at all.
- Another compromise I was willing to take – your opinion may differ: The PickerPages took ages (~200ms) to just parse/compile inside those Components, so I replaced them with the "string notation" of pageStack.push. Drawback: The first time a picker gets activated, you'll see how slow it is. Subsequent activations aren't that bad – also for the other pickers.
2020-10-30 20:37:25 +01:00
John Gibbon
d38490fb09 use svg icons
Closes #102.

Doesn't use Shader/HighlightImage for background/placeholder, since that neither matched the previous look nor meet my visual expectations at all. I created both previously available color variations as svg accordingly.
Implementation of the background images has been outsourced to a dedicated qml file to reduce duplication and ensure the same layout. Padding is now "medium" everywhere (stickers had none, audio had "small").

For the Icons, some (Highlight-)Image+MouseArea combinations have been changed to IconButton.
Regarding videos, I'm not actually sure if the missing "highlight" on the fullscreen icon was intentional. An issue with videos possibly having the same color as the icon remains basically the same. Nonetheless, if this isn't desired, I'll revert to just using the white image.

The sticker icon actually does look a bit differently now – it's a bit smaller. I've redrawn it from scratch but mostly kept the dimensions of icon-m-other (which doesn't look good when zoomed in, btw). Perhaps I actually did made a mistake drawing the previous one. Either way, I think it fits well enough.

The notification icon remains png, but I managed to reduce its file size by ~60% without visibly impacting it much imho.

This may be the longest commit message I've ever written.
2020-10-26 15:15:53 +01:00
Sebastian J. Wolf
91ae3651ef Change license header to reflect number of contributions 2020-10-19 19:34:47 +02:00
John Gibbon
75ef6e70a4 update live locations 2020-09-29 15:50:21 +02:00
John Gibbon
b58e33b2a4 Handle display of messageLocation
resolves #36
2020-09-28 22:59:47 +02:00