diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 12fad62b..01b8468e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: os: [macos-10.15,macos-11.0] - qt_ver: [5.15.2] + qt_ver: [6.4.3] qt_arch: [clang_64] env: targetName: example diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 8ce06b28..6804a493 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -19,8 +19,13 @@ jobs: strategy: matrix: os: [ubuntu-18.04,ubuntu-20.04] - qt_ver: [5.15.2] + qt_ver: [6.4.3] qt_arch: [gcc_64] + exclude: + # Qt6.2.2 need GLIBC_2.28, ubuntu 18.04 have not. + - os: ubuntu-18.04 + qt_ver: 6.4.3 + qt_arch: gcc_64 env: targetName: example steps: diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml index 1efbead1..7d75e33e 100644 --- a/.github/workflows/windows-mingw.yml +++ b/.github/workflows/windows-mingw.yml @@ -17,14 +17,10 @@ jobs: 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 + - qt_arch: win64_mingw + qt_ver: 6.4.3 + qt_tools: "tools_mingw,9.0.0-1-202111221309,qt.tools.win64_mingw900" + qt_tools_mingw_install: mingw900_64 env: targetName: example.exe fileName: example diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9f12c29a..1cc72f39 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -22,14 +22,10 @@ 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 + qt_arch_install: msvc2019_64 env: targetName: example.exe fileName: example diff --git a/example/App.qml b/example/App.qml index fa690bb7..6e3f4be2 100644 --- a/example/App.qml +++ b/example/App.qml @@ -2,7 +2,6 @@ import QtQuick.Window 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 -import QtGraphicalEffects 1.15 import FluentUI 1.0 Window { diff --git a/example/T_Badge.qml b/example/T_Badge.qml index ed80ad08..cdf7e577 100644 --- a/example/T_Badge.qml +++ b/example/T_Badge.qml @@ -2,7 +2,6 @@ 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_Carousel.qml b/example/T_Carousel.qml index 8358a4fb..05211cd4 100644 --- a/example/T_Carousel.qml +++ b/example/T_Carousel.qml @@ -2,7 +2,6 @@ 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 6c3d7362..a110172f 100644 --- a/example/T_ColorPicker.qml +++ b/example/T_ColorPicker.qml @@ -2,7 +2,6 @@ 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_Dialog.qml b/example/T_Dialog.qml index d28ad3f5..8737bd6b 100644 --- a/example/T_Dialog.qml +++ b/example/T_Dialog.qml @@ -2,7 +2,6 @@ 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_Expander.qml b/example/T_Expander.qml index 4db87142..1b285e12 100644 --- a/example/T_Expander.qml +++ b/example/T_Expander.qml @@ -2,7 +2,6 @@ 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_InfoBar.qml b/example/T_InfoBar.qml index eb5c306f..d7137cb9 100644 --- a/example/T_InfoBar.qml +++ b/example/T_InfoBar.qml @@ -2,7 +2,6 @@ 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_MediaPlayer.qml b/example/T_MediaPlayer.qml index 3abe00c2..853e4b26 100644 --- a/example/T_MediaPlayer.qml +++ b/example/T_MediaPlayer.qml @@ -2,7 +2,7 @@ import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import QtQuick.Window 2.15 -import QtGraphicalEffects 1.15 +import Qt5Compat.GraphicalEffects import FluentUI 1.0 FluScrollablePage{ @@ -21,10 +21,7 @@ FluScrollablePage{ } FluMediaPlayer{ - source:{ - console.debug("-------------->") - return "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" - } + source:"http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" } } diff --git a/example/T_Menu.qml b/example/T_Menu.qml index 6da702ac..33fcfa23 100644 --- a/example/T_Menu.qml +++ b/example/T_Menu.qml @@ -2,7 +2,6 @@ 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_Progress.qml b/example/T_Progress.qml index 08d7cc9c..98442016 100644 --- a/example/T_Progress.qml +++ b/example/T_Progress.qml @@ -2,7 +2,6 @@ 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_Rectangle.qml b/example/T_Rectangle.qml index af9feb5b..daa817fe 100644 --- a/example/T_Rectangle.qml +++ b/example/T_Rectangle.qml @@ -2,7 +2,6 @@ import QtQuick.Layouts 1.15 import QtQuick.Controls 2.15 import QtQuick.Window 2.15 -import QtGraphicalEffects 1.15 import FluentUI 1.0 FluScrollablePage{ diff --git a/example/T_Slider.qml b/example/T_Slider.qml index 05b5c716..9ff659a1 100644 --- a/example/T_Slider.qml +++ b/example/T_Slider.qml @@ -2,7 +2,6 @@ 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 2b9cb1e7..85235aff 100644 --- a/example/T_TextBox.qml +++ b/example/T_TextBox.qml @@ -2,7 +2,6 @@ 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 aff8713c..a3e3c867 100644 --- a/example/T_Theme.qml +++ b/example/T_Theme.qml @@ -2,7 +2,6 @@ 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_ToggleSwitch.qml b/example/T_ToggleSwitch.qml index b730336b..afbd3292 100644 --- a/example/T_ToggleSwitch.qml +++ b/example/T_ToggleSwitch.qml @@ -2,7 +2,6 @@ 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 a0311dbd..885df12c 100644 --- a/example/T_Tooltip.qml +++ b/example/T_Tooltip.qml @@ -2,7 +2,6 @@ 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/example.pro b/example/example.pro index e06f4a6e..1ebe984d 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/main.cpp b/example/main.cpp index d020b001..a79d396e 100644 --- a/example/main.cpp +++ b/example/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "ChatController.h" @@ -19,6 +20,7 @@ int main(int argc, char *argv[]) QCoreApplication::setApplicationName("FluentUI"); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); + QQuickStyle::setStyle("Basic"); QGuiApplication app(argc, argv); QQmlApplicationEngine engine; diff --git a/example/page/ChatPage.qml b/example/page/ChatPage.qml index 5dc8925a..c4c9613c 100644 --- a/example/page/ChatPage.qml +++ b/example/page/ChatPage.qml @@ -1,9 +1,8 @@ -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 FluWindow { diff --git a/example/page/MainPage.qml b/example/page/MainPage.qml index ef249fc0..bf3a1fd2 100644 --- a/example/page/MainPage.qml +++ b/example/page/MainPage.qml @@ -2,7 +2,6 @@ import QtQuick.Window 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 -import QtGraphicalEffects 1.15 import FluentUI 1.0 diff --git a/src/FramelessView_win.cpp b/src/FramelessView_win.cpp index feaa7a37..55f0e3a2 100644 --- a/src/FramelessView_win.cpp +++ b/src/FramelessView_win.cpp @@ -4,6 +4,8 @@ #include #include #include +#pragma comment(lib, "User32.lib") +#include class FramelessViewPrivate { 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 ab1b4c5a..7ffcfbd0 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 @@ -50,20 +50,12 @@ 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: 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 749e04d3..24acd5f7 100644 --- a/src/controls/FluAppBar.qml +++ b/src/controls/FluAppBar.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Window 2.15 -import QtQuick.Layouts 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Window +import QtQuick.Layouts +import FluentUI Rectangle{ @@ -15,11 +15,10 @@ Rectangle{ } visible: FluTheme.isFrameless height: visible ? 34 : 0 - width: { - if(parent==null) - return 200 - return parent.width + if(root.parent) + return root.parent.width + return 200 } z: 65535 clip: true diff --git a/src/controls/FluArea.qml b/src/controls/FluArea.qml index 4b4a066b..16432216 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 { radius: 4 diff --git a/src/controls/FluAutoSuggestBox.qml b/src/controls/FluAutoSuggestBox.qml index e73ce6ad..1b0c5325 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 c2581b32..7c7f821d 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 731f8fe7..c1d0ec25 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 dd1d03a1..7e402ebf 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 { diff --git a/src/controls/FluCalendarView.qml b/src/controls/FluCalendarView.qml index d7b5129d..1f00e772 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 4fef59ee..94df408b 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 2cb25070..10f1abf4 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{ diff --git a/src/controls/FluColorView.qml b/src/controls/FluColorView.qml index d74059c5..4be8860a 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 dfbda0f6..2173c32f 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 diff --git a/src/controls/FluContentPage.qml b/src/controls/FluContentPage.qml index aa6051f5..2b752e17 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 81d20a7b..b9411b20 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 { diff --git a/src/controls/FluDivider.qml b/src/controls/FluDivider.qml index 17cc78e5..11591246 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 29d24b03..80e5ddbe 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 18f60d8f..ac2cac7a 100644 --- a/src/controls/FluExpander.qml +++ b/src/controls/FluExpander.qml @@ -1,5 +1,5 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Item { diff --git a/src/controls/FluFilledButton.qml b/src/controls/FluFilledButton.qml index 0c4f6175..acc4d069 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 { id: control diff --git a/src/controls/FluFocusRectangle.qml b/src/controls/FluFocusRectangle.qml index 1a4d9cd3..3e00575f 100644 --- a/src/controls/FluFocusRectangle.qml +++ b/src/controls/FluFocusRectangle.qml @@ -1,12 +1,12 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import FluentUI Item { id:root anchors.fill: parent anchors.margins: -3 - property var radius: 4 + property int radius: 4 Rectangle{ width: root.width diff --git a/src/controls/FluIcon.qml b/src/controls/FluIcon.qml index 1943c06e..46657f16 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 297cd36a..0e63ea49 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 edb86600..d8084eea 100644 --- a/src/controls/FluInfoBar.qml +++ b/src/controls/FluInfoBar.qml @@ -1,5 +1,6 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI FluObject { id:infoBar diff --git a/src/controls/FluMediaPlayer.qml b/src/controls/FluMediaPlayer.qml index 3dc8e49a..ea967ac5 100644 --- a/src/controls/FluMediaPlayer.qml +++ b/src/controls/FluMediaPlayer.qml @@ -1,8 +1,8 @@ -import QtQuick 2.15 -import QtQuick.Controls 2.15 -import QtMultimedia 5.15 -import QtGraphicalEffects 1.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import QtMultimedia +import Qt5Compat.GraphicalEffects +import FluentUI Item { id:control @@ -20,30 +20,30 @@ Item { MediaPlayer { id: mediaplayer property bool autoSeek:true - autoPlay: true source: control.source - onError: { - console.debug(error) + videoOutput: video_output + onErrorOccurred: { } onPositionChanged: { if(autoSeek){ slider.seek(mediaplayer.position*slider.maxValue/mediaplayer.duration) } } - onStatusChanged: { - if(status===6){ + onMediaStatusChanged: { + if(mediaStatus===6){ slider.maxValue = mediaplayer.duration } } } onSourceChanged: { - slider.seek(0) + slider.seek(0) + mediaplayer.play() } VideoOutput { + id:video_output anchors.fill: parent - source: mediaplayer } Item{ @@ -78,7 +78,7 @@ Item { mediaplayer.autoSeek = false } onReleased: { - mediaplayer.seek(value*mediaplayer.duration/slider.maxValue) + mediaplayer.position = value*mediaplayer.duration/slider.maxValue mediaplayer.autoSeek = true } } @@ -106,14 +106,14 @@ Item { FluIconButton{ iconSize: 15 - iconSource: mediaplayer.playbackState === Audio.PlayingState ? FluentIcons.Pause : FluentIcons.Play + iconSource: mediaplayer.playbackState === MediaPlayer.PlayingState ? FluentIcons.Pause : FluentIcons.Play anchors{ horizontalCenter: parent.horizontalCenter bottom: parent.bottom bottomMargin: 10 } 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 f8c78e1d..4f573b84 100644 --- a/src/controls/FluMenu.qml +++ b/src/controls/FluMenu.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 -import QtGraphicalEffects 1.15 +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Qt5Compat.GraphicalEffects Menu { id: popup diff --git a/src/controls/FluMenuItem.qml b/src/controls/FluMenuItem.qml index d1654524..aa38e2b6 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 52708c08..db600ea0 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 7c50356f..8875b9e5 100644 --- a/src/controls/FluNavigationView.qml +++ b/src/controls/FluNavigationView.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 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..c33ca3f1 100644 --- a/src/controls/FluObject.qml +++ b/src/controls/FluObject.qml @@ -1,7 +1,7 @@ -import QtQuick 2.15 +import QtQuick +import QtQuick.Controls QtObject { id:flu_object; - default property list children; } diff --git a/src/controls/FluPaneItem.qml b/src/controls/FluPaneItem.qml index 374bc072..a4b538c1 100644 --- a/src/controls/FluPaneItem.qml +++ b/src/controls/FluPaneItem.qml @@ -1,4 +1,5 @@ -import QtQuick 2.15 +import QtQuick +import QtQuick.Controls QtObject { property string title diff --git a/src/controls/FluPaneItemHeader.qml b/src/controls/FluPaneItemHeader.qml index 63d47894..cc428080 100644 --- a/src/controls/FluPaneItemHeader.qml +++ b/src/controls/FluPaneItemHeader.qml @@ -1,4 +1,5 @@ -import QtQuick 2.15 +import QtQuick +import QtQuick.Controls QtObject { property string title diff --git a/src/controls/FluPaneItemSeparator.qml b/src/controls/FluPaneItemSeparator.qml index 9dfda865..8b7e1871 100644 --- a/src/controls/FluPaneItemSeparator.qml +++ b/src/controls/FluPaneItemSeparator.qml @@ -1,4 +1,5 @@ -import QtQuick 2.15 +import QtQuick +import QtQuick.Controls QtObject { diff --git a/src/controls/FluProgressBar.qml b/src/controls/FluProgressBar.qml index 20bb6241..ba3ccaa7 100644 --- a/src/controls/FluProgressBar.qml +++ b/src/controls/FluProgressBar.qml @@ -1,12 +1,12 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 +import QtQuick +import QtQuick.Controls FluRectangle { id: control width: 150 height: 5 - radius: [3,3,3,3] + radius: [2.5,2.5,2.5,2.5] 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: 3 + radius: 2.5 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 f6bf84f7..1f99ad0c 100644 --- a/src/controls/FluProgressRing.qml +++ b/src/controls/FluProgressRing.qml @@ -1,6 +1,5 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 - +import QtQuick +import QtQuick.Controls Rectangle { id: control diff --git a/src/controls/FluRadioButton.qml b/src/controls/FluRadioButton.qml index cf2be038..3e46364a 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 76cb41a6..b0d8312c 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:root diff --git a/src/controls/FluScrollBar.qml b/src/controls/FluScrollBar.qml index 0f9c531e..b4e54820 100644 --- a/src/controls/FluScrollBar.qml +++ b/src/controls/FluScrollBar.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 ScrollBar { diff --git a/src/controls/FluScrollablePage.qml b/src/controls/FluScrollablePage.qml index e0cd5364..50991943 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 490718a2..32ac8149 100644 --- a/src/controls/FluShadow.qml +++ b/src/controls/FluShadow.qml @@ -1,4 +1,4 @@ -import QtQuick 2.15 +import QtQuick Item { id:root diff --git a/src/controls/FluSlider.qml b/src/controls/FluSlider.qml index 5bdfc5fa..ccce1100 100644 --- a/src/controls/FluSlider.qml +++ b/src/controls/FluSlider.qml @@ -1,12 +1,10 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtGraphicalEffects 1.15 +import QtQuick +import QtQuick.Controls Item{ id:root - property int lineSize: 4 property int size: 180 property int dotSize: 24 @@ -38,19 +36,18 @@ Item{ seek(0) } - FluRectangle { + Rectangle { id: control - width: isHorizontal ? size : root.lineSize - height: isHorizontal ? root.lineSize : size - radius: [3,3,3,3] - clip: true + width: isHorizontal ? size : 4 + height: isHorizontal ? 4 : size + radius: 2 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: 3 - width: isHorizontal ? control.width*(value/maxValue) : control.width - height: isHorizontal ? control.height : control.height*(value/maxValue) + radius: 2.5 + width: isHorizontal ? control.width*(value/maxValue) : 5 + height: isHorizontal ? 5 : control.height*(value/maxValue) color:FluTheme.isDark ? FluTheme.primaryColor.lighter :FluTheme.primaryColor.dark } } @@ -112,7 +109,6 @@ 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 ca5d5cc7..1ac8013f 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 6f4ecfdf..341f5f4b 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 ad31bae4..6bfc2136 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/FluTimePicker.qml b/src/controls/FluTimePicker.qml index e9f0e774..570c396d 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 { diff --git a/src/controls/FluToggleSwitch.qml b/src/controls/FluToggleSwitch.qml index ad627a8c..ea56a16c 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 QtQuick +import QtQuick.Controls +import FluentUI +import QtQuick.Layouts Button { diff --git a/src/controls/FluTooltip.qml b/src/controls/FluTooltip.qml index 822bd047..3439dc6a 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 01794450..b85f93ca 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 { id:root diff --git a/src/controls/FluWindow.qml b/src/controls/FluWindow.qml index cef9ccdd..fa4feb3a 100644 --- a/src/controls/FluWindow.qml +++ b/src/controls/FluWindow.qml @@ -1,8 +1,8 @@ -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.Controls +import QtQuick.Window +import QtQuick.Layouts +import FluentUI Item { @@ -127,19 +127,19 @@ Item { root: root } - function showSuccess(text,duration,moremsg){ + function showSuccess(text,duration=1000,moremsg){ infoBar.showSuccess(text,duration,moremsg); } - function showInfo(text,duration,moremsg){ + function showInfo(text,duration=1000,moremsg){ infoBar.showInfo(text,duration,moremsg); } - function showWarning(text,duration,moremsg){ + function showWarning(text,duration=1000,moremsg){ infoBar.showWarning(text,duration,moremsg); } - function showError(text,duration,moremsg){ + function showError(text,duration=1000,moremsg){ infoBar.showError(text,duration,moremsg); } 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 53abc4d4..d3a9b499 100644 --- a/src/controls/TFpsMonitor.qml +++ b/src/controls/TFpsMonitor.qml @@ -1,8 +1,7 @@ -import QtQuick 2.15 -import FluentUI 1.0 +import QtQuick +import QtQuick.Controls +import FluentUI - -/*! TODO */ Item { id: toou2d_fps width: contentItemLoader.width + 5;