main
朱子楚\zhuzi 2023-03-30 21:52:55 +08:00
parent 4829ce58fd
commit b5894158d2
97 changed files with 398 additions and 421 deletions

View File

@ -17,7 +17,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [macos-11.0] os: [macos-11.0]
qt_ver: [5.15.2] qt_ver: [6.4.3]
qt_arch: [clang_64] qt_arch: [clang_64]
env: env:
targetName: example targetName: example
@ -34,6 +34,7 @@ jobs:
with: with:
version: ${{ matrix.qt_ver }} version: ${{ matrix.qt_ver }}
cached: 'false' cached: 'false'
modules: 'all'
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
fetch-depth: 1 fetch-depth: 1

View File

@ -19,7 +19,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04] os: [ubuntu-20.04]
qt_ver: [5.15.2] qt_ver: [6.4.3]
qt_arch: [gcc_64] qt_arch: [gcc_64]
env: env:
targetName: example targetName: example
@ -29,6 +29,7 @@ jobs:
with: with:
version: ${{ matrix.qt_ver }} version: ${{ matrix.qt_ver }}
cached: 'false' cached: 'false'
modules: 'all'
- name: ubuntu install GL library - name: ubuntu install GL library
run: sudo apt-get install -y libglew-dev libglfw3-dev qml-module-qtquick-controls qml-module-qtquick-controls2 run: sudo apt-get install -y libglew-dev libglfw3-dev qml-module-qtquick-controls qml-module-qtquick-controls2
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -21,12 +21,7 @@ jobs:
# 矩阵配置 # 矩阵配置
matrix: matrix:
include: include:
# 5.15.2 参考 https://mirrors.cloud.tencent.com/qt/online/qtsdkrepository/windows_x86/desktop/qt5_5152/ - qt_ver: 6.4.3
- qt_ver: 5.15.2
qt_arch: win32_msvc2019
msvc_arch: x86
qt_arch_install: msvc2019
- qt_ver: 5.15.2
qt_arch: win64_msvc2019_64 qt_arch: win64_msvc2019_64
msvc_arch: x64 msvc_arch: x64
qt_arch_install: msvc2019_64 qt_arch_install: msvc2019_64
@ -38,7 +33,7 @@ jobs:
# 安装Qt # 安装Qt
- name: Install Qt - name: Install Qt
# 使用外部action。这个action专门用来安装Qt # 使用外部action。这个action专门用来安装Qt
uses: jurplel/install-qt-action@v2 uses: jurplel/install-qt-action@v3
with: with:
# Version of Qt to install # Version of Qt to install
version: ${{ matrix.qt_ver }} version: ${{ matrix.qt_ver }}
@ -46,6 +41,7 @@ jobs:
# target: ${{ matrix.qt_target }} # target: ${{ matrix.qt_target }}
arch: ${{ matrix.qt_arch }} arch: ${{ matrix.qt_arch }}
cached: 'false' cached: 'false'
modules: 'all'
aqtversion: '==2.0.5' aqtversion: '==2.0.5'
# 拉取代码 # 拉取代码
- uses: actions/checkout@v2 - uses: actions/checkout@v2

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
Window { Window {
id:app id:app

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
FluContentPage { FluContentPage {

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{
title:"Buttons" title:"Buttons"

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,9 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import "qrc:///global/" import "qrc:///global/"
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Window 2.15 import QtQuick.Window
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
FluScrollablePage{ FluScrollablePage{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
FluContentPage { FluContentPage {

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
FluContentPage { FluContentPage {

View File

@ -1,4 +1,4 @@
QT += quick concurrent network multimedia QT += quick quickcontrols2 concurrent network multimedia
CONFIG += c++11 CONFIG += c++11
DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT

View File

@ -1,7 +1,7 @@
pragma Singleton pragma Singleton
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
FluObject{ FluObject{
id:footer_items id:footer_items

View File

@ -1,7 +1,7 @@
pragma Singleton pragma Singleton
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
FluObject{ FluObject{

View File

@ -3,12 +3,13 @@
#include <QQmlContext> #include <QQmlContext>
#include <QDir> #include <QDir>
#include <QQuickWindow> #include <QQuickWindow>
#include <QQuickStyle>
#include <QProcess> #include <QProcess>
#include "ChatController.h" #include "ChatController.h"
QMap<QString, QVariant> properties(){ QMap<QString, QVariant> properties(){
QMap<QString, QVariant> map; QMap<QString, QVariant> map;
// map["installHelper"] = QVariant::fromValue(QVariant::fromValue(InstallHelper::getInstance())); // map["installHelper"] = QVariant::fromValue(QVariant::fromValue(InstallHelper::getInstance()));
return map; return map;
} }
@ -17,8 +18,8 @@ int main(int argc, char *argv[])
QCoreApplication::setOrganizationName("ZhuZiChu"); QCoreApplication::setOrganizationName("ZhuZiChu");
QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io"); QCoreApplication::setOrganizationDomain("https://zhuzichu520.github.io");
QCoreApplication::setApplicationName("FluentUI"); QCoreApplication::setApplicationName("FluentUI");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
// QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); QQuickStyle::setStyle("Basic");
QGuiApplication app(argc, argv); QGuiApplication app(argc, argv);
QQmlApplicationEngine engine; QQmlApplicationEngine engine;

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
FluWindow { FluWindow {
@ -17,6 +17,7 @@ FluWindow {
FluAppBar{ FluAppBar{
id:appbar id:appbar
title:"关于" title:"关于"
width:parent.width
} }
ColumnLayout{ ColumnLayout{

View File

@ -1,9 +1,9 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
import Controller 1.0 import Controller
import QtQuick.Dialogs 1.3 import QtQuick.Dialogs
FluWindow { FluWindow {
@ -43,6 +43,7 @@ FluWindow {
FluAppBar{ FluAppBar{
id:appbar id:appbar
title:"ChatGPT" title:"ChatGPT"
width:parent.width
} }
Component{ Component{

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
FluWindow { FluWindow {
@ -24,6 +24,7 @@ FluWindow {
FluAppBar{ FluAppBar{
id:appbar id:appbar
title:"登录" title:"登录"
width:parent.width
} }
ColumnLayout{ ColumnLayout{

View File

@ -1,9 +1,9 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import "qrc:///global/" import "qrc:///global/"
import FluentUI 1.0 import FluentUI
FluWindow { FluWindow {
id:rootwindow id:rootwindow
@ -17,6 +17,7 @@ FluWindow {
id:appbar id:appbar
z:10 z:10
showDark: true showDark: true
width:parent.width
} }

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Controls 2.15 import QtQuick.Controls
import "content" import "content"
Rectangle { Rectangle {

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Grid { Grid {
id: root id: root
property int cellSide: 5 property int cellSide: 5

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Item { Item {
property int cursorHeight: 7 property int cursorHeight: 7

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Row { Row {
property alias caption: captionBox.text property alias caption: captionBox.text

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Rectangle { Rectangle {
width : 40; height : 15; radius: 2 width : 40; height : 15; radius: 2

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Item { Item {
id: root id: root
@ -51,20 +51,12 @@ Item {
preventStealing: true preventStealing: true
function handleMouse(mouse) { function handleMouse(mouse) {
if (mouse.buttons & Qt.LeftButton) { if (mouse.buttons & Qt.LeftButton) {
pickerCursor.x = Math.max(0,Math.min(mouse.x - r,width-2*r)); 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.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) onPositionChanged:(mouse)=> handleMouse(mouse)
onPressed: handleMouse(mouse) onPressed:(mouse)=> handleMouse(mouse)
} }
} }

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
Rectangle{ Rectangle{
@ -23,11 +23,7 @@ Rectangle{
color: Qt.rgba(0,0,0,0) color: Qt.rgba(0,0,0,0)
visible: FluTheme.frameless visible: FluTheme.frameless
height: visible ? 30 : 0 height: visible ? 30 : 0
width: { clip: true
if(parent==null)
return 200
return parent.width
}
z: 65535 z: 65535
TapHandler { TapHandler {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
Rectangle { Rectangle {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
TextField{ TextField{

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Rectangle{ Rectangle{

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Button { Button {

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
Rectangle { Rectangle {
@ -59,7 +59,7 @@ Rectangle {
} }
Popup{ Menu{
id:popup id:popup
height: container.height height: container.height
width: container.width width: container.width
@ -79,18 +79,21 @@ Rectangle {
duration: 150 duration: 150
} }
} }
background: FluCalendarView{ contentItem: Item{
id:container anchors.fill: parent
onDateClicked: FluCalendarView{
(date)=>{ id:container
popup.close() onDateClicked:
var year = date.getFullYear() (date)=>{
var month = date.getMonth() popup.close()
var day = date.getDate() var year = date.getFullYear()
text_date.text = year+"-"+(month+1)+"-"+day var month = date.getMonth()
} var day = date.getDate()
text_date.text = year+"-"+(month+1)+"-"+day
}
}
} }
contentItem: Item{} background: Item{}
function showPopup() { function showPopup() {
var pos = root.mapToItem(null, 0, 0) var pos = root.mapToItem(null, 0, 0)
if(window.height>pos.y+root.height+popup.height){ if(window.height>pos.y+root.height+popup.height){

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
Button { Button {

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
Button{ Button{
@ -27,15 +27,19 @@ Button{
onClicked: { onClicked: {
popup.showPopup() popup.showPopup()
} }
Popup{ Menu{
id:popup id:popup
modal: true modal: true
dim:false dim:false
height: container.height height: container.height
width: container.width width: container.width
background: FluColorView{ contentItem: Item{
id:container anchors.fill: parent
FluColorView{
id:container
}
} }
background:Item{}
enter: Transition { enter: Transition {
NumberAnimation { NumberAnimation {
property: "y" property: "y"
@ -50,7 +54,6 @@ Button{
duration: 150 duration: 150
} }
} }
contentItem: Item{}
function showPopup() { function showPopup() {
var pos = control.mapToItem(null, 0, 0) var pos = control.mapToItem(null, 0, 0)
if(window.height>pos.y+control.height+popup.height){ if(window.height>pos.y+control.height+popup.height){

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
import "../colorpicker" import "../colorpicker"
Item { Item {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Window 2.15 import QtQuick.Window
Popup { Popup {
id: popup id: popup
@ -17,11 +17,11 @@ Popup {
return 400 return 400
return Math.min(Window.window.width,400) return Math.min(Window.window.width,400)
} }
modal:true modal:true
anchors.centerIn: Overlay.overlay anchors.centerIn: Overlay.overlay
closePolicy: Popup.CloseOnEscape closePolicy: Popup.CloseOnEscape
background: Rectangle { background:Item{}
contentItem: Rectangle {
id:layout_content id:layout_content
implicitWidth:minWidth implicitWidth:minWidth
implicitHeight: text_title.height + text_message.height + layout_actions.height implicitHeight: text_title.height + text_message.height + layout_actions.height

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
Rectangle { Rectangle {
@ -97,12 +97,11 @@ Rectangle {
text:"日" text:"日"
} }
Popup{ Menu{
id:popup id:popup
width: container.width
height: container.height
contentItem: Item{}
modal: true modal: true
width: 300
height: 340
dim:false dim:false
enter: Transition { enter: Transition {
NumberAnimation { NumberAnimation {
@ -118,12 +117,12 @@ Rectangle {
duration: 150 duration: 150
} }
} }
background: Rectangle{ background:Item{}
contentItem: Rectangle{
id:container id:container
width: 300
radius: 4 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) color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
height: 340
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
} }
@ -337,9 +336,7 @@ Rectangle {
popup.close() popup.close()
} }
} }
} }
} }
y:35 y:35
function showPopup() { function showPopup() {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
Rectangle { Rectangle {

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
Button { Button {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Button { Button {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Text { Text {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Button { Button {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
FluObject { FluObject {
id:infoBar 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 : ""); 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 : ""); 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 : ""); 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 : ""); mcontrol.create(mcontrol.const_error,text,duration,moremsg ? moremsg : "");
} }
function showCustom(itemcomponent,duration){ function showCustom(itemcomponent,duration=1000){
mcontrol.createCustom(itemcomponent,duration); mcontrol.createCustom(itemcomponent,duration);
} }

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import Qt5Compat.GraphicalEffects
Item{ Item{
id:control id:control

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtMultimedia 5.15 import QtMultimedia
import FluentUI 1.0 import FluentUI
Rectangle { Rectangle {
@ -26,22 +26,26 @@ Rectangle {
MediaPlayer { MediaPlayer {
id: mediaplayer id: mediaplayer
property bool autoSeek:true property bool autoSeek:true
autoPlay: true
source: control.source source: control.source
onError: { videoOutput: video_output
console.debug(error) audioOutput: AudioOutput{}
} onErrorChanged:(error)=> {
console.debug(error)
}
onPositionChanged: { onPositionChanged: {
if(autoSeek){ if(autoSeek){
slider.seek(mediaplayer.position*slider.maxValue/mediaplayer.duration) slider.seek(mediaplayer.position*slider.maxValue/mediaplayer.duration)
} }
} }
onStatusChanged: { onMediaStatusChanged:
if(status===6){ (status)=> {
slider.maxValue = mediaplayer.duration if(status===2){
showControl = true mediaplayer.play()
}else if(status===5){
slider.maxValue = mediaplayer.duration
showControl = true
}
} }
}
} }
onSourceChanged: { onSourceChanged: {
@ -49,8 +53,8 @@ Rectangle {
} }
VideoOutput { VideoOutput {
id:video_output
anchors.fill: parent anchors.fill: parent
source: mediaplayer
} }
Item{ Item{
@ -143,9 +147,9 @@ Rectangle {
} }
FluIconButton{ FluIconButton{
iconSize: 15 iconSize: 15
iconSource: mediaplayer.playbackState === Audio.PlayingState ? FluentIcons.Pause : FluentIcons.Play iconSource: mediaplayer.playbackState === MediaPlayer.PlayingState ? FluentIcons.Pause : FluentIcons.Play
onClicked: { onClicked: {
if(mediaplayer.playbackState === Audio.PlayingState){ if(mediaplayer.playbackState === MediaPlayer.PlayingState){
mediaplayer.pause() mediaplayer.pause()
}else{ }else{
mediaplayer.play() mediaplayer.play()

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Controls 2.15 import QtQuick.Controls
Menu { Menu {
@ -9,10 +9,8 @@ Menu {
id: popup id: popup
width: 140 width: 140
height: container.height height: container.height
modal: true modal:true
dim:false dim:false
contentItem: Item{}
enter: Transition { enter: Transition {
NumberAnimation { NumberAnimation {
property: "y" property: "y"
@ -27,8 +25,8 @@ Menu {
duration: animEnabled ? 150 : 0 duration: animEnabled ? 150 : 0
} }
} }
background:Item{}
background: Item { contentItem: Item {
Rectangle{ Rectangle{
anchors.fill: parent 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) color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,0.97) : Qt.rgba(237/255,237/255,237/255,0.97)

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
Item { Item {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
TextArea{ TextArea{

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
QtObject { QtObject {
id:flu_object; id:flu_object;

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
QtObject { QtObject {
readonly property string key : FluApp.uuid() readonly property string key : FluApp.uuid()

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
QtObject { QtObject {
readonly property string key : FluApp.uuid() readonly property string key : FluApp.uuid()

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
QtObject { QtObject {
readonly property string key : FluApp.uuid() readonly property string key : FluApp.uuid()

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick
import QtQuick.Controls 2.12 import QtQuick.Controls
FluRectangle { FluRectangle {

View File

@ -1,5 +1,5 @@
import QtQuick 2.12 import QtQuick
import QtQuick.Controls 2.12 import QtQuick.Controls
Rectangle { Rectangle {

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
Button { Button {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import Qt5Compat.GraphicalEffects
Item{ Item{
id:control id:control

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Controls.impl 2.15 import QtQuick.Controls.impl 2.15
import QtQuick.Templates 2.15 as T import QtQuick.Templates 2.15 as T
import FluentUI 1.0 import FluentUI
T.ScrollBar { T.ScrollBar {
id: control id: control

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,4 +1,4 @@
import QtQuick 2.15 import QtQuick
Item { Item {

View File

@ -1,6 +1,6 @@
import QtQuick 2.12 import QtQuick
import QtQuick.Controls 2.12 import QtQuick.Controls
import QtGraphicalEffects 1.15 import Qt5Compat.GraphicalEffects
Item{ Item{

View File

@ -1,7 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
Item { Item {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
Text { Text {

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
TextField{ TextField{

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import QtGraphicalEffects 1.15 import Qt5Compat.GraphicalEffects
Rectangle{ Rectangle{
id:content id:content

View File

@ -1,6 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
Button { Button {

View File

@ -1,8 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import FluentUI 1.0 import FluentUI
Rectangle { Rectangle {
@ -101,9 +101,8 @@ Rectangle {
Popup{ Popup{
id:popup id:popup
width: container.width width: 300
height: container.height height: 340
contentItem: Item{}
modal: true modal: true
dim:false dim:false
enter: Transition { enter: Transition {
@ -120,12 +119,12 @@ Rectangle {
duration: 150 duration: 150
} }
} }
background: Rectangle{ background:Item{}
contentItem: Rectangle{
id:container id:container
width: 300 anchors.fill: parent
radius: 4 radius: 4
color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1) color: FluTheme.dark ? Qt.rgba(51/255,48/255,48/255,1) : Qt.rgba(248/255,250/255,253/255,1)
height: 340
MouseArea{ MouseArea{
anchors.fill: parent anchors.fill: parent
} }

View File

@ -1,7 +1,7 @@
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import FluentUI 1.0 import FluentUI
import QtQuick.Layouts 1.15 import QtQuick.Layouts
Button { Button {

View File

@ -1,7 +1,6 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtGraphicalEffects 1.15 import FluentUI
import FluentUI 1.0
ToolTip { ToolTip {
id:tool_tip id:tool_tip

View File

@ -1,9 +1,8 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import QtQuick.Controls 2.15 import QtQuick.Controls
import FluentUI 1.0 import FluentUI
import QtGraphicalEffects 1.15
Item { Item {

View File

@ -1,8 +1,7 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Window 2.15 import QtQuick.Window
import QtQuick.Layouts 1.15 import QtQuick.Layouts
import FluentUI 1.0 import FluentUI
import QtGraphicalEffects 1.15
Item { Item {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import QtQuick.Window 2.15 import QtQuick.Window
MouseArea { MouseArea {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15 import QtQuick
import FluentUI 1.0 import FluentUI
Item { Item {