Partially changing a value type changes the whole value. In
image case, this means that the images can get re-loaded with
indeterminate size just to discard them after the size is
determined.
Fortunately this does not happen currently, because the sizes
are determined before the component is complete and QQuickImage
only loads if the component is complete.
However, due to the declarative nature of QML, bindings are
evaluated and assigned one by one, this means that source size
would be changed two times even if .width and .height are
pending re-evaluation at the same time (such as both depend on
DPR). At the same time, the order is also not defined, so
with such a setup as following:
sourceSize.width: width * eDPR
sourceSize.height: height * eDPR
When eDPR changes, Qt evaluates the binding for width or height,
adjusts sourceSize, sourceSize changes and change signal is signalled,
then evaluates the other sub-part of the value type (width or height),
adjusts sourceSize, sourceSize changes again and change signal is
signalled. Qt could technically optimize this, but as of Qt 6.8.1
it is not the case.
Meanwhile with the following:
sourceSize: Qt.size(width * eDPR, height * eDPR)
When eDPR changes, Qt evaluates the binding and adjusts the source
size, sourceSize changes and change signal is signalled. Source size
does not change two times, and the image would not be loaded two
times.
I18n module was intending to provide translation through vlc_gettext().
I'm not sure why QTranslator was not the way chosen before, because it
directly offers this and using qsTr() has the advantage of better integration.
Translation is handled in a lower abstraction level through QJSEngine
(see QJSEngine::TranslationExtension) as opposed to using custom a QML type
through QQmlEngine.
Thanks to that, the `org.videolan.vlc` module import can be eliminated
in some files.
Wrap the playlist, playlist items and media (input items) into C++ classes, for
convenience and automatic memory management.
Use them to implement a list model to be used by a Qt list view.
The playlist model provides information about the play queue the playlist
controler allows to manipulate the playback (play, pause, next, ...).
Co-authored-by: Pierre Lamot <pierre@videolabs.io>
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
This orders existing files into a new directory structure, to
group related elements together. The Xcode project is adapted
as well and reflects the same structure under macosx.
All includes include the subfolders now and are reordered and
cleaned up. Existing structure and alphabetic ordering shall be
kept.
This is a class for macOS versions lower than 10.10, where some image
buttons on dark backgrounds (or other colored backgrounds) would draw in
a dark color (usually black, for template images).
With this class, a tint color can be set for these buttons, it defaults
to white. This class is only intended to be used with template images.
The fullscreen window can have a new size if the fullscreen monitor
was switched or the user used split screen in between.
Center FS panel in those cases. Also constrain size as the new
available space might be smaller.
Limit dragging / moving of fullscreen panel to video content area.
This forbids dragging the fspanel outside of fullscreen. Also make
sure that the fs panel stays inside the video view if dragged, in
case the video view is smaller then the complete screen (this can
happen with macOS split screen feature).