Lettore EPUB nativo: ReaderPage (WebView+capitoli+progresso), segno locale in QSettings, sync POST /ajax/bookmark con fallback CSRF, pulsante Leggi nel dettaglio
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import QtQuick 2.0
|
||||
import Sailfish.Silica 1.0
|
||||
|
||||
Dialog {
|
||||
id: dialog
|
||||
|
||||
property var model: []
|
||||
property int selectedIndex: 0
|
||||
|
||||
SilicaListView {
|
||||
anchors.fill: parent
|
||||
header: DialogHeader { title: "Indice" }
|
||||
model: dialog.model
|
||||
|
||||
delegate: ListItem {
|
||||
id: item
|
||||
contentHeight: Theme.itemSizeMedium
|
||||
|
||||
Label {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Theme.horizontalPageMargin
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.horizontalPageMargin
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: (modelData.index + 1) + ". " + modelData.title
|
||||
color: item.highlighted ? Theme.highlightColor : Theme.primaryColor
|
||||
truncationMode: TruncationMode.Elide
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
dialog.selectedIndex = modelData.index
|
||||
dialog.accept()
|
||||
}
|
||||
}
|
||||
|
||||
ViewPlaceholder {
|
||||
enabled: dialog.model.length === 0
|
||||
text: "Nessun capitolo"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user