Skip to content
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
88b5922
Rename qt to viewer, add third-party libraries and Remove support for…
CodeJhF Mar 17, 2025
e305f2b
Update the qt path corresponding to vs2019
CodeJhF Mar 17, 2025
adc2a45
Update the README.md of viewer
CodeJhF Mar 17, 2025
dfec660
Migrate qt build job to macOS environment
CodeJhF Mar 17, 2025
a0e9ebd
Fixed an issue that caused the qt job on the pipeline to run failed
CodeJhF Mar 17, 2025
7037bdf
Set the minimum Qt version required by libpag to 6.2.0
CodeJhF Mar 17, 2025
548e005
Set both the minimum Qt version required by libpag and the Qt version…
CodeJhF Mar 18, 2025
8c22e82
Implement the main window and basic playback controls of viewer
CodeJhF Mar 20, 2025
912bd40
Modify the size adjustment control of the viewer on Windows
CodeJhF Mar 20, 2025
7956726
Using qmlformat to do code-format on QML files
CodeJhF Mar 20, 2025
332275b
Upload the third-party library winspark to the 'vendor' directory
CodeJhF Mar 20, 2025
7484b72
Merge remote-tracking branch 'upstream/main' into build_viewer
CodeJhF Mar 20, 2025
1f1360d
Remove the build script of winsparkle
CodeJhF Mar 21, 2025
26620d6
Replace source code compilation with dynamic library integration for …
CodeJhF Mar 21, 2025
e7c8a96
disable rtti for viewer, modify some programming details
CodeJhF Mar 21, 2025
94ff965
Merge branch 'Tencent:main' into build_viewer
CodeJhF Mar 23, 2025
19a4aaf
Modify the method getPreferredSize() for viewer
CodeJhF Mar 24, 2025
2ee835b
Modify the loading method of the viewer's titleBar
CodeJhF Mar 24, 2025
e8a0daf
Fix the issue with the viewer's Windows resize handle
CodeJhF Mar 24, 2025
9fdf756
Merge branch 'build_viewer' of https://github.com/CodeJhF/libpag into…
CodeJhF Mar 24, 2025
ea34b5d
Fix a logic error in obtaining viewer's preferred size
CodeJhF Mar 25, 2025
5efe2ee
Merge branch 'Tencent:main' into build_viewer
CodeJhF Mar 25, 2025
d3c376d
Add menu bar for windows viewer
CodeJhF Mar 25, 2025
022c412
Add menu bar for macos viewer
CodeJhF Mar 25, 2025
23a2207
Implement the basic functions of the menu bar for viewer
CodeJhF Mar 26, 2025
8bb7f56
Fix some issue about the menu of viewer
CodeJhF Mar 26, 2025
8d32286
Codeformat the qml files of the viewer
CodeJhF Mar 26, 2025
959dcc6
Fix some issues found in code review
CodeJhF Mar 28, 2025
26e95e5
Fix some issues found in code review
CodeJhF Mar 31, 2025
ac2e73f
Add PAG export support in viewer: PNG sequence, single frame PNG and …
CodeJhF Apr 1, 2025
7545b46
Merge branch 'build_viewer' of https://github.com/CodeJhF/libpag into…
CodeJhF Apr 1, 2025
9000be2
Fixed viewer export function issues on Windows
CodeJhF Apr 1, 2025
b9a6ca5
Merge upstream to build_viewer
CodeJhF Apr 1, 2025
3afabc5
Release context when task is completed
CodeJhF Apr 1, 2025
363e548
Add license for viewer source files
CodeJhF Apr 1, 2025
b913045
Remove redundant comments in viewer
CodeJhF Apr 1, 2025
9e726dd
Viewer supports displaying file information and frame time metrics of…
CodeJhF Apr 2, 2025
41feb4c
Use smart pointers instead of raw pointers in viewer
CodeJhF Apr 3, 2025
42e68ea
Codeformat the code of viewer
CodeJhF Apr 3, 2025
2732f36
Codeformat the code of viewer
CodeJhF Apr 3, 2025
907b132
Fix the compilation errors of viewer
CodeJhF Apr 3, 2025
c313ad5
Fix some issues found in code review
CodeJhF Apr 8, 2025
e0095c3
Merge branch 'build_viewer' of https://github.com/CodeJhF/libpag into…
CodeJhF Apr 8, 2025
64ba351
Fix some issues found in code review
CodeJhF Apr 8, 2025
6a009a5
Merge branch 'build_viewer' of https://github.com/CodeJhF/libpag into…
CodeJhF Apr 8, 2025
2721ffa
CodeFormat the code of viewer
CodeJhF Apr 9, 2025
8be5a33
Merge remote-tracking branch 'upstream/main' into build_viewer
CodeJhF Apr 9, 2025
7f317c6
Remove file info display about encryption in viewer
CodeJhF Apr 14, 2025
074d379
Fix some issues found in code review
CodeJhF Apr 17, 2025
7b952db
Codeformat the code of viewer
CodeJhF Apr 17, 2025
ab98bb8
Use QString to safely pass int64_t to qml in viewer
CodeJhF Apr 17, 2025
479f97d
Unify the initialization method of class member variables in viewer
CodeJhF Apr 18, 2025
1a0c93a
Remove unnecessary empty judgments in viewer
CodeJhF Apr 18, 2025
b7884d8
Fix some issues found in code review
CodeJhF Apr 18, 2025
28664b6
Remove redundant access specifiers in viewer class
CodeJhF Apr 21, 2025
55f8b8d
Fix some issues found in code review
CodeJhF Apr 21, 2025
cb3d15e
Fix some issues found in code review
CodeJhF Apr 21, 2025
565d713
Fix some issues found in code review
CodeJhF Apr 21, 2025
09e579a
Fix some issues found in code review
CodeJhF Apr 21, 2025
795e2d5
Optimize the process of adjusting container capacity in viewer
CodeJhF Apr 23, 2025
343c918
Remove the 'PAG' prefix of some files in viewer
CodeJhF Apr 23, 2025
0a5c9dc
Remove the 'PAG' prefix of some files in viewer
CodeJhF Apr 23, 2025
b3c0e3b
Fix some issues found in code review
CodeJhF Apr 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ endif ()

