-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathReadPage.qml
76 lines (60 loc) · 1.83 KB
/
ReadPage.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import QtQuick 2.7
import QtQuick.Controls 1.4
import QtQuick.Controls 2.0
import QtQuick.Controls.Material 2.0
import QtQuick.Window 2.0
import QtQuick.Layouts 1.0
Item {
id:readItem
anchors.fill:parent
property bool visi: false
property bool menucome
property string storypart
property int seasonindex
property int position: lastposition
property string colorback: "#ffcc80"
function positioning(){
scrollView1.flickableItem.contentY = 0
}
Rectangle {
visible: visi
width:parent.width
height:parent.height
color:colorback
ScrollView{
id: scrollView1
anchors.fill: parent
flickableItem.contentY : menucome ?position:0
ColumnLayout{
width:parent.width
Text {
text:storypart
id: preyText
width: scrollView1.width
horizontalAlignment: Text.AlignJustify
Layout.maximumWidth: scrollView1.width - 30
Layout.preferredWidth: scrollView1.width - 30
wrapMode: Text.WordWrap
font.pointSize: 15
clip: false
leftPadding:15
topPadding: 50
textFormat: Text.PlainText
}
}
}
Button{
id:backButton
text:"بازگشت"
onClicked:{
updatedata_qml.updatePosition(seasonindex,scrollView1.flickableItem.contentY)
position=scrollView1.flickableItem.contentY
visi = false
if(menucome)
mainMenuItem.visi = true
else
seasonPage.visi = true
}
}
}
}