Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sociald] Social media feed UI changes. Contributes to JB#2551
- Loading branch information
Antti Seppälä
committed
Oct 25, 2013
1 parent
f908bdd
commit f13fd3d
Showing
8 changed files
with
93 additions
and
52 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
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,55 @@ | ||
import QtQuick 2.0 | ||
import Sailfish.Silica 1.0 | ||
import Sailfish.TextLinking 1.0 | ||
|
||
Item { | ||
id: container | ||
|
||
property variant imageList | ||
property string mediaName | ||
property string mediaCaption | ||
property string mediaDescription | ||
property real imageSize: width / 3 | ||
property int imageCount: imageList ? imageList.length : 0 | ||
|
||
width: parent.width | ||
height: childrenRect.height | ||
visible: imageCount > 0 | ||
|
||
Row { | ||
anchors { | ||
left: parent.left | ||
right: parent.right | ||
} | ||
|
||
Repeater { | ||
id: repeater | ||
model: container.imageList | ||
delegate: Image { | ||
width: container.imageSize | ||
height: container.imageSize | ||
sourceSize { | ||
width: container.imageSize | ||
height: container.imageSize | ||
} | ||
asynchronous: true | ||
fillMode: Image.PreserveAspectCrop | ||
visible: index < container.imageCount | ||
source: visible ? modelData.url : "" | ||
} | ||
} | ||
} | ||
|
||
Label { | ||
width: container.imageSize * 2 - Theme.paddingSmall | ||
x: container.imageSize + Theme.paddingMedium | ||
y: Theme.paddingMedium | ||
visible: container.imageCount === 1 | ||
text: container.mediaName | ||
font.pixelSize: Theme.fontSizeExtraSmall | ||
wrapMode: Text.WordWrap | ||
maximumLineCount: 2 | ||
elide: Text.ElideRight | ||
opacity: .6 | ||
} | ||
} |
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
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
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