如百词斩部分代码
MRWord\pages\infopage\info.kv
<InfoPage>:
anim_type: 'slide_above_simple'
id: main_win
box_button_anchor: box_button_anchor.__self__
three_labels_box: three_labels_box.__self__
box_phonetic: box_phonetic.__self__
BoxLayout:
BoxLayout:
id: main_box
orientation: 'vertical'
spacing: 20
canvas.before:
Color:
rgba: (1,1,1,1)
Rectangle:
pos: self.pos
size: self.size
source: 'image/back.jpg'
BoxLayout:
orientation: 'vertical'
id: word_phonetic_box
Label:
id: word_to_study
font_size: '50sp'
color: 1, 0, 0, 1
BoxLayout:
orientation: "horizontal"
id: box_phonetic
spacing: 8
AnchorLayout: # 右上角布局的 小喇叭 按钮
anchor_x: 'right'
anchor_y: 'top'
ImageButton:
id: phonetic_image
source: "image/play_button.png"
size_hint: None, None
size: 50, 22
on_press: root.play_word()
AnchorLayout: # 左上角 音标
anchor_x: "left"
anchor_y: "top"
Label:
id: phonetic
font_name: "site_packages/DejaVuSans.ttf"
size_hint: None, None
size: 30, 22
color: 0, 0, 0, 1
BoxLayout:
id: three_labels_box
orientation: 'vertical'
Label:
id: explain_word
font_name: "site_packages/DroidSansFallback.ttf"
color: 0, 0, 0, 1
Label:
id: examples_en
font_name: "site_packages/DroidSansFallback.ttf"
color: 0, 0, 0, 1
Label:
id: examples_cn
font_name: "site_packages/DroidSansFallback.ttf"
color: 0, 0, 0, 1
BoxLayout:
orientation:"horizontal"
id: box_button_anchor
AnchorLayout:
anchor_x: "left"
anchor_y: "bottom"
Button:
text:"\u8ba4\u8bc6" # 认识
size_hint: .8, .2
font_name: "site_packages/DroidSansFallback.ttf"
background_normal: ''
background_color: (0.035,0.588,0.941,1)
on_press: root.know_button_press()

最低0.47元/天 解锁文章
1271

被折叠的 条评论
为什么被折叠?



