diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2012-06-15 11:05:24 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2012-06-15 14:46:48 -0300 |
commit | 8cdfa0d8cb34c3ef51de628ed51fd45ffc76da2d (patch) | |
tree | 82d678e8b917ddb29ddb8e635f87a56b9abd7cdc /src/mobile/qml/TopSitesPanel.qml | |
parent | a7950de4eaaebb004d48446196b4c0cd89428736 (diff) |
Moved similar code to a new component PageThumbUrl.
The delegates of TabsPanel and TopSitesPanel share a lot of things
in common, most of those things are those pesky little details like
margin, font, color, and even an identical regular expression.
Stuff like that should be in the same place.
In addition, the margin and font problems of the thumbnail url texts
reported in the design review, were fixed.
Reviewed-by: Hugo Parente Lima
Diffstat (limited to 'src/mobile/qml/TopSitesPanel.qml')
-rw-r--r-- | src/mobile/qml/TopSitesPanel.qml | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/mobile/qml/TopSitesPanel.qml b/src/mobile/qml/TopSitesPanel.qml index 2d12928..b75febe 100644 --- a/src/mobile/qml/TopSitesPanel.qml +++ b/src/mobile/qml/TopSitesPanel.qml @@ -39,7 +39,6 @@ Item { id: pagedItemDelegate Image { property string url: model.url - property bool fadeUrl: false source: model.thumbnail height: UiConstants.PagedGridSizeTable[1] fillMode: Image.Pad @@ -65,32 +64,17 @@ Item { } } - Text { + PageThumbUrl { id: displayedUrl - text: url.replace(/(https?|file):\/\/\/?(www\.)?/, "").replace(/\/.*/, ""); - color: "#515050" - horizontalAlignment: fadeUrl ? Text.AlignLeft : Text.AlignHCenter - font.pixelSize: 20 - font.family: "Nokia Pure Text Light" + url: model.url + urlFadeImage: "qrc:///mobile/grid/overlayer_mysites_url" anchors { bottom: parent.bottom left: parent.left right: parent.right - bottomMargin: 10 - leftMargin: 14 - rightMargin: 14 - } - onWidthChanged: fadeUrl = paintedWidth > width - } - Image { - id: urlFade - source: "qrc:///mobile/grid/overlayer_mysites_url" - visible: fadeUrl - anchors { - bottom: parent.bottom - right: parent.right } } + Image { id: pinButton source: "qrc:///mobile/grid/btn_pin_pressed" |