update
parent
cb94db8a97
commit
88fed82260
|
@ -6,7 +6,7 @@
|
||||||
AppInfo::AppInfo(QObject *parent)
|
AppInfo::AppInfo(QObject *parent)
|
||||||
: QObject{parent}
|
: QObject{parent}
|
||||||
{
|
{
|
||||||
version("1.2.4");
|
version("1.2.5");
|
||||||
lang(new En());
|
lang(new En());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ FluScrollablePage{
|
||||||
|
|
||||||
FluPivot{
|
FluPivot{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
currentIndex: 2
|
||||||
FluPivotItem{
|
FluPivotItem{
|
||||||
title:"All"
|
title:"All"
|
||||||
contentItem:FluText{
|
contentItem:FluText{
|
||||||
|
|
|
@ -26,13 +26,25 @@ FluWindow {
|
||||||
SystemTrayIcon {
|
SystemTrayIcon {
|
||||||
visible: true
|
visible: true
|
||||||
icon.source: "qrc:/res/image/favicon.ico"
|
icon.source: "qrc:/res/image/favicon.ico"
|
||||||
|
tooltip: "FluentUI"
|
||||||
onActivated: {
|
menu: Menu {
|
||||||
|
MenuItem {
|
||||||
|
text: "退出"
|
||||||
|
onTriggered: {
|
||||||
|
window.destoryWindow()
|
||||||
|
FluApp.closeApp()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onActivated:
|
||||||
|
(reason)=>{
|
||||||
|
if(reason === SystemTrayIcon.Trigger){
|
||||||
window.show()
|
window.show()
|
||||||
window.raise()
|
window.raise()
|
||||||
window.requestActivate()
|
window.requestActivate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
FluNavigationView{
|
FluNavigationView{
|
||||||
|
|
|
@ -127,3 +127,7 @@ void FluApp::clipText(const QString& text){
|
||||||
QString FluApp::uuid(){
|
QString FluApp::uuid(){
|
||||||
return QUuid::createUuid().toString();
|
return QUuid::createUuid().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FluApp::closeApp(){
|
||||||
|
qApp->exit(0);
|
||||||
|
}
|
||||||
|
|
|
@ -34,6 +34,8 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE QString uuid();
|
Q_INVOKABLE QString uuid();
|
||||||
|
|
||||||
|
Q_INVOKABLE void closeApp();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QMap<quint64, QQuickWindow*> wnds;
|
QMap<quint64, QQuickWindow*> wnds;
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -14,11 +14,6 @@ bool NativeEventFilter::nativeEventFilter(const QByteArray &eventType, void *mes
|
||||||
if (msg == Q_NULLPTR)
|
if (msg == Q_NULLPTR)
|
||||||
return false;
|
return false;
|
||||||
switch(msg->message) {
|
switch(msg->message) {
|
||||||
case WM_COMMAND: {
|
|
||||||
SendMessage(msg->hwnd, WM_SYSCOMMAND, msg->wParam, msg->lParam);
|
|
||||||
*result = DefWindowProc(msg->hwnd, msg->message, msg->wParam, msg->lParam);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
case WM_NCCALCSIZE:{
|
case WM_NCCALCSIZE:{
|
||||||
NCCALCSIZE_PARAMS& params = *reinterpret_cast<NCCALCSIZE_PARAMS*>(msg->lParam);
|
NCCALCSIZE_PARAMS& params = *reinterpret_cast<NCCALCSIZE_PARAMS*>(msg->lParam);
|
||||||
if (params.rgrc[0].top != 0)
|
if (params.rgrc[0].top != 0)
|
||||||
|
|
|
@ -67,21 +67,26 @@ Rectangle {
|
||||||
modal: true
|
modal: true
|
||||||
dim:false
|
dim:false
|
||||||
enter: Transition {
|
enter: Transition {
|
||||||
NumberAnimation {
|
reversible: true
|
||||||
property: "y"
|
|
||||||
from:0
|
|
||||||
to:popup.y
|
|
||||||
duration: 150
|
|
||||||
}
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from:0
|
from:0
|
||||||
to:1
|
to:1
|
||||||
duration: 150
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exit:Transition {
|
||||||
|
NumberAnimation {
|
||||||
|
property: "opacity"
|
||||||
|
from:1
|
||||||
|
to:0
|
||||||
|
duration: 83
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
contentItem: Item{
|
contentItem: Item{
|
||||||
anchors.fill: parent
|
clip: true
|
||||||
FluCalendarView{
|
FluCalendarView{
|
||||||
id:container
|
id:container
|
||||||
onDateClicked:
|
onDateClicked:
|
||||||
|
@ -94,15 +99,19 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background: Item{}
|
background: Item{
|
||||||
|
FluShadow{
|
||||||
|
radius: 5
|
||||||
|
}
|
||||||
|
}
|
||||||
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+container.height){
|
||||||
popup.y = control.height
|
popup.y = control.height
|
||||||
} else if(pos.y>popup.height){
|
} else if(pos.y>container.height){
|
||||||
popup.y = -popup.height
|
popup.y = -container.height
|
||||||
} else {
|
} else {
|
||||||
popup.y = window.height-(pos.y+popup.height)
|
popup.y = window.height-(pos.y+container.height)
|
||||||
}
|
}
|
||||||
popup.x = -(popup.width-control.width)/2
|
popup.x = -(popup.width-control.width)/2
|
||||||
popup.open()
|
popup.open()
|
||||||
|
|
|
@ -33,34 +33,42 @@ FluControl{
|
||||||
height: container.height
|
height: container.height
|
||||||
width: container.width
|
width: container.width
|
||||||
contentItem: Item{
|
contentItem: Item{
|
||||||
anchors.fill: parent
|
clip: true
|
||||||
FluColorView{
|
FluColorView{
|
||||||
id:container
|
id:container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background:Item{}
|
background:Item{
|
||||||
enter: Transition {
|
FluShadow{
|
||||||
NumberAnimation {
|
radius: 5
|
||||||
property: "y"
|
|
||||||
from:0
|
|
||||||
to:popup.y
|
|
||||||
duration: 150
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
enter: Transition {
|
||||||
|
reversible: true
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from:0
|
from:0
|
||||||
to:1
|
to:1
|
||||||
duration: 150
|
duration: 83
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit:Transition {
|
||||||
|
NumberAnimation {
|
||||||
|
property: "opacity"
|
||||||
|
from:1
|
||||||
|
to:0
|
||||||
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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+container.height){
|
||||||
popup.y = control.height
|
popup.y = control.height
|
||||||
} else if(pos.y>popup.height){
|
} else if(pos.y>container.height){
|
||||||
popup.y = -popup.height
|
popup.y = -container.height
|
||||||
} else {
|
} else {
|
||||||
popup.y = window.height-(pos.y+popup.height)
|
popup.y = window.height-(pos.y+container.height)
|
||||||
}
|
}
|
||||||
popup.x = -(popup.width-control.width)/2
|
popup.x = -(popup.width-control.width)/2
|
||||||
popup.open()
|
popup.open()
|
||||||
|
|
|
@ -100,28 +100,39 @@ Rectangle {
|
||||||
Menu{
|
Menu{
|
||||||
id:popup
|
id:popup
|
||||||
modal: true
|
modal: true
|
||||||
width: 300
|
width: container.width
|
||||||
height: 340
|
height: container.height
|
||||||
dim:false
|
dim:false
|
||||||
enter: Transition {
|
enter: Transition {
|
||||||
NumberAnimation {
|
reversible: true
|
||||||
property: "y"
|
|
||||||
from:0
|
|
||||||
to:popup.y
|
|
||||||
duration: 150
|
|
||||||
}
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from:0
|
from:0
|
||||||
to:1
|
to:1
|
||||||
duration: 150
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background:Item{}
|
|
||||||
contentItem: Rectangle{
|
exit:Transition {
|
||||||
|
NumberAnimation {
|
||||||
|
property: "opacity"
|
||||||
|
from:1
|
||||||
|
to:0
|
||||||
|
duration: 83
|
||||||
|
}
|
||||||
|
}
|
||||||
|
background:Item{
|
||||||
|
FluShadow{
|
||||||
|
radius: 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentItem: Item{
|
||||||
|
clip: true
|
||||||
|
Rectangle{
|
||||||
id:container
|
id:container
|
||||||
radius: 4
|
radius: 4
|
||||||
anchors.fill: parent
|
width: 300
|
||||||
|
height: 340
|
||||||
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)
|
||||||
MouseArea{
|
MouseArea{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -338,6 +349,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
y:35
|
y:35
|
||||||
function showPopup() {
|
function showPopup() {
|
||||||
changeFlag = true
|
changeFlag = true
|
||||||
|
@ -362,12 +374,12 @@ Rectangle {
|
||||||
text_day.text = day
|
text_day.text = day
|
||||||
|
|
||||||
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+container.height){
|
||||||
popup.y = root.height
|
popup.y = root.height
|
||||||
} else if(pos.y>popup.height){
|
} else if(pos.y>container.height){
|
||||||
popup.y = -popup.height
|
popup.y = -container.height
|
||||||
} else {
|
} else {
|
||||||
popup.y = window.height-(pos.y+popup.height)
|
popup.y = window.height-(pos.y+container.height)
|
||||||
}
|
}
|
||||||
popup.open()
|
popup.open()
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,12 +76,13 @@ FluControl {
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var pos = control.mapToItem(null, 0, 0)
|
var pos = control.mapToItem(null, 0, 0)
|
||||||
if(window.height>pos.y+control.height+menu.height){
|
var containerHeight = menu.getContainerHeight()
|
||||||
|
if(window.height>pos.y+control.height+containerHeight){
|
||||||
menu.y = control.height
|
menu.y = control.height
|
||||||
}else if(pos.y>menu.height){
|
}else if(pos.y>containerHeight){
|
||||||
menu.y = -menu.height
|
menu.y = -containerHeight
|
||||||
}else{
|
}else{
|
||||||
menu.y = window.height-(pos.y+menu.height)
|
menu.y = window.height-(pos.y+containerHeight)
|
||||||
}
|
}
|
||||||
menu.open()
|
menu.open()
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,9 @@ Item {
|
||||||
height: expand ? contentHeight : 0
|
height: expand ? contentHeight : 0
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 150
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: expand ? [ 0, 0, 0, 1 ] : [ 1, 0, 0, 0 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,38 +12,50 @@ Menu {
|
||||||
modal:true
|
modal:true
|
||||||
dim:false
|
dim:false
|
||||||
enter: Transition {
|
enter: Transition {
|
||||||
NumberAnimation {
|
reversible: true
|
||||||
property: "y"
|
|
||||||
from:0
|
|
||||||
to:popup.y
|
|
||||||
duration: animEnabled ? 150 : 0
|
|
||||||
}
|
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from:0
|
from:0
|
||||||
to:1
|
to:1
|
||||||
duration: animEnabled ? 150 : 0
|
duration: 83
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit:Transition {
|
||||||
|
NumberAnimation {
|
||||||
|
property: "opacity"
|
||||||
|
from:1
|
||||||
|
to:0
|
||||||
|
duration: 83
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
background:Item{
|
||||||
|
FluShadow{
|
||||||
|
radius: 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background:Item{}
|
|
||||||
contentItem: Item {
|
contentItem: Item {
|
||||||
|
clip: true
|
||||||
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)
|
||||||
radius: 5
|
radius: 5
|
||||||
}
|
}
|
||||||
FluShadow{
|
|
||||||
radius: 5
|
|
||||||
}
|
|
||||||
Column{
|
Column{
|
||||||
|
id:container
|
||||||
spacing: 5
|
spacing: 5
|
||||||
topPadding: 5
|
topPadding: 5
|
||||||
bottomPadding: 5
|
bottomPadding: 5
|
||||||
width: popup.width
|
width: popup.width
|
||||||
id:container
|
|
||||||
function closePopup(){
|
function closePopup(){
|
||||||
popup.close()
|
popup.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getContainerHeight(){
|
||||||
|
return container.height
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,7 +120,9 @@ Item {
|
||||||
}
|
}
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 150
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +139,9 @@ Item {
|
||||||
}
|
}
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 150
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
width: layout_list.width
|
width: layout_list.width
|
||||||
|
@ -206,12 +210,12 @@ Item {
|
||||||
visible:opacity
|
visible:opacity
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 220
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on rotation {
|
Behavior on rotation {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 150
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -290,7 +294,7 @@ Item {
|
||||||
visible:opacity
|
visible:opacity
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 220
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
anchors{
|
anchors{
|
||||||
|
@ -313,7 +317,9 @@ Item {
|
||||||
Item{
|
Item{
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 150
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clip: true
|
clip: true
|
||||||
|
@ -442,7 +448,7 @@ Item {
|
||||||
visible:opacity
|
visible:opacity
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 220
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
color:{
|
color:{
|
||||||
|
@ -504,7 +510,9 @@ Item {
|
||||||
}
|
}
|
||||||
Behavior on Layout.preferredWidth{
|
Behavior on Layout.preferredWidth{
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 220
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -544,10 +552,24 @@ Item {
|
||||||
clip: true
|
clip: true
|
||||||
popEnter : Transition{}
|
popEnter : Transition{}
|
||||||
popExit : Transition {
|
popExit : Transition {
|
||||||
NumberAnimation { properties: "y"; from: 0; to: nav_swipe.height; duration: 200 }
|
NumberAnimation {
|
||||||
|
properties: "y"
|
||||||
|
from: 0
|
||||||
|
to: nav_swipe.height
|
||||||
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 1, 0, 0, 0 ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pushEnter: Transition {
|
pushEnter: Transition {
|
||||||
NumberAnimation { properties: "y"; from: nav_swipe.height; to: 0; duration: 200 }
|
NumberAnimation {
|
||||||
|
properties: "y";
|
||||||
|
from: nav_swipe.height;
|
||||||
|
to: 0
|
||||||
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pushExit : Transition{}
|
pushExit : Transition{}
|
||||||
replaceEnter : Transition{}
|
replaceEnter : Transition{}
|
||||||
|
@ -573,13 +595,17 @@ Item {
|
||||||
}
|
}
|
||||||
Behavior on width{
|
Behavior on width{
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 150
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Behavior on x{
|
Behavior on x{
|
||||||
id:anim_layout_list_x
|
id:anim_layout_list_x
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 150
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 0, 0, 0, 1 ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
anchors{
|
anchors{
|
||||||
|
@ -626,7 +652,7 @@ Item {
|
||||||
visible: opacity
|
visible: opacity
|
||||||
Behavior on opacity{
|
Behavior on opacity{
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 100
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -636,7 +662,7 @@ Item {
|
||||||
opacity:d.isCompactAndNotPanel
|
opacity:d.isCompactAndNotPanel
|
||||||
Behavior on opacity{
|
Behavior on opacity{
|
||||||
NumberAnimation{
|
NumberAnimation{
|
||||||
duration: 220
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
|
hoverColor: FluTheme.dark ? Qt.rgba(1,1,1,0.03) : Qt.rgba(0,0,0,0.03)
|
||||||
|
@ -774,7 +800,7 @@ Item {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from:0
|
from:0
|
||||||
to:1
|
to:1
|
||||||
duration: 150
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background: Rectangle{
|
background: Rectangle{
|
||||||
|
|
|
@ -7,6 +7,7 @@ Item {
|
||||||
|
|
||||||
id:control
|
id:control
|
||||||
default property alias content: d.children
|
default property alias content: d.children
|
||||||
|
property alias currentIndex: nav_list.currentIndex
|
||||||
property color normalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
property color normalColor: FluTheme.dark ? FluColors.Grey120 : FluColors.Grey120
|
||||||
property color hoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
property color hoverColor: FluTheme.dark ? FluColors.Grey10 : FluColors.Black
|
||||||
|
|
||||||
|
|
|
@ -99,39 +99,46 @@ Rectangle {
|
||||||
text:"AM/PM"
|
text:"AM/PM"
|
||||||
}
|
}
|
||||||
|
|
||||||
Popup{
|
Menu{
|
||||||
id:popup
|
id:popup
|
||||||
width: 300
|
width: container.width
|
||||||
height: 340
|
height: container.height
|
||||||
modal: true
|
modal: true
|
||||||
dim:false
|
dim:false
|
||||||
enter: Transition {
|
enter: Transition {
|
||||||
|
reversible: true
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
property: "opacity"
|
property: "opacity"
|
||||||
from:0
|
from:0
|
||||||
to:1
|
to:1
|
||||||
duration: 150
|
duration: 83
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exit:Transition {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
property: "y"
|
property: "opacity"
|
||||||
from:0
|
from:1
|
||||||
to:popup.y
|
to:0
|
||||||
duration: 150
|
duration: 83
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background:Item{}
|
background:Item{
|
||||||
contentItem: Rectangle{
|
FluShadow{
|
||||||
|
radius: 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentItem: Item{
|
||||||
|
clip: true
|
||||||
|
Rectangle{
|
||||||
id:container
|
id:container
|
||||||
anchors.fill: parent
|
height: 340
|
||||||
|
width: 300
|
||||||
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)
|
||||||
MouseArea{
|
MouseArea{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
FluShadow{
|
|
||||||
radius: 4
|
|
||||||
}
|
|
||||||
|
|
||||||
RowLayout{
|
RowLayout{
|
||||||
id:layout_content
|
id:layout_content
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
@ -333,9 +340,8 @@ Rectangle {
|
||||||
popup.close()
|
popup.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
y:35
|
y:35
|
||||||
function showPopup() {
|
function showPopup() {
|
||||||
|
@ -373,12 +379,12 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
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+container.height){
|
||||||
popup.y = root.height
|
popup.y = root.height
|
||||||
} else if(pos.y>popup.height){
|
} else if(pos.y>container.height){
|
||||||
popup.y = -popup.height
|
popup.y = -container.height
|
||||||
} else {
|
} else {
|
||||||
popup.y = window.height-(pos.y+popup.height)
|
popup.y = window.height-(pos.y+container.height)
|
||||||
}
|
}
|
||||||
popup.open()
|
popup.open()
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,16 +72,32 @@ FluControl {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
color: selected ? "#FFFFFF" : "#666666"
|
color: selected ? "#FFFFFF" : "#666666"
|
||||||
Behavior on anchors.leftMargin {
|
Behavior on anchors.leftMargin {
|
||||||
NumberAnimation { duration: 150 }
|
NumberAnimation {
|
||||||
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 1, 0, 0, 0 ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Behavior on anchors.rightMargin {
|
Behavior on anchors.rightMargin {
|
||||||
NumberAnimation { duration: 150 }
|
NumberAnimation {
|
||||||
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 1, 0, 0, 0 ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Behavior on width {
|
Behavior on width {
|
||||||
NumberAnimation { duration: 150 }
|
NumberAnimation {
|
||||||
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 1, 0, 0, 0 ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Behavior on scale {
|
Behavior on scale {
|
||||||
NumberAnimation { duration: 150 }
|
NumberAnimation {
|
||||||
|
duration: 167
|
||||||
|
easing.type: Easing.Bezier
|
||||||
|
easing.bezierCurve: [ 1, 0, 0, 0 ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ ApplicationWindow {
|
||||||
onClosing:
|
onClosing:
|
||||||
(event)=>{
|
(event)=>{
|
||||||
if(closeDestory){
|
if(closeDestory){
|
||||||
helper.destoryWindow()
|
destoryWindow()
|
||||||
}else{
|
}else{
|
||||||
visible = false
|
visible = false
|
||||||
event.accepted = false
|
event.accepted = false
|
||||||
|
@ -94,6 +94,10 @@ ApplicationWindow {
|
||||||
return helper.createRegister(window,path)
|
return helper.createRegister(window,path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function destoryWindow(){
|
||||||
|
helper.destoryWindow()
|
||||||
|
}
|
||||||
|
|
||||||
function onResult(data){
|
function onResult(data){
|
||||||
if(pageRegister){
|
if(pageRegister){
|
||||||
pageRegister.onResult(data)
|
pageRegister.onResult(data)
|
||||||
|
|
Loading…
Reference in New Issue