37
37
Layout.fillWidth: true
40
anchors { left: parent.left; right: parent.right }
41
elide: Text.ElideMiddle
42
font.weight: Font.DemiBold
43
text: targetPage.title
46
anchors { left: parent.left; right: parent.right }
47
elide: Text.ElideMiddle
50
if (!loPageContentLoader.item)
51
return i18n.tr("Loading...")
40
anchors { left: parent.left; right: parent.right }
41
elide: Text.ElideMiddle
42
font.weight: Font.DemiBold
43
text: targetPage.title
46
anchors { left: parent.left; right: parent.right }
47
elide: Text.ElideMiddle
50
if (!targetPage.contentItem)
51
return i18n.tr("Loading...")
53
switch(loPageContentLoader.item.loDocument.documentType) {
55
return i18n.tr("LibreOffice text document")
57
return i18n.tr("LibreOffice spread sheet")
59
return i18n.tr("LibreOffice presentation")
61
return i18n.tr("LibreOffice Draw document")
63
return i18n.tr("Unknown LibreOffice document")
65
return i18n.tr("Unknown type document")
53
switch(targetPage.contentItem.loDocument.documentType) {
55
return i18n.tr("LibreOffice text document")
57
return i18n.tr("LibreOffice spread sheet")
59
return i18n.tr("LibreOffice presentation")
61
return i18n.tr("LibreOffice Draw document")
63
return i18n.tr("Unknown LibreOffice document")
65
return i18n.tr("Unknown type document")
72
72
Layout.preferredWidth: units.gu(12)
73
73
Layout.preferredHeight: units.gu(4)
76
if (!loPageContentLoader.item)
79
return DocumentViewer.desktopMode || targetPage.width > units.gu(80)
75
view: targetPage.contentItem.loView
76
visible: targetPage.contentItem && (DocumentViewer.desktopMode || mainView.wideWindow)
87
text: i18n.tr("Search")
92
82
// FIXME: Autopilot test broken... seems not to detect we're now using an ActionBar since the switch to UITK 1.3
93
83
objectName: "gotopage"
94
84
iconName: "browser-tabs"
95
85
text: i18n.tr("Go to position...")
96
onTriggered: PopupUtils.open(Qt.resolvedUrl("LOViewGotoDialog.qml"), targetPage)
97
visible: loPageContentLoader.item.loDocument.documentType == LibreOffice.Document.TextDocument
86
visible: targetPage.contentItem.loDocument.documentType == LibreOffice.Document.TextDocument
90
Qt.resolvedUrl("LOViewGotoDialog.qml"),
93
view: targetPage.contentItem.loView
101
99
iconName: "night-mode"
102
100
text: mainView.nightModeEnabled ? i18n.tr("Disable night mode") : i18n.tr("Enable night mode")
103
102
onTriggered: mainView.nightModeEnabled = !mainView.nightModeEnabled