Skip to content

Commit

Permalink
Use Quartz
Browse files Browse the repository at this point in the history
  • Loading branch information
vimpostor committed Nov 24, 2023
1 parent b5bdced commit 9ba1517
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 46 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ qt_add_executable(${PROJECT_NAME} ${SRCS} ${RESOURCES})
qt_add_qml_module(${PROJECT_NAME} URI "Backend" VERSION "${PROJECT_VERSION}" NO_RESOURCE_TARGET_PATH QML_FILES ${QMLS} SOURCES "src/Models/path_model.cpp")
set_target_properties(${PROJECT_NAME} PROPERTIES QT_QMLCACHEGEN_ARGUMENTS "--only-bytecode")

target_link_libraries(${PROJECT_NAME} PRIVATE ${LINK_LIBS})
include(FetchContent)
FetchContent_Declare(quartz GIT_REPOSITORY https://github.com/vimpostor/quartz.git GIT_TAG de7bd362133bd661448981325c1cf4efd387bc05)
FetchContent_MakeAvailable(quartz)

target_link_libraries(${PROJECT_NAME} PRIVATE ${LINK_LIBS} quartz quartzplugin)

# install
install(TARGETS ${PROJECT_NAME} RUNTIME)
Expand Down
14 changes: 1 addition & 13 deletions src/qml/Main.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Controls.Material
import Quartz

import Backend

Expand All @@ -24,22 +25,9 @@ ApplicationWindow {
onActivated: Qt.quit();
}
DropArea {
property int mouseX: 0
property int mouseY: 0
anchors.fill: parent
onDropped: (drop) => {
Backend.handle_dropped_urls(drop.urls);
}
onPositionChanged: (drag) => {
mouseX = drag.x;
mouseY = drag.y;
}
Wave {
anchors.fill: parent
size: parent.containsDrag && parent.drag.source === null ? 1.0 : 0.0
centreX: parent.mouseX
centreY: parent.mouseY
}
}
Welcome {
anchors { left: parent.left; right: parent.right; margins: 48; verticalCenter: parent.verticalCenter }
Expand Down
32 changes: 0 additions & 32 deletions src/qml/Wave.qml

This file was deleted.

0 comments on commit 9ba1517

Please sign in to comment.