diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0b817b4..12fad62 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -16,8 +16,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-11.0] - qt_ver: [6.4.3] + os: [macos-10.15,macos-11.0] + qt_ver: [5.15.2] qt_arch: [clang_64] env: targetName: example @@ -34,8 +34,6 @@ jobs: with: version: ${{ matrix.qt_ver }} cached: 'false' - aqtversion: '==2.0.5' - modules: 'qtmultimedia qt5compat qtshadertools' - uses: actions/checkout@v2 with: fetch-depth: 1 @@ -51,7 +49,7 @@ jobs: # 上传artifacts - uses: actions/upload-artifact@v2 with: - name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}} + name: ${{ env.targetName }}_${{ matrix.os }}_${{matrix.qt_ver}}.zip path: bin/release/${{ env.targetName }}.app # tag 上传Release - name: uploadRelease diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index ee0cda0..8ce06b2 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -18,8 +18,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - qt_ver: [6.4.3] + os: [ubuntu-18.04,ubuntu-20.04] + qt_ver: [5.15.2] qt_arch: [gcc_64] env: targetName: example @@ -29,8 +29,6 @@ jobs: with: version: ${{ matrix.qt_ver }} cached: 'false' - aqtversion: '==2.0.5' - modules: 'qtmultimedia qt5compat qtshadertools' - name: ubuntu install GL library run: sudo apt-get install -y libglew-dev libglfw3-dev qml-module-qtquick-controls qml-module-qtquick-controls2 - uses: actions/checkout@v2 @@ -48,7 +46,7 @@ jobs: - name: package run: | # make sure Qt plugin finds QML sources so it can deploy the imported files - export QML_SOURCES_PATHS=src/.. + export QML_SOURCES_PATHS=src # 拷贝依赖 linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --create-desktop-file --icon-file=${targetName}.svg --executable=bin/release/${targetName} --appdir bin/release/ mv ${{ env.targetName }}-*.AppImage ${{ env.targetName }}.AppImage diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml new file mode 100644 index 0000000..1efbead --- /dev/null +++ b/.github/workflows/windows-mingw.yml @@ -0,0 +1,87 @@ +name: Windows MinGW +on: + push: + paths: + - '*.pro' + - 'src/**' + - '.github/workflows/windows-mingw.yml' + pull_request: + paths: + - '*.pro' + - 'src/**' + - '.github/workflows/windows-mingw.yml' +jobs: + build: + name: Build + runs-on: windows-2019 + strategy: + matrix: + include: + - qt_arch: win32_mingw81 + qt_ver: 5.15.2 + qt_tools: "tools_mingw,8.1.0-1-202004170606,qt.tools.win32_mingw810" + qt_tools_mingw_install: mingw810_32 + - qt_arch: win64_mingw81 + qt_ver: 5.15.2 + qt_tools: "tools_mingw,8.1.0-1-202004170606,qt.tools.win64_mingw810" + qt_tools_mingw_install: mingw810_64 + env: + targetName: example.exe + fileName: example + steps: + - name: Install Qt + uses: jurplel/install-qt-action@v2 + with: + version: ${{ matrix.qt_ver }} + aqtversion: '==2.0.5' + arch: ${{ matrix.qt_arch }} + tools: ${{ matrix.qt_tools }} + cached: 'false' + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + - name: Qt 5 environment configuration + if: ${{ startsWith( matrix.qt_ver, 5 ) }} + shell: pwsh + run: | + Write-Output "${{ env.Qt5_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + Write-Output "${{ env.Qt5_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Qt 6 environment configuration + if: ${{ startsWith( matrix.qt_ver, 6 ) }} + shell: pwsh + run: | + Write-Output "${{ env.Qt6_DIR }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + Write-Output "${{ env.Qt6_DIR }}/../../Tools/${{ matrix.qt_tools_mingw_install }}/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: where is qmake & where is mingw32-make + shell: pwsh + run: | + Get-Command -Name 'qmake' | Format-List + Get-Command -Name 'mingw32-make' | Format-List + - name: mingw-build + id: build + shell: cmd + run: | + qmake + mingw32-make + - name: package + id: package + env: + archiveName: ${{ env.fileName }}-${{ matrix.qt_ver }}-${{ matrix.qt_arch }} + shell: pwsh + run: | + & scripts\windows-mingw-publish.ps1 ${env:archiveName} ${env:targetName} + $name = ${env:archiveName} + echo "::set-output name=packageName::$name" + - uses: actions/upload-artifact@v2 + with: + name: ${{ steps.package.outputs.packageName }} + path: ${{ steps.package.outputs.packageName }} + - name: uploadRelease + if: startsWith(github.event.ref, 'refs/tags/') + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ steps.package.outputs.packageName }}.zip + asset_name: ${{ steps.package.outputs.packageName }}.zip + tag: ${{ github.ref }} + overwrite: true \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4a7f173..9f12c29 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,10 +22,14 @@ jobs: matrix: include: # 5.15.2 参考 https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/windows_x86/desktop/qt5_5152/ - - qt_ver: 6.4.3 + - qt_ver: 5.15.2 + qt_arch: win32_msvc2019 + msvc_arch: x86 + qt_arch_install: msvc2019 + - qt_ver: 5.15.2 qt_arch: win64_msvc2019_64 msvc_arch: x64 - qt_arch_install: msvc2019_64 + qt_arch_install: msvc2019_64 env: targetName: example.exe fileName: example @@ -38,10 +42,11 @@ jobs: with: # Version of Qt to install version: ${{ matrix.qt_ver }} + # Target platform for build + # target: ${{ matrix.qt_target }} arch: ${{ matrix.qt_arch }} cached: 'false' - aqtversion: '==2.0.5' - modules: 'qtmultimedia qt5compat qtshadertools' + aqtversion: '==2.0.5' # 拉取代码 - uses: actions/checkout@v2 with: diff --git a/aqtinstall.log b/aqtinstall.log deleted file mode 100644 index e532d1e..0000000 --- a/aqtinstall.log +++ /dev/null @@ -1,18 +0,0 @@ -2023-03-25 01:04:59,289 - aqt.metadata - DEBUG - metadata 11080 Connection to 'https://download.qt.io' failed. Retrying with fallback 'https://mirrors.ukfast.co.uk/sites/qt.io/'. -2023-03-25 01:05:02,429 - aqt.main - ERROR - installer 11080 Failure to connect to https://mirrors.ukfast.co.uk/sites/qt.io/online/qtsdkrepository/windows_x86/desktop/: SSLError -2023-03-25 01:05:33,705 - aqt.metadata - DEBUG - metadata 13956 Connection to 'https://download.qt.io' failed. Retrying with fallback 'https://ftp.jaist.ac.jp/pub/qtproject/'. -2023-03-25 01:05:36,873 - aqt.main - ERROR - installer 13956 Failure to connect to https://ftp.jaist.ac.jp/pub/qtproject/online/qtsdkrepository/windows_x86/desktop/: SSLError -2023-03-25 01:05:48,135 - aqt.metadata - DEBUG - metadata 9728 Connection to 'https://download.qt.io' failed. Retrying with fallback 'https://qtproject.mirror.liquidtelecom.com/'. -2023-03-25 01:05:51,310 - aqt.main - ERROR - installer 9728 Failure to connect to https://qtproject.mirror.liquidtelecom.com/online/qtsdkrepository/windows_x86/desktop/: SSLError -2023-03-25 01:06:43,418 - aqt.helper - DEBUG - helper 9868 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 01:06:46,616 - aqt.helper - DEBUG - helper 9868 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 01:06:49,736 - aqt.helper - DEBUG - helper 9868 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 01:06:52,865 - aqt.helper - DEBUG - helper 9868 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 01:06:55,983 - aqt.helper - DEBUG - helper 9868 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/windows_x86/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 11:21:00,130 - aqt.helper - DEBUG - helper 10992 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 11:21:03,218 - aqt.helper - DEBUG - helper 10992 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 11:21:06,359 - aqt.helper - DEBUG - helper 10992 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 11:21:09,498 - aqt.helper - DEBUG - helper 10992 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 11:21:13,403 - aqt.helper - DEBUG - helper 15548 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 11:21:16,530 - aqt.helper - DEBUG - helper 15548 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_643/Updates.xml.sha256 -2023-03-25 11:21:19,669 - aqt.helper - DEBUG - helper 15548 Attempt to download checksum at https://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_643/Updates.xml.sha256 diff --git a/example/App.qml b/example/App.qml index f474c03..fa690bb 100644 --- a/example/App.qml +++ b/example/App.qml @@ -1,10 +1,9 @@ -import QtQuick -import QtQuick.Window -import QtQuick.Controls -import QtQuick.Layouts -import Qt5Compat.GraphicalEffects -import QtMultimedia -import FluentUI +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 Window { id:app diff --git a/example/T_Awesome.qml b/example/T_Awesome.qml index c929543..e3e23fa 100644 --- a/example/T_Awesome.qml +++ b/example/T_Awesome.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 FluContentPage { diff --git a/example/T_Badge.qml b/example/T_Badge.qml index 9832ce2..ed80ad0 100644 --- a/example/T_Badge.qml +++ b/example/T_Badge.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_Buttons.qml b/example/T_Buttons.qml index 5dbfc57..8fd2093 100644 --- a/example/T_Buttons.qml +++ b/example/T_Buttons.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 FluScrollablePage{ title:"Buttons" diff --git a/example/T_CalendarPicker.qml b/example/T_CalendarPicker.qml index 4af8403..3b85806 100644 --- a/example/T_CalendarPicker.qml +++ b/example/T_CalendarPicker.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_Carousel.qml b/example/T_Carousel.qml index ffb2905..8358a4f 100644 --- a/example/T_Carousel.qml +++ b/example/T_Carousel.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_ColorPicker.qml b/example/T_ColorPicker.qml index b2378a8..6c3d736 100644 --- a/example/T_ColorPicker.qml +++ b/example/T_ColorPicker.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_DatePicker.qml b/example/T_DatePicker.qml index d25e98c..2e2db6b 100644 --- a/example/T_DatePicker.qml +++ b/example/T_DatePicker.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_Dialog.qml b/example/T_Dialog.qml index 7a54430..d28ad3f 100644 --- a/example/T_Dialog.qml +++ b/example/T_Dialog.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ title:"Dialog" diff --git a/example/T_Expander.qml b/example/T_Expander.qml index b694a49..4db8714 100644 --- a/example/T_Expander.qml +++ b/example/T_Expander.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ title:"Expander" diff --git a/example/T_InfoBar.qml b/example/T_InfoBar.qml index f6226d2..eb5c306 100644 --- a/example/T_InfoBar.qml +++ b/example/T_InfoBar.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ title:"InfoBar" diff --git a/example/T_MediaPlayer.qml b/example/T_MediaPlayer.qml index d7bd23e..3abe00c 100644 --- a/example/T_MediaPlayer.qml +++ b/example/T_MediaPlayer.qml @@ -1,9 +1,9 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import Qt5Compat.GraphicalEffects -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ @@ -21,7 +21,10 @@ FluScrollablePage{ } FluMediaPlayer{ - source:"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" + source:{ + console.debug("-------------->") + return "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" + } } } diff --git a/example/T_Menu.qml b/example/T_Menu.qml index 927f980..6da702a 100644 --- a/example/T_Menu.qml +++ b/example/T_Menu.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_MultiWindow.qml b/example/T_MultiWindow.qml index de5e2c3..f63f9d4 100644 --- a/example/T_MultiWindow.qml +++ b/example/T_MultiWindow.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_Progress.qml b/example/T_Progress.qml index 150bfd5..08d7cc9 100644 --- a/example/T_Progress.qml +++ b/example/T_Progress.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ title:"Progress" diff --git a/example/T_Rectangle.qml b/example/T_Rectangle.qml index 6f59c95..af9feb5 100644 --- a/example/T_Rectangle.qml +++ b/example/T_Rectangle.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 +import QtQuick.Window 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ title:"Rectangle" diff --git a/example/T_Slider.qml b/example/T_Slider.qml index 557c63d..05b5c71 100644 --- a/example/T_Slider.qml +++ b/example/T_Slider.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_TextBox.qml b/example/T_TextBox.qml index bd74d10..2b9cb1e 100644 --- a/example/T_TextBox.qml +++ b/example/T_TextBox.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_Theme.qml b/example/T_Theme.qml index c7f6232..aff8713 100644 --- a/example/T_Theme.qml +++ b/example/T_Theme.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_TimePicker.qml b/example/T_TimePicker.qml index aec1bbc..05a2684 100644 --- a/example/T_TimePicker.qml +++ b/example/T_TimePicker.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_ToggleSwitch.qml b/example/T_ToggleSwitch.qml index 9b8cbc4..b730336 100644 --- a/example/T_ToggleSwitch.qml +++ b/example/T_ToggleSwitch.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_Tooltip.qml b/example/T_Tooltip.qml index ebb526c..a0311db 100644 --- a/example/T_Tooltip.qml +++ b/example/T_Tooltip.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_TreeView.qml b/example/T_TreeView.qml index f75faad..d39f0c7 100644 --- a/example/T_TreeView.qml +++ b/example/T_TreeView.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 FluContentPage { diff --git a/example/T_Typography.qml b/example/T_Typography.qml index 5636a2c..d602fd1 100644 --- a/example/T_Typography.qml +++ b/example/T_Typography.qml @@ -1,17 +1,13 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 FluContentPage { title: "Typography" property int textSize: 13 - Component.onCompleted: { - slider.seek(31) - } - ScrollView{ clip: true width: parent.width @@ -72,7 +68,6 @@ FluContentPage { FluSlider{ - id:slider orientation:FluSlider.Vertical anchors{ right: parent.right @@ -83,6 +78,7 @@ FluContentPage { onValueChanged:{ textSize = value/100*16+8 } + value: 31 } } diff --git a/example/example.pro b/example/example.pro index da5a875..e06f4a6 100644 --- a/example/example.pro +++ b/example/example.pro @@ -1,5 +1,5 @@ -QT += quick quickcontrols2 concurrent network multimedia core5compat -CONFIG += c++17 +QT += quick concurrent network multimedia +CONFIG += c++11 DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT @@ -30,10 +30,18 @@ win32 { contains(QT_ARCH, i386) { COPYDLL = $$absolute_path($${_PRO_FILE_PWD_}/../third/Win_x86/*.dll) $$DESTDIR - QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, \\) + contains(QMAKE_CC, cl) { + QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, \\) + } else { + QMAKE_PRE_LINK += $$QMAKE_COPY $$COPYDLL + } } else { COPYDLL = $$absolute_path($${_PRO_FILE_PWD_}/../third/Win_x64/*.dll) $$DESTDIR - QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, \\) + contains(QMAKE_CC, cl) { + QMAKE_PRE_LINK += $$QMAKE_COPY $$replace(COPYDLL, /, \\) + } else { + QMAKE_PRE_LINK += $$QMAKE_COPY $$COPYDLL + } } } diff --git a/example/main.cpp b/example/main.cpp index 5fa46be..d020b00 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -3,7 +3,6 @@ #include #include #include -#include #include #include "ChatController.h" @@ -18,7 +17,8 @@ int main(int argc, char *argv[]) QCoreApplication::setOrganizationName("ZhuZiChu"); QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io"); QCoreApplication::setApplicationName("FluentUI"); - QQuickStyle::setStyle("Basic"); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); +// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; diff --git a/example/page/AboutPage.qml b/example/page/AboutPage.qml index 56586ed..9b23f2e 100644 --- a/example/page/AboutPage.qml +++ b/example/page/AboutPage.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import FluentUI 1.0 FluWindow { diff --git a/example/page/ChatPage.qml b/example/page/ChatPage.qml index c4c9613..5dc8925 100644 --- a/example/page/ChatPage.qml +++ b/example/page/ChatPage.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import FluentUI -import Controller +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 +import Controller 1.0 +import QtQuick.Dialogs 1.3 FluWindow { diff --git a/example/page/LoginPage.qml b/example/page/LoginPage.qml index 76e069c..15a7da4 100644 --- a/example/page/LoginPage.qml +++ b/example/page/LoginPage.qml @@ -1,7 +1,6 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import FluentUI 1.0 FluWindow { diff --git a/example/page/MainPage.qml b/example/page/MainPage.qml index 776afd9..ef249fc 100644 --- a/example/page/MainPage.qml +++ b/example/page/MainPage.qml @@ -1,9 +1,10 @@ -import QtQuick -import QtQuick.Window -import QtQuick.Controls -import QtQuick.Layouts +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtGraphicalEffects 1.15 -import FluentUI +import FluentUI 1.0 FluWindow { id:rootwindow diff --git a/scripts/windows-mingw-publish.ps1 b/scripts/windows-mingw-publish.ps1 new file mode 100644 index 0000000..170ff28 --- /dev/null +++ b/scripts/windows-mingw-publish.ps1 @@ -0,0 +1,35 @@ +[CmdletBinding()] +param ( + [string] $archiveName, [string] $targetName +) +# 外部环境变量包括: +# archiveName: ${{ matrix.qt_ver }}-${{ matrix.qt_arch }} + + +# archiveName: 5.15.2-win64_mingw81 + +$scriptDir = $PSScriptRoot +$currentDir = Get-Location +Write-Host "currentDir" $currentDir +Write-Host "scriptDir" $scriptDir + +function Main() { + + New-Item -ItemType Directory $archiveName + # 拷贝exe + Copy-Item bin\release\* $archiveName\ + # 拷贝依赖 + windeployqt --qmldir . --plugindir $archiveName\plugins --no-translations --compiler-runtime $archiveName\$targetName + # 删除不必要的文件 + $excludeList = @("*.qmlc", "*.ilk", "*.exp", "*.lib", "*.pdb") + Remove-Item -Path $archiveName -Include $excludeList -Recurse -Force + # 打包zip + Compress-Archive -Path $archiveName $archiveName'.zip' +} + +if ($null -eq $archiveName || $null -eq $targetName) { + Write-Host "args missing, archiveName is" $archiveName ", targetName is" $targetName + return +} +Main + diff --git a/src/FluentUI.pro b/src/FluentUI.pro index 06e1a29..109d6c8 100644 --- a/src/FluentUI.pro +++ b/src/FluentUI.pro @@ -1,5 +1,5 @@ -QT += qml quick svg -CONFIG += plugin c++17 +QT += qml quick svg multimedia network +CONFIG += plugin c++11 TEMPLATE = lib TARGET = FluentUI TARGET = $$qtLibraryTarget($$TARGET) diff --git a/src/FramelessView_win.cpp b/src/FramelessView_win.cpp index 55f0e3a..feaa7a3 100644 --- a/src/FramelessView_win.cpp +++ b/src/FramelessView_win.cpp @@ -4,8 +4,6 @@ #include #include #include -#pragma comment(lib, "User32.lib") -#include class FramelessViewPrivate { diff --git a/src/colorpicker/ColorPicker.qml b/src/colorpicker/ColorPicker.qml index 96dc336..b86308e 100644 --- a/src/colorpicker/ColorPicker.qml +++ b/src/colorpicker/ColorPicker.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 import "content" Rectangle { diff --git a/src/colorpicker/content/Checkerboard.qml b/src/colorpicker/content/Checkerboard.qml index 1062734..81f713a 100644 --- a/src/colorpicker/content/Checkerboard.qml +++ b/src/colorpicker/content/Checkerboard.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Grid { id: root property int cellSide: 5 diff --git a/src/colorpicker/content/ColorSlider.qml b/src/colorpicker/content/ColorSlider.qml index de43acd..c7262f1 100644 --- a/src/colorpicker/content/ColorSlider.qml +++ b/src/colorpicker/content/ColorSlider.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Item { property int cursorHeight: 7 diff --git a/src/colorpicker/content/NumberBox.qml b/src/colorpicker/content/NumberBox.qml index 82fc780..fc2205b 100644 --- a/src/colorpicker/content/NumberBox.qml +++ b/src/colorpicker/content/NumberBox.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Row { property alias caption: captionBox.text diff --git a/src/colorpicker/content/PanelBorder.qml b/src/colorpicker/content/PanelBorder.qml index 0031615..69dc4c5 100644 --- a/src/colorpicker/content/PanelBorder.qml +++ b/src/colorpicker/content/PanelBorder.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Rectangle { width : 40; height : 15; radius: 2 diff --git a/src/colorpicker/content/SBPicker.qml b/src/colorpicker/content/SBPicker.qml index 7ffcfbd..ab1b4c5 100644 --- a/src/colorpicker/content/SBPicker.qml +++ b/src/colorpicker/content/SBPicker.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Item { id: root @@ -50,12 +50,20 @@ Item { y: r function handleMouse(mouse) { if (mouse.buttons & Qt.LeftButton) { + pickerCursor.x = Math.max(0,Math.min(mouse.x - r,width-2*r)); pickerCursor.y = Math.max(0,Math.min(mouse.y - r,height-2*r)); + + +// pickerCursor.x = Math.max(-r,Math.min(mouse.x - r,width+r)); +// pickerCursor.y = Math.max(-r,Math.min(mouse.y - r,height+r)); + +// pickerCursor.x = Math.max(0, Math.min(width, mouse.x) - 2 * r); +// pickerCursor.y = Math.max(0, Math.min(height, mouse.y) - 2 * r); } } - onPositionChanged:(mouse)=> handleMouse(mouse) - onPressed:(mouse)=> handleMouse(mouse) + onPositionChanged: handleMouse(mouse) + onPressed: handleMouse(mouse) } } diff --git a/src/controls/FluAppBar.qml b/src/controls/FluAppBar.qml index 24acd5f..749e04d 100644 --- a/src/controls/FluAppBar.qml +++ b/src/controls/FluAppBar.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Window -import QtQuick.Layouts -import FluentUI +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Layouts 1.15 +import FluentUI 1.0 Rectangle{ @@ -15,10 +15,11 @@ Rectangle{ } visible: FluTheme.isFrameless height: visible ? 34 : 0 + width: { - if(root.parent) - return root.parent.width - return 200 + if(parent==null) + return 200 + return parent.width } z: 65535 clip: true diff --git a/src/controls/FluArea.qml b/src/controls/FluArea.qml index 1643221..4b4a066 100644 --- a/src/controls/FluArea.qml +++ b/src/controls/FluArea.qml @@ -1,5 +1,5 @@ -import QtQuick -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 Rectangle { radius: 4 diff --git a/src/controls/FluAutoSuggestBox.qml b/src/controls/FluAutoSuggestBox.qml index 1b0c532..e73ce6a 100644 --- a/src/controls/FluAutoSuggestBox.qml +++ b/src/controls/FluAutoSuggestBox.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 TextField{ diff --git a/src/controls/FluBadge.qml b/src/controls/FluBadge.qml index 7c7f821..c2581b3 100644 --- a/src/controls/FluBadge.qml +++ b/src/controls/FluBadge.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Rectangle{ diff --git a/src/controls/FluButton.qml b/src/controls/FluButton.qml index c1d0ec2..731f8fe 100644 --- a/src/controls/FluButton.qml +++ b/src/controls/FluButton.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Button { diff --git a/src/controls/FluCalendarPicker.qml b/src/controls/FluCalendarPicker.qml index 7e402eb..dd1d03a 100644 --- a/src/controls/FluCalendarPicker.qml +++ b/src/controls/FluCalendarPicker.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 Rectangle { diff --git a/src/controls/FluCalendarView.qml b/src/controls/FluCalendarView.qml index 1f00e77..d7b5129 100644 --- a/src/controls/FluCalendarView.qml +++ b/src/controls/FluCalendarView.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Item { diff --git a/src/controls/FluCarousel.qml b/src/controls/FluCarousel.qml index e60cd11..b691f56 100644 --- a/src/controls/FluCarousel.qml +++ b/src/controls/FluCarousel.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Item { diff --git a/src/controls/FluCheckBox.qml b/src/controls/FluCheckBox.qml index 94df408..4fef59e 100644 --- a/src/controls/FluCheckBox.qml +++ b/src/controls/FluCheckBox.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import FluentUI 1.0 Button { diff --git a/src/controls/FluColorPicker.qml b/src/controls/FluColorPicker.qml index 10f1abf..2cb2507 100644 --- a/src/controls/FluColorPicker.qml +++ b/src/controls/FluColorPicker.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 Button{ diff --git a/src/controls/FluColorView.qml b/src/controls/FluColorView.qml index 4be8860..d74059c 100644 --- a/src/controls/FluColorView.qml +++ b/src/controls/FluColorView.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 import "../colorpicker" Item { diff --git a/src/controls/FluComboBox.qml b/src/controls/FluComboBox.qml index 3dd03fb..17454a4 100644 --- a/src/controls/FluComboBox.qml +++ b/src/controls/FluComboBox.qml @@ -1,5 +1,5 @@ -import QtQuick -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 Item { diff --git a/src/controls/FluContentDialog.qml b/src/controls/FluContentDialog.qml index 9c3911e..dfbda0f 100644 --- a/src/controls/FluContentDialog.qml +++ b/src/controls/FluContentDialog.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import QtQuick.Window +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 +import QtQuick.Window 2.15 Popup { id: popup @@ -22,8 +22,7 @@ Popup { modal:true anchors.centerIn: Overlay.overlay closePolicy: Popup.CloseOnEscape - background:Item{} - contentItem: Rectangle { + background: Rectangle { id:layout_content implicitWidth:minWidth implicitHeight: text_title.height + text_message.height + layout_actions.height diff --git a/src/controls/FluContentPage.qml b/src/controls/FluContentPage.qml index 2b752e1..aa6051f 100644 --- a/src/controls/FluContentPage.qml +++ b/src/controls/FluContentPage.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Item { diff --git a/src/controls/FluDatePicker.qml b/src/controls/FluDatePicker.qml index b9411b2..81d20a7 100644 --- a/src/controls/FluDatePicker.qml +++ b/src/controls/FluDatePicker.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 Rectangle { diff --git a/src/controls/FluDivider.qml b/src/controls/FluDivider.qml index 1159124..17cc78e 100644 --- a/src/controls/FluDivider.qml +++ b/src/controls/FluDivider.qml @@ -1,5 +1,5 @@ -import QtQuick -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 Rectangle { diff --git a/src/controls/FluDropDownButton.qml b/src/controls/FluDropDownButton.qml index 80e5ddb..29d24b0 100644 --- a/src/controls/FluDropDownButton.qml +++ b/src/controls/FluDropDownButton.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 Button { diff --git a/src/controls/FluExpander.qml b/src/controls/FluExpander.qml index ac2cac7..18f60d8 100644 --- a/src/controls/FluExpander.qml +++ b/src/controls/FluExpander.qml @@ -1,5 +1,5 @@ -import QtQuick -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 Item { diff --git a/src/controls/FluFilledButton.qml b/src/controls/FluFilledButton.qml index acc4d06..0c4f617 100644 --- a/src/controls/FluFilledButton.qml +++ b/src/controls/FluFilledButton.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Button { id: control diff --git a/src/controls/FluFocusRectangle.qml b/src/controls/FluFocusRectangle.qml index 3e00575..1a4d9cd 100644 --- a/src/controls/FluFocusRectangle.qml +++ b/src/controls/FluFocusRectangle.qml @@ -1,12 +1,12 @@ -import QtQuick -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 Item { id:root anchors.fill: parent anchors.margins: -3 - property int radius: 4 + property var radius: 4 Rectangle{ width: root.width diff --git a/src/controls/FluIcon.qml b/src/controls/FluIcon.qml index 46657f1..1943c06 100644 --- a/src/controls/FluIcon.qml +++ b/src/controls/FluIcon.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Text { diff --git a/src/controls/FluIconButton.qml b/src/controls/FluIconButton.qml index 0e63ea4..297cd36 100644 --- a/src/controls/FluIconButton.qml +++ b/src/controls/FluIconButton.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Button { diff --git a/src/controls/FluInfoBar.qml b/src/controls/FluInfoBar.qml index d8084ee..edb8660 100644 --- a/src/controls/FluInfoBar.qml +++ b/src/controls/FluInfoBar.qml @@ -1,6 +1,5 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 FluObject { id:infoBar diff --git a/src/controls/FluMediaPlayer.qml b/src/controls/FluMediaPlayer.qml index ea967ac..3dc8e49 100644 --- a/src/controls/FluMediaPlayer.qml +++ b/src/controls/FluMediaPlayer.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtMultimedia -import Qt5Compat.GraphicalEffects -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtMultimedia 5.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 Item { id:control @@ -20,30 +20,30 @@ Item { MediaPlayer { id: mediaplayer property bool autoSeek:true + autoPlay: true source: control.source - videoOutput: video_output - onErrorOccurred: { + onError: { + console.debug(error) } onPositionChanged: { if(autoSeek){ slider.seek(mediaplayer.position*slider.maxValue/mediaplayer.duration) } } - onMediaStatusChanged: { - if(mediaStatus===6){ + onStatusChanged: { + if(status===6){ slider.maxValue = mediaplayer.duration } } } onSourceChanged: { - slider.seek(0) - mediaplayer.play() + slider.seek(0) } VideoOutput { - id:video_output anchors.fill: parent + source: mediaplayer } Item{ @@ -78,7 +78,7 @@ Item { mediaplayer.autoSeek = false } onReleased: { - mediaplayer.position = value*mediaplayer.duration/slider.maxValue + mediaplayer.seek(value*mediaplayer.duration/slider.maxValue) mediaplayer.autoSeek = true } } @@ -106,14 +106,14 @@ Item { FluIconButton{ iconSize: 15 - iconSource: mediaplayer.playbackState === MediaPlayer.PlayingState ? FluentIcons.Pause : FluentIcons.Play + iconSource: mediaplayer.playbackState === Audio.PlayingState ? FluentIcons.Pause : FluentIcons.Play anchors{ horizontalCenter: parent.horizontalCenter bottom: parent.bottom bottomMargin: 10 } onClicked: { - if(mediaplayer.playbackState === MediaPlayer.PlayingState){ + if(mediaplayer.playbackState === Audio.PlayingState){ mediaplayer.pause() }else{ mediaplayer.play() diff --git a/src/controls/FluMenu.qml b/src/controls/FluMenu.qml index 4f573b8..f8c78e1 100644 --- a/src/controls/FluMenu.qml +++ b/src/controls/FluMenu.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import Qt5Compat.GraphicalEffects +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 Menu { id: popup diff --git a/src/controls/FluMenuItem.qml b/src/controls/FluMenuItem.qml index aa38e2b..d165452 100644 --- a/src/controls/FluMenuItem.qml +++ b/src/controls/FluMenuItem.qml @@ -1,5 +1,5 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.15 +import QtQuick.Controls 2.15 Item { diff --git a/src/controls/FluMultiLineTextBox.qml b/src/controls/FluMultiLineTextBox.qml index db600ea..52708c0 100644 --- a/src/controls/FluMultiLineTextBox.qml +++ b/src/controls/FluMultiLineTextBox.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 TextArea{ diff --git a/src/controls/FluNavigationView.qml b/src/controls/FluNavigationView.qml index 8875b9e..7c50356 100644 --- a/src/controls/FluNavigationView.qml +++ b/src/controls/FluNavigationView.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Window -import QtQuick.Controls -import QtQuick.Layouts -import FluentUI +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 + +import FluentUI 1.0 Item { diff --git a/src/controls/FluObject.qml b/src/controls/FluObject.qml index c33ca3f..4889470 100644 --- a/src/controls/FluObject.qml +++ b/src/controls/FluObject.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.15 QtObject { id:flu_object; + default property list children; } diff --git a/src/controls/FluPaneItem.qml b/src/controls/FluPaneItem.qml index a4b538c..374bc07 100644 --- a/src/controls/FluPaneItem.qml +++ b/src/controls/FluPaneItem.qml @@ -1,5 +1,4 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.15 QtObject { property string title diff --git a/src/controls/FluPaneItemHeader.qml b/src/controls/FluPaneItemHeader.qml index cc42808..63d4789 100644 --- a/src/controls/FluPaneItemHeader.qml +++ b/src/controls/FluPaneItemHeader.qml @@ -1,5 +1,4 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.15 QtObject { property string title diff --git a/src/controls/FluPaneItemSeparator.qml b/src/controls/FluPaneItemSeparator.qml index 8b7e187..9dfda86 100644 --- a/src/controls/FluPaneItemSeparator.qml +++ b/src/controls/FluPaneItemSeparator.qml @@ -1,5 +1,4 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.15 QtObject { diff --git a/src/controls/FluProgressBar.qml b/src/controls/FluProgressBar.qml index ba3ccaa..20bb624 100644 --- a/src/controls/FluProgressBar.qml +++ b/src/controls/FluProgressBar.qml @@ -1,12 +1,12 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.12 +import QtQuick.Controls 2.12 FluRectangle { id: control width: 150 height: 5 - radius: [2.5,2.5,2.5,2.5] + radius: [3,3,3,3] clip: true color: FluTheme.isDark ? Qt.rgba(41/255,41/255,41/255,1) : Qt.rgba(214/255,214/255,214/255,1) property real progress: 0.5 @@ -24,7 +24,7 @@ FluRectangle { Rectangle{ id:bar - radius: 2.5 + radius: 3 width: control.width*progress height: control.height color:FluTheme.isDark ? FluTheme.primaryColor.lighter : FluTheme.primaryColor.dark diff --git a/src/controls/FluProgressRing.qml b/src/controls/FluProgressRing.qml index 1f99ad0..f6bf84f 100644 --- a/src/controls/FluProgressRing.qml +++ b/src/controls/FluProgressRing.qml @@ -1,5 +1,6 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.12 +import QtQuick.Controls 2.12 + Rectangle { id: control diff --git a/src/controls/FluRadioButton.qml b/src/controls/FluRadioButton.qml index 3e46364..cf2be03 100644 --- a/src/controls/FluRadioButton.qml +++ b/src/controls/FluRadioButton.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import FluentUI 1.0 Button { diff --git a/src/controls/FluRectangle.qml b/src/controls/FluRectangle.qml index b0d8312..76cb41a 100644 --- a/src/controls/FluRectangle.qml +++ b/src/controls/FluRectangle.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import Qt5Compat.GraphicalEffects +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 Item{ id:root diff --git a/src/controls/FluScrollBar.qml b/src/controls/FluScrollBar.qml index b4e5482..0f9c531 100644 --- a/src/controls/FluScrollBar.qml +++ b/src/controls/FluScrollBar.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 ScrollBar { diff --git a/src/controls/FluScrollablePage.qml b/src/controls/FluScrollablePage.qml index 5099194..e0cd536 100644 --- a/src/controls/FluScrollablePage.qml +++ b/src/controls/FluScrollablePage.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Window -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Item { diff --git a/src/controls/FluShadow.qml b/src/controls/FluShadow.qml index 32ac814..490718a 100644 --- a/src/controls/FluShadow.qml +++ b/src/controls/FluShadow.qml @@ -1,4 +1,4 @@ -import QtQuick +import QtQuick 2.15 Item { id:root diff --git a/src/controls/FluSlider.qml b/src/controls/FluSlider.qml index ccce110..5bdfc5f 100644 --- a/src/controls/FluSlider.qml +++ b/src/controls/FluSlider.qml @@ -1,10 +1,12 @@ -import QtQuick -import QtQuick.Controls +import QtQuick 2.12 +import QtQuick.Controls 2.12 +import QtGraphicalEffects 1.15 Item{ id:root + property int lineSize: 4 property int size: 180 property int dotSize: 24 @@ -36,18 +38,19 @@ Item{ seek(0) } - Rectangle { + FluRectangle { id: control - width: isHorizontal ? size : 4 - height: isHorizontal ? 4 : size - radius: 2 + width: isHorizontal ? size : root.lineSize + height: isHorizontal ? root.lineSize : size + radius: [3,3,3,3] + clip: true anchors.verticalCenter: parent.verticalCenter color:FluTheme.isDark ? Qt.rgba(162/255,162/255,162/255,1) : Qt.rgba(138/255,138/255,138/255,1) Rectangle{ id:rect - radius: 2.5 - width: isHorizontal ? control.width*(value/maxValue) : 5 - height: isHorizontal ? 5 : control.height*(value/maxValue) + radius: 3 + width: isHorizontal ? control.width*(value/maxValue) : control.width + height: isHorizontal ? control.height : control.height*(value/maxValue) color:FluTheme.isDark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark } } @@ -109,6 +112,7 @@ Item{ } function seek(position){ + console.debug(position) if(isHorizontal){ dot.x =position/maxValue*control.width - dotSize/2 root.value = Qt.binding(function(){ diff --git a/src/controls/FluText.qml b/src/controls/FluText.qml index 1ac8013..ca5d5cc 100644 --- a/src/controls/FluText.qml +++ b/src/controls/FluText.qml @@ -1,5 +1,5 @@ -import QtQuick -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 Text { diff --git a/src/controls/FluTextBox.qml b/src/controls/FluTextBox.qml index 341f5f4..6f4ecfd 100644 --- a/src/controls/FluTextBox.qml +++ b/src/controls/FluTextBox.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 TextField{ diff --git a/src/controls/FluTextBoxBackground.qml b/src/controls/FluTextBoxBackground.qml index 6bfc213..ad31bae 100644 --- a/src/controls/FluTextBoxBackground.qml +++ b/src/controls/FluTextBoxBackground.qml @@ -1,5 +1,5 @@ -import QtQuick -import Qt5Compat.GraphicalEffects +import QtQuick 2.15 +import QtGraphicalEffects 1.15 Rectangle{ id:content diff --git a/src/controls/FluTextButton.qml b/src/controls/FluTextButton.qml index a196524..5b4b034 100644 --- a/src/controls/FluTextButton.qml +++ b/src/controls/FluTextButton.qml @@ -1,6 +1,6 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 Button { diff --git a/src/controls/FluTimePicker.qml b/src/controls/FluTimePicker.qml index 570c396..e9f0e77 100644 --- a/src/controls/FluTimePicker.qml +++ b/src/controls/FluTimePicker.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtQuick.Window -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Window 2.15 +import FluentUI 1.0 Rectangle { diff --git a/src/controls/FluToggleSwitch.qml b/src/controls/FluToggleSwitch.qml index ea56a16..ad627a8 100644 --- a/src/controls/FluToggleSwitch.qml +++ b/src/controls/FluToggleSwitch.qml @@ -1,7 +1,7 @@ -import QtQuick -import QtQuick.Controls -import FluentUI -import QtQuick.Layouts +import QtQuick 2.0 +import QtQuick.Controls 2.0 +import FluentUI 1.0 +import QtQuick.Layouts 1.15 Button { diff --git a/src/controls/FluTooltip.qml b/src/controls/FluTooltip.qml index 3439dc6..822bd04 100644 --- a/src/controls/FluTooltip.qml +++ b/src/controls/FluTooltip.qml @@ -1,6 +1,7 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtGraphicalEffects 1.15 +import FluentUI 1.0 ToolTip { id:tool_tip diff --git a/src/controls/FluTreeView.qml b/src/controls/FluTreeView.qml index b85f93c..0179445 100644 --- a/src/controls/FluTreeView.qml +++ b/src/controls/FluTreeView.qml @@ -1,8 +1,9 @@ -import QtQuick -import QtQuick.Window -import QtQuick.Layouts -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Layouts 1.15 +import QtQuick.Controls 2.15 +import FluentUI 1.0 +import QtGraphicalEffects 1.15 Item { id:root diff --git a/src/controls/FluWindow.qml b/src/controls/FluWindow.qml index fa4feb3..cef9ccd 100644 --- a/src/controls/FluWindow.qml +++ b/src/controls/FluWindow.qml @@ -1,8 +1,8 @@ -import QtQuick -import QtQuick.Controls -import QtQuick.Window -import QtQuick.Layouts -import FluentUI +import QtQuick 2.15 +import QtQuick.Window 2.15 +import QtQuick.Layouts 1.15 +import FluentUI 1.0 +import QtGraphicalEffects 1.15 Item { @@ -127,19 +127,19 @@ Item { root: root } - function showSuccess(text,duration=1000,moremsg){ + function showSuccess(text,duration,moremsg){ infoBar.showSuccess(text,duration,moremsg); } - function showInfo(text,duration=1000,moremsg){ + function showInfo(text,duration,moremsg){ infoBar.showInfo(text,duration,moremsg); } - function showWarning(text,duration=1000,moremsg){ + function showWarning(text,duration,moremsg){ infoBar.showWarning(text,duration,moremsg); } - function showError(text,duration=1000,moremsg){ + function showError(text,duration,moremsg){ infoBar.showError(text,duration,moremsg); } diff --git a/src/controls/FluWindowResize.qml b/src/controls/FluWindowResize.qml index ab43562..37b3319 100644 --- a/src/controls/FluWindowResize.qml +++ b/src/controls/FluWindowResize.qml @@ -1,5 +1,5 @@ -import QtQuick -import QtQuick.Window +import QtQuick 2.15 +import QtQuick.Window 2.15 MouseArea { diff --git a/src/controls/TFpsMonitor.qml b/src/controls/TFpsMonitor.qml index d3a9b49..53abc4d 100644 --- a/src/controls/TFpsMonitor.qml +++ b/src/controls/TFpsMonitor.qml @@ -1,7 +1,8 @@ -import QtQuick -import QtQuick.Controls -import FluentUI +import QtQuick 2.15 +import FluentUI 1.0 + +/*! TODO */ Item { id: toou2d_fps width: contentItemLoader.width + 5;