This commit is contained in:
朱子楚\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:
matrix:
os: [macos-11.0]
qt_ver: [5.15.2]
qt_ver: [6.4.3]
qt_arch: [clang_64]
env:
targetName: example
@ -34,6 +34,7 @@ jobs:
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
modules: 'all'
- uses: actions/checkout@v2
with:
fetch-depth: 1

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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{

View File

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

View File

@ -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 {

View File

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

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

@ -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 {

View File

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

View File

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

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

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

View File

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

View File

@ -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 {

View File

@ -1,5 +1,5 @@
import QtQuick 2.15
import FluentUI 1.0
import QtQuick
import FluentUI
FluObject {
id:infoBar
@ -208,23 +208,23 @@ FluObject {
}
}
function showSuccess(text,duration,moremsg){
function showSuccess(text,duration=1000,moremsg){
mcontrol.create(mcontrol.const_success,text,duration,moremsg ? moremsg : "");
}
function showInfo(text,duration,moremsg){
function showInfo(text,duration=1000,moremsg){
mcontrol.create(mcontrol.const_info,text,duration,moremsg ? moremsg : "");
}
function showWarning(text,duration,moremsg){
function showWarning(text,duration=1000,moremsg){
mcontrol.create(mcontrol.const_warning,text,duration,moremsg ? moremsg : "");
}
function showError(text,duration,moremsg){
function showError(text,duration=1000,moremsg){
mcontrol.create(mcontrol.const_error,text,duration,moremsg ? moremsg : "");
}
function showCustom(itemcomponent,duration){
function showCustom(itemcomponent,duration=1000){
mcontrol.createCustom(itemcomponent,duration);
}

View File

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

View File

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

View File

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

View File

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

View File

@ -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{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 {

View File

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

View File

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

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

@ -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{

View File

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

View File

@ -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 {

View File

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

View File

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

View File

@ -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

View File

@ -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 {

View File

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

View File

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

View File

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