[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    =?utf-8?q?=5Bplasma-mobile=5D_research/applets/mobilemenu/conten?=
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-02-13 15:20:11
Message-ID: 20110213152011.C61B6A609B () git ! kde ! org
[Download RAW message or body]

Git commit bd97488798b80c87a344df5ac0a4b34ea5e95db1 by Marco Martin.
Committed on 13/02/2011 at 16:15.
Pushed by mart into branch 'master'.

use itamA to position the connector

M  +2    -2    research/applets/mobilemenu/contents/ui/Connector.qml     
M  +75   -3    research/applets/mobilemenu/contents/ui/mobilemenu.qml     

http://commits.kde.org/scratch/mart/plasma-mobile/bd97488798b80c87a344df5ac0a4b34ea5e95db1


diff --git a/research/applets/mobilemenu/contents/ui/Connector.qml \
b/research/applets/mobilemenu/contents/ui/Connector.qml index 46115b4..c5b7872 100644
--- a/research/applets/mobilemenu/contents/ui/Connector.qml
+++ b/research/applets/mobilemenu/contents/ui/Connector.qml
@@ -26,9 +26,9 @@ Rectangle {
     property Item itemA
     property Item itemB
 
-    property real connectorAngle: Math.atan((itemB.y+height/2-64)/(itemB.x-64))
+    property real connectorAngle: \
Math.atan((itemB.y+height/2-itemA.y)/(itemB.x-itemA.x-itemA.width/2))  
-    width: (itemB.x-64)/Math.cos(connectorAngle) -30
+    width: (itemB.x-itemA.width/2)/Math.cos(connectorAngle)
     height: 12
     radius: 7
     color: "white"
diff --git a/research/applets/mobilemenu/contents/ui/mobilemenu.qml \
b/research/applets/mobilemenu/contents/ui/mobilemenu.qml index 09aab68..b516c4d \
                100644
--- a/research/applets/mobilemenu/contents/ui/mobilemenu.qml
+++ b/research/applets/mobilemenu/contents/ui/mobilemenu.qml
@@ -102,6 +102,54 @@ Rectangle {
                 }
             ]
         }
+        ListElement {
+            elements: [
+                ListElement {
+                    name: "Book 1"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "Receipt.pdf"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "essay.doc"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "Birthday.jpg"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "5th symphony.mp3"
+                    icon: "pics/qtlogo.png"
+                }
+            ]
+        }
+        ListElement {
+            elements: [
+                ListElement {
+                    name: "Book 1"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "Receipt.pdf"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "essay.doc"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "Birthday.jpg"
+                    icon: "pics/qtlogo.png"
+                },
+                ListElement {
+                    name: "5th symphony.mp3"
+                    icon: "pics/qtlogo.png"
+                }
+            ]
+        }
     }
 
     PlasmaCore.Svg{
@@ -122,6 +170,8 @@ Rectangle {
                 id: delegate
                 width: itemsRow.childrenRect.width
                 height: itemsRow.childrenRect.height
+                scale: PathView.delegateScale
+                opacity: PathView.delegateOpacity
 
                 Rectangle {
                     color: "white"
@@ -189,13 +239,35 @@ Rectangle {
          clip:true
          offset: 2
          path: Path {
-             startX: mainView.width/2; startY: -40
-             PathQuad { x: mainView.width/3; y: mainView.height+40; controlX: 300; \
                controlY: mainView.height/2 }
-             //PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
+             startX: mainView.width/2; startY: -100
+             /*PathAttribute { name: "delegateScale"; value: 1.0 }
+             PathAttribute { name: "delegateOpacity"; value: 1.0 }*/
+             PathQuad {
+                 x: 0
+                 y: mainView.height+100
+                 controlX: mainView.width
+                 controlY: mainView.height/2
+            }
+         /*   //PathAttribute { name: "delegateScale"; value: 0.3 }
+            //PathAttribute { name: "delegateOpacity"; value: 0.0 }
+            PathQuad {
+                 x: mainView.width/2
+                 y: 0
+                 controlX: mainView.width/2 -30
+                 controlY: 0
+            }
+           // PathAttribute { name: "delegateOpacity"; value: 0.0 }
+            PathQuad {
+                 x: mainView.width/2
+                 y: mainView.height/2
+                 controlX: mainView.width/2 -30
+                 controlY: mainView.height/2-30
+            }*/
          }
      }
      PlasmaCore.SvgItem {
         id: activityRootSvg
+        y:200
         width: 128
         height: 128
         svg: iconsSvg


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic