diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 12fad62..01b8468 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 8ce06b2..6804a49 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 1efbead..7d75e33 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 9f12c29..1cc72f3 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 fa690bb..6e3f4be 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 ed80ad0..cdf7e57 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 8358a4f..05211cd 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 6c3d736..a110172 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 d28ad3f..8737bd6 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 4db8714..1b285e1 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 eb5c306..d7137cb 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 3abe00c..853e4b2 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 6da702a..33fcfa2 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 08d7cc9..9844201 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 af9feb5..daa817f 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 05b5c71..9ff659a 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 2b9cb1e..85235af 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 aff8713..a3e3c86 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 b730336..afbd329 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 a0311db..885df12 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 e06f4a6..1ebe984 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 d020b00..a79d396 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 5dc8925..c4c9613 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 ef249fc..bf3a1fd 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 feaa7a3..55f0e3a 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 b86308e..96dc336 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 81f713a..1062734 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 c7262f1..de43acd 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 fc2205b..82fc780 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 69dc4c5..0031615 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 ab1b4c5..7ffcfbd 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 749e04d..24acd5f 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 4b4a066..1643221 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 e73ce6a..1b0c532 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 c2581b3..7c7f821 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 731f8fe..c1d0ec2 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 dd1d03a..7e402eb 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 d7b5129..1f00e77 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 b691f56..e60cd11 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 4fef59e..94df408 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 2cb2507..10f1abf 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 d74059c..4be8860 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 17454a4..3dd03fb 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 dfbda0f..2173c32 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 aa6051f..2b752e1 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 81d20a7..b9411b2 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 17cc78e..1159124 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 29d24b0..80e5ddb 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 18f60d8..ac2cac7 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 0c4f617..acc4d06 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 1a4d9cd..3e00575 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 1943c06..46657f1 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 297cd36..0e63ea4 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 edb8660..d8084ee 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 3dc8e49..ea967ac 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 f8c78e1..4f573b8 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 d165452..aa38e2b 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 52708c0..db600ea 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 7c50356..8875b9e 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 4889470..c33ca3f 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 374bc07..a4b538c 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 63d4789..cc42808 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 9dfda86..8b7e187 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 20bb624..ba3ccaa 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 f6bf84f..1f99ad0 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 cf2be03..3e46364 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 76cb41a..b0d8312 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 0f9c531..b4e5482 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 e0cd536..5099194 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 490718a..32ac814 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 5bdfc5f..ccce110 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 ca5d5cc..1ac8013 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 6f4ecfd..341f5f4 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 ad31bae..6bfc213 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 e9f0e77..570c396 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 ad627a8..ea56a16 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 822bd04..3439dc6 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 0179445..b85f93c 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 cef9ccd..fa4feb3 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 37b3319..ab43562 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 53abc4d..d3a9b49 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;