mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-30 15:06:52 +08:00
update
This commit is contained in:
parent
0810572e27
commit
1ecc1bd569
@ -12,7 +12,7 @@ FluTextStyle::FluTextStyle(QObject *parent)
|
||||
Body(body);
|
||||
|
||||
QFont bodyStrong;
|
||||
bodyStrong.setPixelSize(14);
|
||||
bodyStrong.setPixelSize(13);
|
||||
bodyStrong.setBold(true);
|
||||
BodyStrong(bodyStrong);
|
||||
|
||||
|
@ -11,6 +11,7 @@ FluPopup {
|
||||
property string neutralText: "Neutral"
|
||||
property string negativeText: "Negative"
|
||||
property string positiveText: "Positive"
|
||||
property int delayTime: 100
|
||||
signal neutralClicked
|
||||
signal negativeClicked
|
||||
signal positiveClicked
|
||||
@ -88,7 +89,8 @@ FluPopup {
|
||||
text: neutralText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
neutralClicked()
|
||||
timer_delay.targetFlags = FluContentDialog.NeutralButton
|
||||
timer_delay.restart()
|
||||
}
|
||||
}
|
||||
FluButton{
|
||||
@ -99,7 +101,8 @@ FluPopup {
|
||||
text: negativeText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
negativeClicked()
|
||||
timer_delay.targetFlags = FluContentDialog.NegativeButton
|
||||
timer_delay.restart()
|
||||
}
|
||||
}
|
||||
FluFilledButton{
|
||||
@ -110,10 +113,27 @@ FluPopup {
|
||||
text: positiveText
|
||||
onClicked: {
|
||||
popup.close()
|
||||
positiveClicked()
|
||||
timer_delay.targetFlags = FluContentDialog.PositiveButton
|
||||
timer_delay.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer{
|
||||
property int targetFlags
|
||||
id:timer_delay
|
||||
interval: popup.delayTime
|
||||
onTriggered: {
|
||||
if(targetFlags === FluContentDialog.NegativeButton){
|
||||
negativeClicked()
|
||||
}
|
||||
if(targetFlags === FluContentDialog.NeutralButton){
|
||||
neutralClicked()
|
||||
}
|
||||
if(targetFlags === FluContentDialog.PositiveButton){
|
||||
positiveClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,5 +3,5 @@ import QtQuick.Window
|
||||
import FluentUI
|
||||
|
||||
Rectangle {
|
||||
color: FluTheme.dark ? Qt.rgba(60/255,60/255,60/255,1) : Qt.rgba(210/255,210/255,210/255,1)
|
||||
color: FluTheme.dark ? Qt.rgba(80/255,80/255,80/255,1) : Qt.rgba(210/255,210/255,210/255,1)
|
||||
}
|
||||
|
@ -24,13 +24,15 @@ Item {
|
||||
property Component autoSuggestBox
|
||||
property Component actionItem
|
||||
property int topPadding: 0
|
||||
property int navWidth: 300
|
||||
property int pageMode: FluNavigationView.Stack
|
||||
signal logoClicked
|
||||
id:control
|
||||
QtObject{
|
||||
id:d
|
||||
property bool animDisabled:false
|
||||
property var stackItems: []
|
||||
property int displayMode: FluNavigationView.Open
|
||||
property int displayMode: control.displayMode
|
||||
property bool enableNavigationPanel: false
|
||||
property bool isCompact: d.displayMode === FluNavigationView.Compact
|
||||
property bool isMinimal: d.displayMode === FluNavigationView.Minimal
|
||||
@ -88,6 +90,14 @@ Item {
|
||||
return FluNavigationView.Open
|
||||
}
|
||||
})
|
||||
timer_anim_delay.restart()
|
||||
}
|
||||
Timer{
|
||||
id:timer_anim_delay
|
||||
interval: 200
|
||||
onTriggered: {
|
||||
d.animDisabled = true
|
||||
}
|
||||
}
|
||||
Connections{
|
||||
target: d
|
||||
@ -128,7 +138,7 @@ Item {
|
||||
return 30
|
||||
}
|
||||
Behavior on height {
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 83
|
||||
}
|
||||
@ -233,7 +243,7 @@ Item {
|
||||
return true
|
||||
}
|
||||
Behavior on rotation {
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.OutCubic
|
||||
@ -320,7 +330,7 @@ Item {
|
||||
id:com_panel_item
|
||||
Item{
|
||||
Behavior on height {
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 83
|
||||
}
|
||||
@ -560,13 +570,13 @@ Item {
|
||||
visible: opacity
|
||||
opacity: d.isMinimal
|
||||
Behavior on opacity{
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 83
|
||||
}
|
||||
}
|
||||
Behavior on Layout.preferredWidth {
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.OutCubic
|
||||
@ -661,11 +671,11 @@ Item {
|
||||
if(d.isCompact){
|
||||
return 50
|
||||
}
|
||||
return 300
|
||||
return control.navWidth
|
||||
}
|
||||
}
|
||||
Behavior on anchors.leftMargin {
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.OutCubic
|
||||
@ -688,7 +698,7 @@ Item {
|
||||
if(d.isCompactAndNotPanel){
|
||||
return 50
|
||||
}
|
||||
return 300
|
||||
return control.navWidth
|
||||
}
|
||||
anchors{
|
||||
top: parent.top
|
||||
@ -704,14 +714,14 @@ Item {
|
||||
}
|
||||
x: visible ? 0 : -width
|
||||
Behavior on width {
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
Behavior on x {
|
||||
enabled: FluTheme.enableAnimation
|
||||
enabled: FluTheme.enableAnimation && d.animDisabled
|
||||
NumberAnimation{
|
||||
duration: 167
|
||||
easing.type: Easing.OutCubic
|
||||
@ -793,7 +803,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
model:d.handleItems()
|
||||
boundsBehavior: ListView.StopAtBounds
|
||||
highlightMoveDuration: FluTheme.enableAnimation ? 167 : 0
|
||||
highlightMoveDuration: FluTheme.enableAnimation && d.animDisabled ? 167 : 0
|
||||
highlight: Item{
|
||||
clip: true
|
||||
Rectangle{
|
||||
|
Loading…
Reference in New Issue
Block a user