updates decoration

still buggy
This commit is contained in:
Marco Martin 2012-07-31 21:33:22 +02:00
parent 2c87caaed3
commit 407921c33e
2 changed files with 12 additions and 3 deletions

View file

@ -30,7 +30,7 @@ Column {
MouseArea {
width: parent.width
height: childrenRect.height
height: label.height
visible: display.toLowerCase().indexOf(searchField.searchQuery.toLowerCase()) !== -1
onClicked: {
@ -40,10 +40,18 @@ Column {
resourceBrowser.open = false
}
QIconItem {
id: icon
icon: decoration
width: theme.smallIconSize
height: width
anchors.verticalCenter: parent.verticalCenter
}
PlasmaComponents.Label {
id: label
text: display
verticalAlignment: Text.AlignBottom
anchors.left: icon.right
}
//there isn't a sane way to do a dotted line in QML1
Rectangle {
@ -58,7 +66,7 @@ Column {
}
PlasmaComponents.Label {
id: pageNumber
text: page
text: pageLabel
anchors.right: parent.right
verticalAlignment: Text.AlignBottom
anchors.rightMargin: 40

View file

@ -49,8 +49,8 @@ void DocumentItem::setPath(const QString &path)
//TODO: remote urls
m_document->openDocument(path, KUrl(path), KMimeType::findByUrl(KUrl(path)));
m_tocModel->setCurrentViewport(m_document->viewport());
m_tocModel->fill(m_document->documentSynopsis());
m_tocModel->setCurrentViewport(m_document->viewport());
m_matchingPages.clear();
for (uint i = 0; i < m_document->pages(); ++i) {
@ -71,6 +71,7 @@ QString DocumentItem::path() const
void DocumentItem::setCurrentPage(int page)
{
m_document->setViewportPage(page);
m_tocModel->setCurrentViewport(m_document->viewport());
emit currentPageChanged();
}