Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in Sfiet_Konstantin/base-sociald/facebook-eventfeed (pull requ…
…est #32) Polish event feed
- Loading branch information
Showing
15 changed files
with
749 additions
and
577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
|
||
Column { | ||
property alias text: body.text | ||
property alias time: time.text | ||
anchors { | ||
left: parent.left | ||
right: parent.right | ||
} | ||
|
||
Label { | ||
id: body | ||
anchors { | ||
left: parent.left | ||
right: parent.right | ||
} | ||
color: Theme.highlightColor | ||
wrapMode: Text.WordWrap | ||
font.pixelSize: Theme.fontSizeSmall | ||
} | ||
Label { | ||
id: time | ||
color: Theme.highlightColor | ||
opacity: 0.6 | ||
font.pixelSize: Theme.fontSizeExtraSmall | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
|
||
Image { | ||
id: container | ||
property string icon | ||
width: Theme.itemSizeExtraLarge | ||
height: Theme.itemSizeExtraLarge | ||
sourceSize { | ||
width: Theme.itemSizeExtraLarge | ||
height: Theme.itemSizeExtraLarge | ||
} | ||
asynchronous: true | ||
fillMode: Image.PreserveAspectCrop | ||
source: { | ||
if (container.icon == "") { | ||
return container.icon | ||
} else if (container.icon == 0) { | ||
return container.icon | ||
} else if (container.icon.indexOf("/") == 0) { | ||
return "image://nemoThumbnail/" + container.icon | ||
} else { | ||
return "image://theme/" + container.icon | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
|
||
Item { | ||
id: container | ||
property variant imageList | ||
property string mediaName | ||
property string mediaCaption | ||
property string mediaDescription | ||
|
||
anchors { | ||
left: parent.left | ||
right: parent.right | ||
} | ||
|
||
height: childrenRect.height | ||
visible: imageList.length > 0 | ||
|
||
Rectangle { | ||
anchors.fill: parent | ||
gradient: Gradient { | ||
GradientStop { position: 0; color: Theme.rgba(Theme.highlightColor, 0) } | ||
GradientStop { position: 1; color: Theme.rgba(Theme.highlightColor, 0.05) } | ||
} | ||
} | ||
|
||
Row { | ||
anchors { | ||
left: parent.left | ||
right: parent.right | ||
} | ||
|
||
Repeater { | ||
id: repeater | ||
property real imageSize: container.imageList.length <= 2 ? container.width / 2 | ||
: container.width / 4 | ||
model: container.imageList | ||
|
||
delegate: Image { | ||
width: repeater.imageSize | ||
height: repeater.imageSize | ||
sourceSize { | ||
width: repeater.imageSize | ||
height: repeater.imageSize | ||
} | ||
asynchronous: true | ||
fillMode: Image.PreserveAspectCrop | ||
source: { | ||
if (container.imageList[index] == "") { | ||
return container.imageList[index] | ||
} else if (container.imageList[index].indexOf("http") == 0) { | ||
return container.imageList[index] | ||
} else if (container.imageList[index].indexOf("/") == 0) { | ||
return "image://nemoThumbnail/" + container.imageList[index] | ||
} else { | ||
return "image://theme/" + container.imageList[index] | ||
} | ||
} | ||
} | ||
} | ||
|
||
Item { | ||
width: repeater.imageSize | ||
height: repeater.imageSize | ||
visible: container.imageList.length === 1 | ||
|
||
Label { | ||
anchors { | ||
top: parent.top | ||
topMargin: Theme.paddingMedium | ||
left: parent.left | ||
leftMargin: Theme.paddingMedium | ||
right: parent.right | ||
rightMargin: Theme.paddingMedium | ||
bottom: caption.top | ||
bottomMargin: Theme.paddingSmall | ||
} | ||
text: container.mediaName | ||
font.pixelSize: Theme.fontSizeSmall | ||
wrapMode: Text.WordWrap | ||
elide: Text.ElideRight | ||
} | ||
|
||
Label { | ||
id: caption | ||
anchors { | ||
bottom: parent.bottom | ||
bottomMargin: Theme.paddingMedium | ||
left: parent.left | ||
leftMargin: Theme.paddingMedium | ||
right: parent.right | ||
rightMargin: Theme.paddingMedium | ||
} | ||
text: container.mediaCaption | ||
color: Theme.highlightColor | ||
font.pixelSize: Theme.fontSizeExtraSmall | ||
wrapMode: Text.WordWrap | ||
elide: Text.ElideRight | ||
maximumLineCount: 1 | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
|
||
MouseArea { | ||
id: container | ||
property alias icon: icon.source | ||
property alias text: label.text | ||
height: label.height + 2 * Theme.paddingLarge | ||
width: icon.width + Theme.paddingSmall + label.width | ||
|
||
Image { | ||
id: icon | ||
anchors.verticalCenter: parent.verticalCenter | ||
height: 32 | ||
width: 32 | ||
opacity: container.enabled ? 1 : 0.5 | ||
} | ||
|
||
Label { | ||
id: label | ||
anchors { | ||
left: icon.right | ||
leftMargin: Theme.paddingSmall | ||
verticalCenter: parent.verticalCenter | ||
} | ||
color: container.pressed ? Theme.highlightColor : Theme.primaryColor | ||
opacity: container.enabled ? 1 : 0.5 | ||
} | ||
} |
Oops, something went wrong.