mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-10 16:55:40 +08:00
Compare commits
14 Commits
875bba2bd6
...
a9ceff8f6f
Author | SHA1 | Date | |
---|---|---|---|
|
a9ceff8f6f | ||
|
8ab0cde2e9 | ||
|
0b371ecd3f | ||
|
0171c3609a | ||
|
489526988d | ||
|
9d32e8e13b | ||
|
c9e0732f99 | ||
|
4920407ed7 | ||
|
3647197d3b | ||
|
a72ff03eeb | ||
|
3eaaa228d8 | ||
|
e0892fdb66 | ||
|
8f5fbb4053 | ||
|
b5295ffe4c |
@ -1,3 +1,6 @@
|
|||||||
|
# ATTENTION! THIS REPO HAS BEEN DEPRECATED!
|
||||||
|
# PLEASE USE THE BRAND NEW [FluentUI2](https://github.com/zhuzichu520/FluentUI2) INSTEAD!
|
||||||
|
# THIS REPO IS NO LONGER MAINTAINED.
|
||||||
<div align=center>
|
<div align=center>
|
||||||
<img width=64 src="doc/preview/fluent_design.svg">
|
<img width=64 src="doc/preview/fluent_design.svg">
|
||||||
|
|
||||||
|
@ -15,7 +15,9 @@ Canvas {
|
|||||||
function animateToNewData()
|
function animateToNewData()
|
||||||
{
|
{
|
||||||
chartAnimationProgress = 0.1;
|
chartAnimationProgress = 0.1;
|
||||||
d.jsChart.update();
|
if (d.jsChart) {
|
||||||
|
d.jsChart.update();
|
||||||
|
}
|
||||||
chartAnimator.restart();
|
chartAnimator.restart();
|
||||||
}
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
|
@ -107,7 +107,7 @@ T.ComboBox {
|
|||||||
y: control.height
|
y: control.height
|
||||||
width: control.width
|
width: control.width
|
||||||
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
|
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
|
||||||
topMargin: 6
|
topMargin: 32
|
||||||
bottomMargin: 6
|
bottomMargin: 6
|
||||||
modal: true
|
modal: true
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
|
@ -41,7 +41,7 @@ FluPopup {
|
|||||||
FluText{
|
FluText{
|
||||||
id:text_message
|
id:text_message
|
||||||
font: FluTextStyle.Body
|
font: FluTextStyle.Body
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
text:message
|
text:message
|
||||||
width: parent.width
|
width: parent.width
|
||||||
topPadding: 4
|
topPadding: 4
|
||||||
@ -67,7 +67,7 @@ FluPopup {
|
|||||||
topPadding: 20
|
topPadding: 20
|
||||||
leftPadding: 20
|
leftPadding: 20
|
||||||
rightPadding: 20
|
rightPadding: 20
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
FluLoader{
|
FluLoader{
|
||||||
sourceComponent: com_message
|
sourceComponent: com_message
|
||||||
|
@ -190,13 +190,13 @@ FluObject {
|
|||||||
spacing: 5
|
spacing: 5
|
||||||
FluText{
|
FluText{
|
||||||
text:_super.text
|
text:_super.text
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text: _super.moremsg
|
text: _super.moremsg
|
||||||
visible: _super.moremsg
|
visible: _super.moremsg
|
||||||
wrapMode : Text.WrapAnywhere
|
wrapMode : Text.WordWrap
|
||||||
textColor: FluColors.Grey120
|
textColor: FluColors.Grey120
|
||||||
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ TextArea{
|
|||||||
return normalColor
|
return normalColor
|
||||||
}
|
}
|
||||||
font:FluTextStyle.Body
|
font:FluTextStyle.Body
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
padding: 8
|
padding: 8
|
||||||
leftPadding: padding+4
|
leftPadding: padding+4
|
||||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
|
@ -41,13 +41,15 @@ ProgressBar{
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
radius: d._radius
|
radius: d._radius
|
||||||
color: control.color
|
color: control.color
|
||||||
PropertyAnimation on x {
|
SequentialAnimation on x {
|
||||||
id:animator_x
|
id: animator_x
|
||||||
running: control.indeterminate && control.visible
|
running: control.indeterminate && control.visible
|
||||||
from: -rect_progress.width
|
|
||||||
to:control.width+rect_progress.width
|
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
duration: control.duration
|
PropertyAnimation {
|
||||||
|
from: -rect_progress.width
|
||||||
|
to: control.width + rect_progress.width
|
||||||
|
duration: control.duration
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,11 @@ import QtQuick.Controls 2.15
|
|||||||
import FluentUI 1.0
|
import FluentUI 1.0
|
||||||
|
|
||||||
FluPage {
|
FluPage {
|
||||||
|
property bool autoResetScroll: false
|
||||||
default property alias content: container.data
|
default property alias content: container.data
|
||||||
|
|
||||||
Flickable{
|
Flickable{
|
||||||
|
id: flickable
|
||||||
clip: true
|
clip: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
@ -17,4 +20,14 @@ FluPage {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetScroll() {
|
||||||
|
flickable.contentY = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
StackView.onActivated: {
|
||||||
|
if (autoResetScroll) {
|
||||||
|
resetScroll(); // Call this function to reset the scroll position to the top
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ Item{
|
|||||||
Component{
|
Component{
|
||||||
id:com_lable
|
id:com_lable
|
||||||
FluText{
|
FluText{
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||||
text: {
|
text: {
|
||||||
if(modelData.lable){
|
if(modelData.lable){
|
||||||
@ -113,7 +113,7 @@ Item{
|
|||||||
Component{
|
Component{
|
||||||
id:com_text
|
id:com_text
|
||||||
FluText{
|
FluText{
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||||
text: modelData.text
|
text: modelData.text
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
|
@ -175,7 +175,7 @@ Popup{
|
|||||||
FluText{
|
FluText{
|
||||||
id: text_desc
|
id: text_desc
|
||||||
font: FluTextStyle.Body
|
font: FluTextStyle.Body
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
maximumLineCount: 4
|
maximumLineCount: 4
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: {
|
text: {
|
||||||
|
@ -14,7 +14,9 @@ Canvas {
|
|||||||
function animateToNewData()
|
function animateToNewData()
|
||||||
{
|
{
|
||||||
chartAnimationProgress = 0.1;
|
chartAnimationProgress = 0.1;
|
||||||
d.jsChart.update();
|
if (d.jsChart) {
|
||||||
|
d.jsChart.update();
|
||||||
|
}
|
||||||
chartAnimator.restart();
|
chartAnimator.restart();
|
||||||
}
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
|
@ -107,7 +107,7 @@ T.ComboBox {
|
|||||||
y: control.height
|
y: control.height
|
||||||
width: control.width
|
width: control.width
|
||||||
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
|
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
|
||||||
topMargin: 6
|
topMargin: 32
|
||||||
bottomMargin: 6
|
bottomMargin: 6
|
||||||
modal: true
|
modal: true
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
|
@ -41,7 +41,7 @@ FluPopup {
|
|||||||
FluText{
|
FluText{
|
||||||
id:text_message
|
id:text_message
|
||||||
font: FluTextStyle.Body
|
font: FluTextStyle.Body
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
text:message
|
text:message
|
||||||
width: parent.width
|
width: parent.width
|
||||||
topPadding: 4
|
topPadding: 4
|
||||||
@ -67,7 +67,7 @@ FluPopup {
|
|||||||
topPadding: 20
|
topPadding: 20
|
||||||
leftPadding: 20
|
leftPadding: 20
|
||||||
rightPadding: 20
|
rightPadding: 20
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
}
|
}
|
||||||
FluLoader{
|
FluLoader{
|
||||||
sourceComponent: com_message
|
sourceComponent: com_message
|
||||||
|
@ -190,13 +190,13 @@ FluObject {
|
|||||||
spacing: 5
|
spacing: 5
|
||||||
FluText{
|
FluText{
|
||||||
text:_super.text
|
text:_super.text
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
||||||
}
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text: _super.moremsg
|
text: _super.moremsg
|
||||||
visible: _super.moremsg
|
visible: _super.moremsg
|
||||||
wrapMode : Text.WrapAnywhere
|
wrapMode : Text.WordWrap
|
||||||
textColor: FluColors.Grey120
|
textColor: FluColors.Grey120
|
||||||
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
width: Math.min(implicitWidth,mcontrol.maxWidth)
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ TextArea{
|
|||||||
return normalColor
|
return normalColor
|
||||||
}
|
}
|
||||||
font:FluTextStyle.Body
|
font:FluTextStyle.Body
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
padding: 8
|
padding: 8
|
||||||
leftPadding: padding+4
|
leftPadding: padding+4
|
||||||
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
renderType: FluTheme.nativeText ? Text.NativeRendering : Text.QtRendering
|
||||||
|
@ -42,13 +42,15 @@ ProgressBar{
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
radius: d._radius
|
radius: d._radius
|
||||||
color: control.color
|
color: control.color
|
||||||
PropertyAnimation on x {
|
SequentialAnimation on x {
|
||||||
id:animator_x
|
id: animator_x
|
||||||
running: control.indeterminate && control.visible
|
running: control.indeterminate && control.visible
|
||||||
from: -rect_progress.width
|
|
||||||
to:control.width+rect_progress.width
|
|
||||||
loops: Animation.Infinite
|
loops: Animation.Infinite
|
||||||
duration: control.duration
|
PropertyAnimation {
|
||||||
|
from: -rect_progress.width
|
||||||
|
to: control.width + rect_progress.width
|
||||||
|
duration: control.duration
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,11 @@ import QtQuick.Controls
|
|||||||
import FluentUI
|
import FluentUI
|
||||||
|
|
||||||
FluPage {
|
FluPage {
|
||||||
|
property bool autoResetScroll: false
|
||||||
default property alias content: container.data
|
default property alias content: container.data
|
||||||
|
|
||||||
Flickable{
|
Flickable{
|
||||||
|
id: flickable
|
||||||
clip: true
|
clip: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ScrollBar.vertical: FluScrollBar {}
|
ScrollBar.vertical: FluScrollBar {}
|
||||||
@ -17,4 +20,14 @@ FluPage {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetScroll() {
|
||||||
|
flickable.contentY = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
StackView.onActivated: {
|
||||||
|
if (autoResetScroll) {
|
||||||
|
resetScroll(); // Call this function to reset the scroll position to the top
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ Item{
|
|||||||
Component{
|
Component{
|
||||||
id:com_lable
|
id:com_lable
|
||||||
FluText{
|
FluText{
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||||
text: {
|
text: {
|
||||||
if(modelData.lable){
|
if(modelData.lable){
|
||||||
@ -113,7 +113,7 @@ Item{
|
|||||||
Component{
|
Component{
|
||||||
id:com_text
|
id:com_text
|
||||||
FluText{
|
FluText{
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
horizontalAlignment: isRight ? Qt.AlignRight : Qt.AlignLeft
|
||||||
text: modelData.text
|
text: modelData.text
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
|
@ -175,7 +175,7 @@ Popup{
|
|||||||
FluText{
|
FluText{
|
||||||
id: text_desc
|
id: text_desc
|
||||||
font: FluTextStyle.Body
|
font: FluTextStyle.Body
|
||||||
wrapMode: Text.WrapAnywhere
|
wrapMode: Text.WordWrap
|
||||||
maximumLineCount: 4
|
maximumLineCount: 4
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
text: {
|
text: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user