这是我的代码,我遇到麻烦的标签的ID叫做" documento" 。有些人可以告诉我标签配置中是否有错误或其他什么?
from kivy.lang import Builder
Builder.load_string('''
<RootWidget>:
canvas.before:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
color: (0, 0, 0, 1.0)
background_color: (255, 255, 255, 1.0)
carousel: carousel
Carousel:
on_index: root.on_index(*args)
id: carousel
ignore_perpendicular_swipes: True
FloatLayout:
id: tab1
Label:
id: identification
text: ''
markup: True
color: (0, 0, 0, 1.0)
halign: 'left'
valign: 'top'
font_size: '18pt'
x: 100
y: -80
opacity: 0
Image:
id: avatar
source: 'assets/avatar.png'
keep_ratio: True
size_hint_x: 0.3
x: 60
y: -70
opacity: 0
Image:
id: banner
source: 'assets/banner.png'
keep_ratio: True
size_hint_x: 1
x: 0
y: 160
opacity: 0
Image:
id: lock
source: 'assets/lock.png'
FloatLayout:
id: tab2
Label:
id: asunto
text: 'Asunto: [b] Expdte. 234/98634987/54[/b]'
markup: True
color: (0, 0, 0, 1.0)
halign: 'left'
valign: 'top'
font_size: '18pt'
x: 40
y: 170
opacity: 0
Image:
id: votacion
size_hint_x: 0.2
x: 20
y: 80
opacity: 1
Label:
id: voto_text
text: '[b]VOTO POSITIVO[/b]'
markup: True
color: (0, 0, 0, 1.0)
halign: 'left'
valign: 'top'
font_size: '40pt'
y: 90
x: 40
opacity: 1
Image:
id: biometric_icon
source: 'assets/biometric.png'
keep_ratio: False
size_hint_x: 0.2
y: -90
x: 320
opacity: 1
Label:
id: confirm_label
text: 'CONFIRMACI\xc3\x93N BIOM\xc3\x89TRICA'
markup: True
color: (0, 0, 0, 1.0)
halign: 'center'
valign: 'top'
font_size: '10pt'
y: -190
x: 00
opacity: 1
FloatLayout:
id: tab3
ScrollView:
on_scroll_start: print("arranque")
on_scroll_move: print("me muevo")
on_scroll_stop: print("pare")
Label:
id: documento
text_size:700, None
size_hint_y: None
height: self.texture_size[1]
color: (0, 0, 0, 1.0)
Label:
id: debugger
text: ''
color: (0, 0, 0, 1.0)
halign: 'left'
valign: 'top'
width: 200
''')
答案 0 :(得分:0)
我继续寻找这个问题的解决方案,但发现我的gpu在渲染文本时存在限制,所以问题在于。所以总结并帮助每个遇到同样问题的人,限制不是来自kivy而是来自gpu