add modal demo
This commit is contained in:
		| @@ -22,9 +22,12 @@ void DoricDemoBridge::navigate(QVariant route) { | |||||||
|     name = "LayoutDemo.js"; |     name = "LayoutDemo.js"; | ||||||
|     break; |     break; | ||||||
|   case 3: |   case 3: | ||||||
|     name = "SimpleDemo.js"; |     name = "ModalDemo.js"; | ||||||
|     break; |     break; | ||||||
|   case 4: |   case 4: | ||||||
|  |     name = "SimpleDemo.js"; | ||||||
|  |     break; | ||||||
|  |   case 5: | ||||||
|     name = "Snake.js"; |     name = "Snake.js"; | ||||||
|     break; |     break; | ||||||
|   } |   } | ||||||
|   | |||||||
| @@ -11,6 +11,7 @@ | |||||||
|         <file alias="Counter.js">../../doric-demo/bundle/src/Counter.js</file> |         <file alias="Counter.js">../../doric-demo/bundle/src/Counter.js</file> | ||||||
|         <file alias="Gobang.js">../../doric-demo/bundle/src/Gobang.js</file> |         <file alias="Gobang.js">../../doric-demo/bundle/src/Gobang.js</file> | ||||||
|         <file alias="LayoutDemo.js">../../doric-demo/bundle/src/LayoutDemo.js</file> |         <file alias="LayoutDemo.js">../../doric-demo/bundle/src/LayoutDemo.js</file> | ||||||
|  |         <file alias="ModalDemo.js">../../doric-demo/bundle/src/ModalDemo.js</file> | ||||||
|         <file alias="SimpleDemo.js">../../doric-demo/bundle/src/SimpleDemo.js</file> |         <file alias="SimpleDemo.js">../../doric-demo/bundle/src/SimpleDemo.js</file> | ||||||
|         <file alias="Snake.js">../../doric-demo/bundle/src/Snake.js</file> |         <file alias="Snake.js">../../doric-demo/bundle/src/Snake.js</file> | ||||||
|     </qresource> |     </qresource> | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ ApplicationWindow { | |||||||
|  |  | ||||||
|         ListView { |         ListView { | ||||||
|             width: parent.width |             width: parent.width | ||||||
|             model: 5 |             model: 6 | ||||||
|             delegate: Rectangle { |             delegate: Rectangle { | ||||||
|                 Column { |                 Column { | ||||||
|                     anchors.centerIn: parent |                     anchors.centerIn: parent | ||||||
| @@ -29,8 +29,10 @@ ApplicationWindow { | |||||||
|                                 case 2: |                                 case 2: | ||||||
|                                     return "LayoutDemo.js" |                                     return "LayoutDemo.js" | ||||||
|                                 case 3: |                                 case 3: | ||||||
|                                     return "SimpleDemo.js" |                                     return "ModalDemo.js" | ||||||
|                                 case 4: |                                 case 4: | ||||||
|  |                                     return "SimpleDemo.js" | ||||||
|  |                                 case 5: | ||||||
|                                     return "Snake.js" |                                     return "Snake.js" | ||||||
|                             } |                             } | ||||||
|                         } |                         } | ||||||
|   | |||||||
| @@ -134,7 +134,8 @@ void DoricLayouts::measureSelf(QSizeF targetSize) { | |||||||
|     QQuickItem *parent = this->view->parentItem(); |     QQuickItem *parent = this->view->parentItem(); | ||||||
|     DoricLayouts *parentDoricLayout = |     DoricLayouts *parentDoricLayout = | ||||||
|         (DoricLayouts *)(parent->property("doricLayout").toULongLong()); |         (DoricLayouts *)(parent->property("doricLayout").toULongLong()); | ||||||
|     if (parentDoricLayout->layoutType == DoricLayoutType::DoricHLayout && |     if (parentDoricLayout != nullptr && | ||||||
|  |         parentDoricLayout->layoutType == DoricLayoutType::DoricHLayout && | ||||||
|         this->weight > 0) { |         this->weight > 0) { | ||||||
|       width = 0; |       width = 0; | ||||||
|       setMeasuredWidth(0); |       setMeasuredWidth(0); | ||||||
| @@ -155,7 +156,8 @@ void DoricLayouts::measureSelf(QSizeF targetSize) { | |||||||
|     QQuickItem *parent = this->view->parentItem(); |     QQuickItem *parent = this->view->parentItem(); | ||||||
|     DoricLayouts *parentDoricLayout = |     DoricLayouts *parentDoricLayout = | ||||||
|         (DoricLayouts *)(parent->property("doricLayout").toULongLong()); |         (DoricLayouts *)(parent->property("doricLayout").toULongLong()); | ||||||
|     if (parentDoricLayout->layoutType == DoricLayoutType::DoricVLayout && |     if (parentDoricLayout != nullptr && | ||||||
|  |         parentDoricLayout->layoutType == DoricLayoutType::DoricVLayout && | ||||||
|         this->weight > 0) { |         this->weight > 0) { | ||||||
|       height = 0; |       height = 0; | ||||||
|       setMeasuredHeight(0); |       setMeasuredHeight(0); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user