diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 79a5af3b..e7d8ad82 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: os: [macos-11.0] - qt_ver: [5.15.2] + qt_ver: [6.4.3] qt_arch: [clang_64] env: targetName: example @@ -34,6 +34,7 @@ jobs: with: version: ${{ matrix.qt_ver }} cached: 'false' + modules: 'all' - uses: actions/checkout@v2 with: fetch-depth: 1 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 362c5e45..79afdc96 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - qt_ver: [5.15.2] + qt_ver: [6.4.3] qt_arch: [gcc_64] env: targetName: example @@ -29,6 +29,7 @@ jobs: with: version: ${{ matrix.qt_ver }} cached: 'false' + modules: 'all' - 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 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 43ce2941..1909625c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -21,12 +21,7 @@ jobs: # 矩阵配置 matrix: include: - # 5.15.2 参考 https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/windows_x86/desktop/qt5_5152/ - - qt_ver: 5.15.2 - qt_arch: win32_msvc2019 - msvc_arch: x86 - qt_arch_install: msvc2019 - - qt_ver: 5.15.2 + - qt_ver: 6.4.3 qt_arch: win64_msvc2019_64 msvc_arch: x64 qt_arch_install: msvc2019_64 @@ -38,7 +33,7 @@ jobs: # 安装Qt - name: Install Qt # 使用外部action。这个action专门用来安装Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v3 with: # Version of Qt to install version: ${{ matrix.qt_ver }} @@ -46,6 +41,7 @@ jobs: # target: ${{ matrix.qt_target }} arch: ${{ matrix.qt_arch }} cached: 'false' + modules: 'all' aqtversion: '==2.0.5' # 拉取代码 - uses: actions/checkout@v2 diff --git a/example/App.qml b/example/App.qml index 342e06b3..3dd88134 100644 --- a/example/App.qml +++ b/example/App.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Window +import QtQuick.Controls +import QtQuick.Layouts +import FluentUI Window { id:app diff --git a/example/T_Awesome.qml b/example/T_Awesome.qml index ae7cafad..8df90076 100644 --- a/example/T_Awesome.qml +++ b/example/T_Awesome.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluContentPage { diff --git a/example/T_Badge.qml b/example/T_Badge.qml index 352adc93..864b95e2 100644 --- a/example/T_Badge.qml +++ b/example/T_Badge.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_Buttons.qml b/example/T_Buttons.qml index b9b29f54..782abea3 100644 --- a/example/T_Buttons.qml +++ b/example/T_Buttons.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ title:"Buttons" diff --git a/example/T_CalendarPicker.qml b/example/T_CalendarPicker.qml index b268aadf..9eac1b7f 100644 --- a/example/T_CalendarPicker.qml +++ b/example/T_CalendarPicker.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_Carousel.qml b/example/T_Carousel.qml index 906be63c..1d2d9ea1 100644 --- a/example/T_Carousel.qml +++ b/example/T_Carousel.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_CheckBox.qml b/example/T_CheckBox.qml index 7a45fd3c..417d2321 100644 --- a/example/T_CheckBox.qml +++ b/example/T_CheckBox.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_ColorPicker.qml b/example/T_ColorPicker.qml index 4f49b3a2..29bcd87d 100644 --- a/example/T_ColorPicker.qml +++ b/example/T_ColorPicker.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_DatePicker.qml b/example/T_DatePicker.qml index b8f39f93..7ba234e3 100644 --- a/example/T_DatePicker.qml +++ b/example/T_DatePicker.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_Dialog.qml b/example/T_Dialog.qml index 82c8a82c..d3f1f27f 100644 --- a/example/T_Dialog.qml +++ b/example/T_Dialog.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_Expander.qml b/example/T_Expander.qml index 87fbb682..fd123106 100644 --- a/example/T_Expander.qml +++ b/example/T_Expander.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_Home.qml b/example/T_Home.qml index 3171bf39..58bfe30a 100644 --- a/example/T_Home.qml +++ b/example/T_Home.qml @@ -1,9 +1,9 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls import "qrc:///global/" -import FluentUI 1.0 +import FluentUI FluScrollablePage{ diff --git a/example/T_InfoBar.qml b/example/T_InfoBar.qml index 9e89aa5e..06453054 100644 --- a/example/T_InfoBar.qml +++ b/example/T_InfoBar.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_MediaPlayer.qml b/example/T_MediaPlayer.qml index e519f0a7..e3c480d1 100644 --- a/example/T_MediaPlayer.qml +++ b/example/T_MediaPlayer.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_Menu.qml b/example/T_Menu.qml index 33f10507..cb197340 100644 --- a/example/T_Menu.qml +++ b/example/T_Menu.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_MultiWindow.qml b/example/T_MultiWindow.qml index 054a5a57..af6219ea 100644 --- a/example/T_MultiWindow.qml +++ b/example/T_MultiWindow.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_Progress.qml b/example/T_Progress.qml index e8de5a59..506b95fd 100644 --- a/example/T_Progress.qml +++ b/example/T_Progress.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_Rectangle.qml b/example/T_Rectangle.qml index 63d120cb..eebab129 100644 --- a/example/T_Rectangle.qml +++ b/example/T_Rectangle.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_Slider.qml b/example/T_Slider.qml index fcad4ea1..fa56cdf3 100644 --- a/example/T_Slider.qml +++ b/example/T_Slider.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_TabView.qml b/example/T_TabView.qml index cdceb48c..67797341 100644 --- a/example/T_TabView.qml +++ b/example/T_TabView.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_TextBox.qml b/example/T_TextBox.qml index ee475e2e..278d672b 100644 --- a/example/T_TextBox.qml +++ b/example/T_TextBox.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_Theme.qml b/example/T_Theme.qml index dac1b22a..a450677f 100644 --- a/example/T_Theme.qml +++ b/example/T_Theme.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_TimePicker.qml b/example/T_TimePicker.qml index 34e0f6a0..71c1b0ca 100644 --- a/example/T_TimePicker.qml +++ b/example/T_TimePicker.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_ToggleSwitch.qml b/example/T_ToggleSwitch.qml index 85158c05..3a73ef42 100644 --- a/example/T_ToggleSwitch.qml +++ b/example/T_ToggleSwitch.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluScrollablePage{ diff --git a/example/T_Tooltip.qml b/example/T_Tooltip.qml index 72f7e0cc..b28212c8 100644 --- a/example/T_Tooltip.qml +++ b/example/T_Tooltip.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI FluScrollablePage{ diff --git a/example/T_TreeView.qml b/example/T_TreeView.qml index 59c1344d..a5a3518f 100644 --- a/example/T_TreeView.qml +++ b/example/T_TreeView.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI FluContentPage { diff --git a/example/T_Typography.qml b/example/T_Typography.qml index 89c029b0..478ede14 100644 --- a/example/T_Typography.qml +++ b/example/T_Typography.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import FluentUI FluContentPage { diff --git a/example/example.pro b/example/example.pro index 73d8ab6c..007595fe 100644 --- a/example/example.pro +++ b/example/example.pro @@ -1,4 +1,4 @@ -QT += quick concurrent network multimedia +QT += quick quickcontrols2 concurrent network multimedia CONFIG += c++11 DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT diff --git a/example/global/ItemsFooter.qml b/example/global/ItemsFooter.qml index 5d8ed3fc..363a9a9b 100644 --- a/example/global/ItemsFooter.qml +++ b/example/global/ItemsFooter.qml @@ -1,7 +1,7 @@ pragma Singleton -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI FluObject{ id:footer_items diff --git a/example/global/ItemsOriginal.qml b/example/global/ItemsOriginal.qml index 035acfdf..c3d4261f 100644 --- a/example/global/ItemsOriginal.qml +++ b/example/global/ItemsOriginal.qml @@ -1,7 +1,7 @@ pragma Singleton -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI FluObject{ diff --git a/example/main.cpp b/example/main.cpp index d020b001..9ff17505 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -3,12 +3,13 @@ #include #include #include +#include #include #include "ChatController.h" QMap properties(){ QMap map; -// map["installHelper"] = QVariant::fromValue(QVariant::fromValue(InstallHelper::getInstance())); + // map["installHelper"] = QVariant::fromValue(QVariant::fromValue(InstallHelper::getInstance())); return map; } @@ -17,8 +18,8 @@ int main(int argc, char *argv[]) QCoreApplication::setOrganizationName("ZhuZiChu"); QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io"); QCoreApplication::setApplicationName("FluentUI"); - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); + // QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); + QQuickStyle::setStyle("Basic"); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; diff --git a/example/page/AboutPage.qml b/example/page/AboutPage.qml index 85d0c87c..9af092ce 100644 --- a/example/page/AboutPage.qml +++ b/example/page/AboutPage.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import FluentUI FluWindow { @@ -17,6 +17,7 @@ FluWindow { FluAppBar{ id:appbar title:"关于" + width:parent.width } ColumnLayout{ diff --git a/example/page/ChatPage.qml b/example/page/ChatPage.qml index 40e863aa..58797e3e 100644 --- a/example/page/ChatPage.qml +++ b/example/page/ChatPage.qml @@ -1,9 +1,9 @@ -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 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import FluentUI +import Controller +import QtQuick.Dialogs FluWindow { @@ -43,6 +43,7 @@ FluWindow { FluAppBar{ id:appbar title:"ChatGPT" + width:parent.width } Component{ diff --git a/example/page/LoginPage.qml b/example/page/LoginPage.qml index 03d7b786..6a44683c 100644 --- a/example/page/LoginPage.qml +++ b/example/page/LoginPage.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import FluentUI FluWindow { @@ -24,6 +24,7 @@ FluWindow { FluAppBar{ id:appbar title:"登录" + width:parent.width } ColumnLayout{ diff --git a/example/page/MainPage.qml b/example/page/MainPage.qml index 05caf913..ac8a8670 100644 --- a/example/page/MainPage.qml +++ b/example/page/MainPage.qml @@ -1,9 +1,9 @@ -import QtQuick 2.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 +import QtQuick +import QtQuick.Window +import QtQuick.Controls +import QtQuick.Layouts import "qrc:///global/" -import FluentUI 1.0 +import FluentUI FluWindow { id:rootwindow @@ -17,6 +17,7 @@ FluWindow { id:appbar z:10 showDark: true + width:parent.width } diff --git a/src/colorpicker/ColorPicker.qml b/src/colorpicker/ColorPicker.qml index b86308e4..96dc336d 100644 --- a/src/colorpicker/ColorPicker.qml +++ b/src/colorpicker/ColorPicker.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls import "content" Rectangle { diff --git a/src/colorpicker/content/Checkerboard.qml b/src/colorpicker/content/Checkerboard.qml index 81f713a1..10627344 100644 --- a/src/colorpicker/content/Checkerboard.qml +++ b/src/colorpicker/content/Checkerboard.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Grid { id: root property int cellSide: 5 diff --git a/src/colorpicker/content/ColorSlider.qml b/src/colorpicker/content/ColorSlider.qml index c7262f15..de43acdc 100644 --- a/src/colorpicker/content/ColorSlider.qml +++ b/src/colorpicker/content/ColorSlider.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Item { property int cursorHeight: 7 diff --git a/src/colorpicker/content/NumberBox.qml b/src/colorpicker/content/NumberBox.qml index fc2205bd..82fc780e 100644 --- a/src/colorpicker/content/NumberBox.qml +++ b/src/colorpicker/content/NumberBox.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Row { property alias caption: captionBox.text diff --git a/src/colorpicker/content/PanelBorder.qml b/src/colorpicker/content/PanelBorder.qml index 69dc4c53..00316151 100644 --- a/src/colorpicker/content/PanelBorder.qml +++ b/src/colorpicker/content/PanelBorder.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Rectangle { width : 40; height : 15; radius: 2 diff --git a/src/colorpicker/content/SBPicker.qml b/src/colorpicker/content/SBPicker.qml index c0b3fb57..86a24ce3 100644 --- a/src/colorpicker/content/SBPicker.qml +++ b/src/colorpicker/content/SBPicker.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Item { id: root @@ -51,20 +51,12 @@ Item { preventStealing: true 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: handleMouse(mouse) - onPressed: handleMouse(mouse) + onPositionChanged:(mouse)=> handleMouse(mouse) + onPressed:(mouse)=> handleMouse(mouse) } } diff --git a/src/controls/FluAppBar.qml b/src/controls/FluAppBar.qml index 0439ee25..62861f5c 100644 --- a/src/controls/FluAppBar.qml +++ b/src/controls/FluAppBar.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Window 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Window +import QtQuick.Layouts +import FluentUI Rectangle{ @@ -23,11 +23,7 @@ Rectangle{ color: Qt.rgba(0,0,0,0) visible: FluTheme.frameless height: visible ? 30 : 0 - width: { - if(parent==null) - return 200 - return parent.width - } + clip: true z: 65535 TapHandler { diff --git a/src/controls/FluArea.qml b/src/controls/FluArea.qml index 9e878a88..653f229c 100644 --- a/src/controls/FluArea.qml +++ b/src/controls/FluArea.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Rectangle { diff --git a/src/controls/FluAutoSuggestBox.qml b/src/controls/FluAutoSuggestBox.qml index 010781b0..d94b9d2c 100644 --- a/src/controls/FluAutoSuggestBox.qml +++ b/src/controls/FluAutoSuggestBox.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI TextField{ diff --git a/src/controls/FluBadge.qml b/src/controls/FluBadge.qml index cfc47b11..e37a8c6f 100644 --- a/src/controls/FluBadge.qml +++ b/src/controls/FluBadge.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Rectangle{ diff --git a/src/controls/FluButton.qml b/src/controls/FluButton.qml index 676bde96..2b4c1974 100644 --- a/src/controls/FluButton.qml +++ b/src/controls/FluButton.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI Button { diff --git a/src/controls/FluCalendarPicker.qml b/src/controls/FluCalendarPicker.qml index c06a4097..d1b1d192 100644 --- a/src/controls/FluCalendarPicker.qml +++ b/src/controls/FluCalendarPicker.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI Rectangle { @@ -59,7 +59,7 @@ Rectangle { } - Popup{ + Menu{ id:popup height: container.height width: container.width @@ -79,18 +79,21 @@ Rectangle { duration: 150 } } - background: FluCalendarView{ - id:container - onDateClicked: - (date)=>{ - popup.close() - var year = date.getFullYear() - var month = date.getMonth() - var day = date.getDate() - text_date.text = year+"-"+(month+1)+"-"+day - } + contentItem: Item{ + anchors.fill: parent + FluCalendarView{ + id:container + onDateClicked: + (date)=>{ + popup.close() + var year = date.getFullYear() + var month = date.getMonth() + var day = date.getDate() + text_date.text = year+"-"+(month+1)+"-"+day + } + } } - contentItem: Item{} + background: Item{} function showPopup() { var pos = root.mapToItem(null, 0, 0) if(window.height>pos.y+root.height+popup.height){ diff --git a/src/controls/FluCalendarView.qml b/src/controls/FluCalendarView.qml index bd8b72f0..dbff7d97 100644 --- a/src/controls/FluCalendarView.qml +++ b/src/controls/FluCalendarView.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI Item { diff --git a/src/controls/FluCarousel.qml b/src/controls/FluCarousel.qml index b691f56f..e60cd119 100644 --- a/src/controls/FluCarousel.qml +++ b/src/controls/FluCarousel.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI Item { diff --git a/src/controls/FluCheckBox.qml b/src/controls/FluCheckBox.qml index f8f6a359..e98fb453 100644 --- a/src/controls/FluCheckBox.qml +++ b/src/controls/FluCheckBox.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import FluentUI Button { diff --git a/src/controls/FluColorPicker.qml b/src/controls/FluColorPicker.qml index 78f8c133..4c81d18b 100644 --- a/src/controls/FluColorPicker.qml +++ b/src/controls/FluColorPicker.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI Button{ @@ -27,15 +27,19 @@ Button{ onClicked: { popup.showPopup() } - Popup{ + Menu{ id:popup modal: true dim:false height: container.height width: container.width - background: FluColorView{ - id:container + contentItem: Item{ + anchors.fill: parent + FluColorView{ + id:container + } } + background:Item{} enter: Transition { NumberAnimation { property: "y" @@ -50,7 +54,6 @@ Button{ duration: 150 } } - contentItem: Item{} function showPopup() { var pos = control.mapToItem(null, 0, 0) if(window.height>pos.y+control.height+popup.height){ diff --git a/src/controls/FluColorView.qml b/src/controls/FluColorView.qml index 00b69e4d..2bf8bf0d 100644 --- a/src/controls/FluColorView.qml +++ b/src/controls/FluColorView.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick import "../colorpicker" Item { diff --git a/src/controls/FluComboBox.qml b/src/controls/FluComboBox.qml index 17454a4f..3dd03fb7 100644 --- a/src/controls/FluComboBox.qml +++ b/src/controls/FluComboBox.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Item { diff --git a/src/controls/FluContentDialog.qml b/src/controls/FluContentDialog.qml index 9613e23d..778a6180 100644 --- a/src/controls/FluContentDialog.qml +++ b/src/controls/FluContentDialog.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 -import QtQuick.Window 2.15 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import QtQuick.Window Popup { id: popup @@ -17,11 +17,11 @@ Popup { return 400 return Math.min(Window.window.width,400) } - modal:true anchors.centerIn: Overlay.overlay closePolicy: Popup.CloseOnEscape - background: Rectangle { + background:Item{} + contentItem: 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 de918d34..691c037d 100644 --- a/src/controls/FluContentPage.qml +++ b/src/controls/FluContentPage.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI Item { diff --git a/src/controls/FluDatePicker.qml b/src/controls/FluDatePicker.qml index 9d5273d7..03766667 100644 --- a/src/controls/FluDatePicker.qml +++ b/src/controls/FluDatePicker.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI Rectangle { @@ -97,12 +97,11 @@ Rectangle { text:"日" } - Popup{ + Menu{ id:popup - width: container.width - height: container.height - contentItem: Item{} modal: true + width: 300 + height: 340 dim:false enter: Transition { NumberAnimation { @@ -118,12 +117,12 @@ Rectangle { duration: 150 } } - background: Rectangle{ + background:Item{} + contentItem: Rectangle{ id:container - width: 300 radius: 4 + anchors.fill: parent color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) - height: 340 MouseArea{ anchors.fill: parent } @@ -337,9 +336,7 @@ Rectangle { popup.close() } } - } - } y:35 function showPopup() { diff --git a/src/controls/FluDivider.qml b/src/controls/FluDivider.qml index 8abba71c..429505b4 100644 --- a/src/controls/FluDivider.qml +++ b/src/controls/FluDivider.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Rectangle { diff --git a/src/controls/FluDropDownButton.qml b/src/controls/FluDropDownButton.qml index 094eb355..89ac80dd 100644 --- a/src/controls/FluDropDownButton.qml +++ b/src/controls/FluDropDownButton.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Window +import FluentUI Button { diff --git a/src/controls/FluExpander.qml b/src/controls/FluExpander.qml index 89b84a7e..bcce7014 100644 --- a/src/controls/FluExpander.qml +++ b/src/controls/FluExpander.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI Item { diff --git a/src/controls/FluFilledButton.qml b/src/controls/FluFilledButton.qml index 95d26203..1e06cef6 100644 --- a/src/controls/FluFilledButton.qml +++ b/src/controls/FluFilledButton.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI Button { diff --git a/src/controls/FluFocusRectangle.qml b/src/controls/FluFocusRectangle.qml index b10fee4c..c59ab9a8 100644 --- a/src/controls/FluFocusRectangle.qml +++ b/src/controls/FluFocusRectangle.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Item { diff --git a/src/controls/FluIcon.qml b/src/controls/FluIcon.qml index 320d739f..110c0757 100644 --- a/src/controls/FluIcon.qml +++ b/src/controls/FluIcon.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Text { diff --git a/src/controls/FluIconButton.qml b/src/controls/FluIconButton.qml index 36eb39a1..aa024057 100644 --- a/src/controls/FluIconButton.qml +++ b/src/controls/FluIconButton.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI Button { diff --git a/src/controls/FluInfoBar.qml b/src/controls/FluInfoBar.qml index 8eff87d4..e1020cfb 100644 --- a/src/controls/FluInfoBar.qml +++ b/src/controls/FluInfoBar.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI FluObject { id:infoBar @@ -208,23 +208,23 @@ FluObject { } } - function showSuccess(text,duration,moremsg){ + function showSuccess(text,duration=1000,moremsg){ mcontrol.create(mcontrol.const_success,text,duration,moremsg ? moremsg : ""); } - function showInfo(text,duration,moremsg){ + function showInfo(text,duration=1000,moremsg){ mcontrol.create(mcontrol.const_info,text,duration,moremsg ? moremsg : ""); } - function showWarning(text,duration,moremsg){ + function showWarning(text,duration=1000,moremsg){ mcontrol.create(mcontrol.const_warning,text,duration,moremsg ? moremsg : ""); } - function showError(text,duration,moremsg){ + function showError(text,duration=1000,moremsg){ mcontrol.create(mcontrol.const_error,text,duration,moremsg ? moremsg : ""); } - function showCustom(itemcomponent,duration){ + function showCustom(itemcomponent,duration=1000){ mcontrol.createCustom(itemcomponent,duration); } diff --git a/src/controls/FluItem.qml b/src/controls/FluItem.qml index 872866f0..45e30bcf 100644 --- a/src/controls/FluItem.qml +++ b/src/controls/FluItem.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtGraphicalEffects 1.15 +import QtQuick +import QtQuick.Controls +import Qt5Compat.GraphicalEffects Item{ id:control diff --git a/src/controls/FluMediaPlayer.qml b/src/controls/FluMediaPlayer.qml index 9eced0a5..763a9379 100644 --- a/src/controls/FluMediaPlayer.qml +++ b/src/controls/FluMediaPlayer.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtMultimedia 5.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtMultimedia +import FluentUI Rectangle { @@ -26,22 +26,26 @@ Rectangle { MediaPlayer { id: mediaplayer property bool autoSeek:true - autoPlay: true source: control.source - onError: { - console.debug(error) - } + videoOutput: video_output + audioOutput: AudioOutput{} + onErrorChanged:(error)=> { + console.debug(error) + } onPositionChanged: { if(autoSeek){ slider.seek(mediaplayer.position*slider.maxValue/mediaplayer.duration) } } - onStatusChanged: { - if(status===6){ - slider.maxValue = mediaplayer.duration - showControl = true + onMediaStatusChanged: + (status)=> { + if(status===2){ + mediaplayer.play() + }else if(status===5){ + slider.maxValue = mediaplayer.duration + showControl = true + } } - } } onSourceChanged: { @@ -49,8 +53,8 @@ Rectangle { } VideoOutput { + id:video_output anchors.fill: parent - source: mediaplayer } Item{ @@ -143,9 +147,9 @@ Rectangle { } FluIconButton{ iconSize: 15 - iconSource: mediaplayer.playbackState === Audio.PlayingState ? FluentIcons.Pause : FluentIcons.Play + iconSource: mediaplayer.playbackState === MediaPlayer.PlayingState ? FluentIcons.Pause : FluentIcons.Play onClicked: { - if(mediaplayer.playbackState === Audio.PlayingState){ + if(mediaplayer.playbackState === MediaPlayer.PlayingState){ mediaplayer.pause() }else{ mediaplayer.play() diff --git a/src/controls/FluMenu.qml b/src/controls/FluMenu.qml index 2854f8b1..f8b0e32e 100644 --- a/src/controls/FluMenu.qml +++ b/src/controls/FluMenu.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls Menu { @@ -9,10 +9,8 @@ Menu { id: popup width: 140 height: container.height - modal: true + modal:true dim:false - contentItem: Item{} - enter: Transition { NumberAnimation { property: "y" @@ -27,8 +25,8 @@ Menu { duration: animEnabled ? 150 : 0 } } - - background: Item { + background:Item{} + contentItem: Item { Rectangle{ anchors.fill: parent color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,0.97) : Qt.rgba(237/255,237/255,237/255,0.97) diff --git a/src/controls/FluMenuItem.qml b/src/controls/FluMenuItem.qml index 17ddf6ed..3358857f 100644 --- a/src/controls/FluMenuItem.qml +++ b/src/controls/FluMenuItem.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 +import QtQuick +import QtQuick.Controls Item { diff --git a/src/controls/FluMultiLineTextBox.qml b/src/controls/FluMultiLineTextBox.qml index ea3b5b71..9db02260 100644 --- a/src/controls/FluMultiLineTextBox.qml +++ b/src/controls/FluMultiLineTextBox.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI TextArea{ diff --git a/src/controls/FluNavigationView.qml b/src/controls/FluNavigationView.qml index 8ba225c7..1ab93f83 100644 --- a/src/controls/FluNavigationView.qml +++ b/src/controls/FluNavigationView.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Window +import QtQuick.Controls +import QtQuick.Layouts +import FluentUI Item { diff --git a/src/controls/FluObject.qml b/src/controls/FluObject.qml index 48894703..b78c19be 100644 --- a/src/controls/FluObject.qml +++ b/src/controls/FluObject.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick QtObject { id:flu_object; diff --git a/src/controls/FluPaneItem.qml b/src/controls/FluPaneItem.qml index c26816ee..fec09829 100644 --- a/src/controls/FluPaneItem.qml +++ b/src/controls/FluPaneItem.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI QtObject { readonly property string key : FluApp.uuid() diff --git a/src/controls/FluPaneItemHeader.qml b/src/controls/FluPaneItemHeader.qml index c9bf9796..64fb1585 100644 --- a/src/controls/FluPaneItemHeader.qml +++ b/src/controls/FluPaneItemHeader.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick QtObject { readonly property string key : FluApp.uuid() diff --git a/src/controls/FluPaneItemSeparator.qml b/src/controls/FluPaneItemSeparator.qml index f3925357..1dca3293 100644 --- a/src/controls/FluPaneItemSeparator.qml +++ b/src/controls/FluPaneItemSeparator.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick QtObject { readonly property string key : FluApp.uuid() diff --git a/src/controls/FluProgressBar.qml b/src/controls/FluProgressBar.qml index 00723cb7..dffda48a 100644 --- a/src/controls/FluProgressBar.qml +++ b/src/controls/FluProgressBar.qml @@ -1,5 +1,5 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls FluRectangle { diff --git a/src/controls/FluProgressRing.qml b/src/controls/FluProgressRing.qml index c63bc153..f1d3c805 100644 --- a/src/controls/FluProgressRing.qml +++ b/src/controls/FluProgressRing.qml @@ -1,5 +1,5 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls Rectangle { diff --git a/src/controls/FluRadioButton.qml b/src/controls/FluRadioButton.qml index b1a561b2..f17334ad 100644 --- a/src/controls/FluRadioButton.qml +++ b/src/controls/FluRadioButton.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import FluentUI Button { diff --git a/src/controls/FluRectangle.qml b/src/controls/FluRectangle.qml index 38bab89f..2293b33a 100644 --- a/src/controls/FluRectangle.qml +++ b/src/controls/FluRectangle.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtGraphicalEffects 1.15 +import QtQuick +import QtQuick.Controls +import Qt5Compat.GraphicalEffects Item{ id:control diff --git a/src/controls/FluScrollBar.qml b/src/controls/FluScrollBar.qml index 23b85f39..176710db 100644 --- a/src/controls/FluScrollBar.qml +++ b/src/controls/FluScrollBar.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 +import QtQuick +import QtQuick.Controls import QtQuick.Controls.impl 2.15 import QtQuick.Templates 2.15 as T -import FluentUI 1.0 +import FluentUI T.ScrollBar { id: control diff --git a/src/controls/FluScrollablePage.qml b/src/controls/FluScrollablePage.qml index 125257f5..f4c3fa2c 100644 --- a/src/controls/FluScrollablePage.qml +++ b/src/controls/FluScrollablePage.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Layouts +import QtQuick.Window +import QtQuick.Controls +import FluentUI Item { diff --git a/src/controls/FluShadow.qml b/src/controls/FluShadow.qml index fd7d56e9..9e89023f 100644 --- a/src/controls/FluShadow.qml +++ b/src/controls/FluShadow.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Item { diff --git a/src/controls/FluSlider.qml b/src/controls/FluSlider.qml index c8cb0069..9631f1f5 100644 --- a/src/controls/FluSlider.qml +++ b/src/controls/FluSlider.qml @@ -1,6 +1,6 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtGraphicalEffects 1.15 +import QtQuick +import QtQuick.Controls +import Qt5Compat.GraphicalEffects Item{ diff --git a/src/controls/FluTabView.qml b/src/controls/FluTabView.qml index 2e15cc76..043d3c31 100644 --- a/src/controls/FluTabView.qml +++ b/src/controls/FluTabView.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import FluentUI Item { diff --git a/src/controls/FluText.qml b/src/controls/FluText.qml index 42ba3f41..577a087f 100644 --- a/src/controls/FluText.qml +++ b/src/controls/FluText.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Text { diff --git a/src/controls/FluTextBox.qml b/src/controls/FluTextBox.qml index f84715a3..5cd395f8 100644 --- a/src/controls/FluTextBox.qml +++ b/src/controls/FluTextBox.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI TextField{ diff --git a/src/controls/FluTextBoxBackground.qml b/src/controls/FluTextBoxBackground.qml index 449d05b5..cddeef94 100644 --- a/src/controls/FluTextBoxBackground.qml +++ b/src/controls/FluTextBoxBackground.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import QtGraphicalEffects 1.15 +import QtQuick +import Qt5Compat.GraphicalEffects Rectangle{ id:content diff --git a/src/controls/FluTextButton.qml b/src/controls/FluTextButton.qml index de794d33..4b91140f 100644 --- a/src/controls/FluTextButton.qml +++ b/src/controls/FluTextButton.qml @@ -1,6 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI Button { diff --git a/src/controls/FluTimePicker.qml b/src/controls/FluTimePicker.qml index 76fbc0a0..54f55b60 100644 --- a/src/controls/FluTimePicker.qml +++ b/src/controls/FluTimePicker.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Window 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window +import FluentUI Rectangle { @@ -101,9 +101,8 @@ Rectangle { Popup{ id:popup - width: container.width - height: container.height - contentItem: Item{} + width: 300 + height: 340 modal: true dim:false enter: Transition { @@ -120,12 +119,12 @@ Rectangle { duration: 150 } } - background: Rectangle{ + background:Item{} + contentItem: Rectangle{ id:container - width: 300 + anchors.fill: parent radius: 4 color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) - height: 340 MouseArea{ anchors.fill: parent } diff --git a/src/controls/FluToggleSwitch.qml b/src/controls/FluToggleSwitch.qml index 2f19c507..57042930 100644 --- a/src/controls/FluToggleSwitch.qml +++ b/src/controls/FluToggleSwitch.qml @@ -1,7 +1,7 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 -import FluentUI 1.0 -import QtQuick.Layouts 1.15 +import FluentUI +import QtQuick.Layouts Button { diff --git a/src/controls/FluTooltip.qml b/src/controls/FluTooltip.qml index 5f2b740c..f10b3e03 100644 --- a/src/controls/FluTooltip.qml +++ b/src/controls/FluTooltip.qml @@ -1,7 +1,6 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtGraphicalEffects 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI ToolTip { id:tool_tip diff --git a/src/controls/FluTreeView.qml b/src/controls/FluTreeView.qml index 32a1eefe..ded9f6e6 100644 --- a/src/controls/FluTreeView.qml +++ b/src/controls/FluTreeView.qml @@ -1,9 +1,8 @@ -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 +import QtQuick +import QtQuick.Window +import QtQuick.Layouts +import QtQuick.Controls +import FluentUI Item { diff --git a/src/controls/FluWindow.qml b/src/controls/FluWindow.qml index 31b22820..32f0633d 100644 --- a/src/controls/FluWindow.qml +++ b/src/controls/FluWindow.qml @@ -1,8 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Window 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 -import QtGraphicalEffects 1.15 +import QtQuick +import QtQuick.Window +import QtQuick.Layouts +import FluentUI Item { diff --git a/src/controls/FluWindowResize.qml b/src/controls/FluWindowResize.qml index 37b33196..ab435623 100644 --- a/src/controls/FluWindowResize.qml +++ b/src/controls/FluWindowResize.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import QtQuick.Window 2.15 +import QtQuick +import QtQuick.Window MouseArea { diff --git a/src/controls/TFpsMonitor.qml b/src/controls/TFpsMonitor.qml index 671d96e7..4bc939c5 100644 --- a/src/controls/TFpsMonitor.qml +++ b/src/controls/TFpsMonitor.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Item {