diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0b817b4a..12fad62b 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 ee0cda06..8ce06b28 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 00000000..1efbead1 --- /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 4a7f173e..9f12c29a 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 e532d1e4..00000000 --- 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 f474c033..fa690bb7 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 c9295434..e3e23faa 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 9832ce2d..ed80ad08 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 5dbfc577..8fd2093e 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 4af84036..3b858066 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 ffb29056..8358a4fb 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 b2378a85..6c3d7362 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 d25e98cb..2e2db6bd 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 7a544302..d28ad3f5 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 b694a49f..4db87142 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 f6226d24..eb5c306f 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 d7bd23e9..3abe00c2 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 927f9808..6da702ac 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 de5e2c38..f63f9d4d 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 150bfd59..08d7cc9c 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 6f59c95e..af9feb5b 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 557c63de..05b5c716 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 bd74d10b..2b9cb1e7 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 c7f6232f..aff8713c 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 aec1bbce..05a2684b 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 9b8cbc45..b730336b 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 ebb526c8..a0311dbd 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 f75faad8..d39f0c73 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 5636a2c8..d602fd1e 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 da5a8758..e06f4a6e 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 5fa46be7..d020b001 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 56586ed0..9b23f2ee 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 c4c9613c..5dc8925a 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 76e069c7..15a7da4f 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 776afd9f..ef249fc0 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 00000000..170ff28a --- /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 06e1a290..109d6c8a 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 55f0e3a2..feaa7a37 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 96dc336d..b86308e4 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 10627344..81f713a1 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 de43acdc..c7262f15 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 82fc780e..fc2205bd 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 00316151..69dc4c53 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 7ffcfbd0..ab1b4c5a 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 24acd5f7..749e04d3 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 16432216..4b4a066b 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 1b0c5325..e73ce6ad 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 7c7f821d..c2581b32 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 c1d0ec25..731f8fe7 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 7e402ebf..dd1d03a1 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 1f00e772..d7b5129d 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 e60cd119..b691f56f 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 94df408b..4fef59ee 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 10f1abf4..2cb25070 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 4be8860a..d74059c5 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 3dd03fb7..17454a4f 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 9c3911e6..dfbda0f6 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 2b752e17..aa6051f5 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 b9411b20..81d20a7b 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 11591246..17cc78e5 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 80e5ddbe..29d24b03 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 ac2cac7a..18f60d8f 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 acc4d069..0c4f6175 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 3e00575f..1a4d9cd3 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 46657f16..1943c06e 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 0e63ea49..297cd36a 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 d8084eea..edb86600 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 ea967ac5..3dc8e49a 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 4f573b84..f8c78e1d 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 aa38e2b6..d1654524 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 db600ea0..52708c08 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 8875b9e5..7c50356f 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 c33ca3f1..48894703 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 a4b538c1..374bc072 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 cc428080..63d47894 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 8b7e1871..9dfda865 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 ba3ccaa7..20bb6241 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 1f99ad0c..f6bf84f7 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 3e46364a..cf2be038 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 b0d8312c..76cb41a6 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 b4e54820..0f9c531e 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 50991943..e0cd5364 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 32ac8149..490718a2 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 ccce1100..5bdfc5fa 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 1ac8013f..ca5d5cc7 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 341f5f4b..6f4ecfdf 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 6bfc2136..ad31bae4 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 a196524e..5b4b0343 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 570c396d..e9f0e774 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 ea56a16c..ad627a8c 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 3439dc6a..822bd047 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 b85f93ca..01794450 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 fa4feb3a..cef9ccdd 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 ab435623..37b33196 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 d3a9b499..53abc4d4 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;