if (PAG_USE_QT)
# need to set the CMAKE_PREFIX_PATH to local QT installation path, for example :
# set(CMAKE_PREFIX_PATH /Users/username/Qt5.13.0/5.13.0/clang_64/lib/cmake)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
# set(CMAKE_PREFIX_PATH /Users/username/Qt6.2.0/Qt6.2.0/clang_64/lib/cmake)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets OpenGL Quick)
list(APPEND PAG_SHARED_LIBS Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::OpenGL
Qt${QT_VERSION_MAJOR}::Quick)
Expand Down
2 changes: 1 addition & 1 deletion ohos/libpag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ versions, you can download the precompiled libraries from [here](https://github.
- NodeJS 14.14.0+
- Ninja 1.9.0+
- CMake 3.13.0+
- QT 5.13.0+
- QT 6.2.0+
- Emscripten 3.1.58+

### Dependency Management
Expand Down
42 changes: 36 additions & 6 deletions viewer/qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ PAGWindow {

property int windowTitleBarHeight: isWindows ? 32 : 22

property int minWindowHeightWithEditPanel: 650

Settings {
id: settings
property bool isEditPanelOpen: false
Expand Down Expand Up @@ -67,6 +69,9 @@ PAGWindow {
let preferredSize = pagView.preferredSize;
let width = Math.max(viewWindow.minimumWidth, preferredSize.width);
let height = Math.max(viewWindow.minimumHeight, preferredSize.height);
if (settings.isEditPanelOpen) {
width += mainForm.rightItem.width + mainForm.splitHandleWidth;
}
let x = Math.max(0, oldX - ((width - oldWidth) / 2));
let y = Math.max(50, oldY - ((height - oldHeight) / 2));
settings.lastX = x;
Expand Down Expand Up @@ -289,9 +294,7 @@ PAGWindow {
}

function updateProgress() {
let duration = mainForm.pagView.duration;
let displayedTime = duration * mainForm.pagView.progress;
mainForm.controlForm.timeDisplayedText.text = Utils.msToTime(displayedTime);
mainForm.controlForm.timeDisplayedText.text = mainForm.pagView.displayedTime;
mainForm.controlForm.currentFrameText.text = mainForm.pagView.currentFrame;
mainForm.controlForm.totalFrameText.text = mainForm.pagView.totalFrame;
}
Expand All @@ -312,7 +315,31 @@ PAGWindow {
if (mainForm.controlForm.panelsButton.checked !== willOpen) {
mainForm.controlForm.panelsButton.checked = willOpen;
}

if (willOpen) {
let widthChange = (mainForm.rightItem.width === 0) ? mainForm.minPanelWidth : mainForm.rightItem.width;
widthChange += mainForm.splitHandleWidth;
if (viewWindow.visibility === Window.FullScreen) {
mainForm.centerItem.width = viewWindow.width - widthChange;
} else {
viewWindow.width = viewWindow.width + widthChange;
}
mainForm.rightItem.width = widthChange;
if (viewWindow.height < minWindowHeightWithEditPanel) {
viewWindow.height = minWindowHeightWithEditPanel;
}
} else {
let widthChange = -1 * mainForm.rightItem.width;
if ((viewWindow.width + widthChange) < viewWindow.minimumWidth) {
viewWindow.width = viewWindow.minimumWidth;
} else {
viewWindow.width = viewWindow.width + widthChange;
}
mainForm.rightItem.width = 0;
}

settings.isEditPanelOpen = willOpen;
mainForm.isEditPanelOpen = willOpen;
}

function onCommand(command) {
Expand All @@ -325,14 +352,17 @@ PAGWindow {
} else {
openFileDialog.currentFolder = StandardPaths.writableLocation(StandardPaths.DocumentsLocation);
}
openFileDialog.accepted.disconnect();
if (openFileDialog.currentAcceptHandler) {
openFileDialog.accepted.disconnect(openFileDialog.currentAcceptHandler);
}
openFileDialog.fileMode = FileDialog.OpenFile;
openFileDialog.title = qsTr("Open PAG File");
openFileDialog.nameFilters = ["PAG files(*.pag)"];
openFileDialog.accepted.connect(function () {
openFileDialog.currentAcceptHandler = function () {
let filePath = openFileDialog.selectedFile;
mainForm.pagView.setFile(filePath);
});
};
openFileDialog.accepted.connect(openFileDialog.currentAcceptHandler);
openFileDialog.open();
break;
case "close-window":
Expand Down
39 changes: 39 additions & 0 deletions viewer/qml/MainForm.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ SplitView {

property int minPlayerWidth: 360

property int minPanelWidth: 300

property int splitHandleWidth: 0

property int splitHandleHeight: 0
Expand All @@ -26,6 +28,8 @@ SplitView {

property alias centerItem: centerItem

property alias rightItem: rightItem

property alias controlForm: controlForm
anchors.fill: parent
orientation: Qt.Horizontal
Expand Down Expand Up @@ -112,4 +116,39 @@ SplitView {
}
}
}

PAGRectangle {
id: rightItem
visible: isEditPanelOpen
SplitView.minimumWidth: minPanelWidth
SplitView.preferredWidth: minPanelWidth
color: "#16161d"
radius: 5
leftTopRadius: false
rightTopRadius: false
rightBottomRadius: false

PAGRectangle {
id: performance
color: "#16161D"
clip: true
anchors.top: parent.top
anchors.topMargin: 0
anchors.right: parent.right
anchors.rightMargin: 0
anchors.left: parent.left
anchors.leftMargin: 0
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
radius: 5
leftTopRadius: false
rightTopRadius: false
leftBottomRadius: false

Profiler {
id: profilerForm
anchors.fill: parent
}
}
}
}
Loading