How to use Hebrew font in Kivy? - kivy

I try to use Hebrew font in kivy app and after explore i use LabelBase.register and change my reading of the kv file with encoding='utf-8' but still get error with the line: font_name.
my main.py:
# main.py
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.properties import ObjectProperty
from kivy.uix.popup import Popup
from kivy.uix.label import Label
from kivy.core.text import LabelBase
LabelBase.register(name="Arial", fn_regular="Arial.ttf")
class exist_form_window(Screen):
project_name = ObjectProperty(None)
manage_name = ObjectProperty(None)
def create(self):
if (self.project_name.text):
self.reset()
sm.current = "main"
else:
invalidLogin()
def reset(self):
self.project_name.text =""
self.manage_name.text = ""
class new_form_window(Screen):
project_name = ObjectProperty(None)
manage_name = ObjectProperty(None)
def create(self):
if (self.project_name.text):
self.reset()
sm.current = "main"
else:
invalidLogin()
def reset(self):
self.project_name.text =""
self.manage_name.text = ""
class MainWindow(Screen):
def new_form(self):
sm.current = "new_form"
def exist_form(self):
sm.current = "exist_form"
class WindowManager(ScreenManager):
pass
def invalidLogin():
pop = Popup(title='שגיאה',
content=Label(text='חלק מהערכים חסרים'),
size_hint=(None, None), size=(400, 400))
pop.open()
with open("roniapp.kv", encoding='utf-8') as f:
Builder.load_string(f.read())
sm = WindowManager()
screens = [MainWindow(name="main"),new_form_window(name="new_form"),exist_form_window(name="exist_form")]
for screen in screens:
sm.add_widget(screen)
sm.current = "main"
class MyMainApp(App):
def build(self):
return sm
if __name__ == "__main__":
MyMainApp().run()
My roniapp.kv file:
<MainWindow>:
name: "main"
FloatLayout:
Label:
font_name: 'Arial'
text:"Asad"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.9}
size_hint: 0.35, 0.15
Button:
pos_hint:{"x":0.2, "y": 0.3}
size_hint:0.6,0.2
text: "aaa"
on_release:
root.new_form()
root.manager.transition.direction = "down"
Button:
pos_hint:{"x":0.2, "y": 0.1}
size_hint:0.6,0.2
text: "aaa"
on_release:
root.exist_form()
root.manager.transition.direction = "left"
<new_form_window>:
name: "new_form"
project_name: project_name
manage_name: manage_name
FloatLayout:
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.9}
size_hint: 0.35, 0.15
TextInput:
id: project_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45 , "top":0.9}
size_hint: 0.4, 0.15
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.7}
size_hint: 0.35, 0.15
TextInput:
id: manage_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45, "top":0.7}
size_hint: 0.4, 0.15
Button:
pos_hint:{"x":0.2,"y":0.05}
size_hint: 0.6, 0.2
font_size: (root.width**2 + root.height**2) / 13**4
text: "aaa"
on_release:
root.manager.transition.direction = "left"
root.create()
<exist_form_window>:
name: "exist_form"
project_name: project_name
manage_name: manage_name
FloatLayout:
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.9}
size_hint: 0.35, 0.15
TextInput:
id: project_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45 , "top":0.9}
size_hint: 0.4, 0.15
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.7}
size_hint: 0.35, 0.15
TextInput:
id: manage_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45, "top":0.7}
size_hint: 0.4, 0.15
Button:
pos_hint:{"x":0.2,"y":0.05}
size_hint: 0.6, 0.2
font_size: (root.width**2 + root.height**2) / 13**4
text: "aaa"
on_release:
root.manager.transition.direction = "left"
root.create()
And get this error:
File "C:\Users\adi\Anaconda3\envs\project_2\lib\site-packages\kivy\lang\parser.py", line 584, in
parse_level
'Invalid data after declaration')
ParserException: Parser: File "<inline>", line 6:
...
4: FloatLayout:
5: Label:
>> 6: font_name: 'Arial'
7: text:"Asad"
8: font_size: (root.width**2 + root.height**2) / 13**4
...
Invalid data after declaration
If it's because i save the kv file with notepad i try with different apps and still get this error.
thanks for help!

The kivy Parser is throwing an error because the code in your .kv file is not formed correctly. Your indentation needs to be fixed. I managed to run your app on my machine by keeping your python code unchanged and replacing your .kv file with the following:
<MainWindow>:
name: "main"
FloatLayout:
Label:
font_name: 'Arial'
text:"Asad"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.9}
size_hint: 0.35, 0.15
Button:
pos_hint:{"x":0.2, "y": 0.3}
size_hint:0.6,0.2
text: "aaa"
on_release:
root.new_form()
root.manager.transition.direction = "down"
Button:
pos_hint:{"x":0.2, "y": 0.1}
size_hint:0.6,0.2
text: "aaa"
on_release:
root.exist_form()
root.manager.transition.direction = "left"
<new_form_window>:
name: "new_form"
project_name: project_name
manage_name: manage_name
FloatLayout:
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.9}
size_hint: 0.35, 0.15
TextInput:
id: project_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45 , "top":0.9}
size_hint: 0.4, 0.15
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.7}
size_hint: 0.35, 0.15
TextInput:
id: manage_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45, "top":0.7}
size_hint: 0.4, 0.15
Button:
pos_hint:{"x":0.2,"y":0.05}
size_hint: 0.6, 0.2
font_size: (root.width**2 + root.height**2) / 13**4
text: "aaa"
on_release:
root.manager.transition.direction = "left"
root.create()
<exist_form_window>:
name: "exist_form"
project_name: project_name
manage_name: manage_name
FloatLayout:
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.9}
size_hint: 0.35, 0.15
TextInput:
id: project_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45 , "top":0.9}
size_hint: 0.4, 0.15
Label:
text:"aaa"
font_size: (root.width**2 + root.height**2) / 13**4
pos_hint: {"x":0.1, "top":0.7}
size_hint: 0.35, 0.15
TextInput:
id: manage_name
font_size: (root.width**2 + root.height**2) / 13**4
multiline: False
pos_hint: {"x": 0.45, "top":0.7}
size_hint: 0.4, 0.15
Button:
pos_hint:{"x":0.2,"y":0.05}
size_hint: 0.6, 0.2
font_size: (root.width**2 + root.height**2) / 13**4
text: "aaa"
on_release:
root.manager.transition.direction = "left"
root.create()
And it works:

Related

How to show loading screen at start of functionin Kivy

I am a beginner on Kivy and need some help.
I have a basic mathematical application that, when i press a button it also takes 2-3 secs to be completed the function and then app shows us the result. During this process i want my app to show a loading screen
I found this solution but could not compile for my code
https://stackoverflow.com/a/66154747/19925544
Could you please help me to fix this
Thanks.
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.metrics import dp
import requests
class WrappedLabel(Label):
pass
class Math(BoxLayout):
def __init__(self, **kwargs):
super(Predictor, self).__init__(**kwargs)
self.status = True
self.data = self.datas()
self.Today = self.today()
def underOver(self, s_image, screenmanager):
if(screenmanager.current == 'homepage_screen' or screenmanager.current == 'side_screen' or screenmanager.current == 'privacy_policy_screen'):
screenmanager.transition.direction = 'left'
screenmanager.current = 'result_screen'
print("""
Below the calculate codes which are inside underOver function
""")
KV File
Math:
<Math>:
ScreenManager:
id: sm
size: root.width, root.height
Screen:
name: 'result_screen'
Image:
source: 'images/result_background.png'
allow_stretch: True
keep_ratio: False
BoxLayout:
spacing: 20
orientation: 'vertical'
BoxLayout:
size_hint: 1, 0.10
Label:
text: '#'
font_name: 'fonts/Lcd.ttf'
font_size: '30dp'
color: 1, 0.4, 0.769, 1
Label:
text: 'T1'
font_name: 'fonts/Lcd.ttf'
font_size: '30dp'
color: 1, 0.4, 0.769, 1
Label:
text: 'T2'
font_name: 'fonts/Lcd.ttf'
font_size: '30dp'
color: 1, 0.4, 0.769, 1
Label:
text: 'G.A'
font_name: 'fonts/Lcd.ttf'
font_size: '30dp'
color: 1, 0.4, 0.769, 1
Label:
text: '2.5'
font_name: 'fonts/Lcd.ttf'
font_size: '30dp'
color: 1, 0.4, 0.769, 1
Label:
text: '3.5'
font_name: 'fonts/Lcd.ttf'
font_size: '30dp'
color: 1, 0.4, 0.769, 1
BoxLayout:
size_hint: 1, 0.80
ScrollView:
bar_margin: 5
bar_color: 1, 0.4, 0.769, 1
bar_width: 10
bar_inactive_color: 1, 0.4, 0.769, 1
GridLayout:
id: gridsonuc
cols: 1
spacing: 15
size_hint_y: None
height: self.minimum_height
BoxLayout:
size_hint: 1, 0.10
Button:
id: home_button_result
on_press: root.homepage(img_home, sm)
background_color: 0, 0, 0, 0
Image:
id: img_home
source: 'images/home_button.png'
allow_stretch: True
keep_ratio: False
size: self.parent.size
pos: home_button_result.pos
Button:
id: side_button_result
on_press: root.side(img_side, sm)
background_color: 0, 0, 0, 0
Image:
id: img_side
source: 'images/side_button.png'
allow_stretch: True
keep_ratio: False
size: self.parent.size
pos: side_button_result.pos

Python-Kivy app - popup keyboard covers input fields

Within my kivy app, I have a screen that contains several text input fields. I am using gridlayout. When I click on an input field in the lower half of the screen the popup keyboard covers the field making it difficult to see what is being entered. I have looked at scrollview for that screen but still having problems.
------------ kv file. Start of kv file':'
<FourthWindow>:
name: "fourth"
GridLayout:
orientation: "vertical"
cols: 2
padding: 10
spacing: 10
Label:
text: "Title"
width:120
height: 50
font_size: 32
background_color: (0.0/255, 0.0/255, 230.0/255, 1)
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
Button:
text: "Main"
font_size: 32
background_normal: ''
background_color: utils.get_color_from_hex('#34a1eb')
width: 240
height: 90
on_release:
app.root.current = "first"
root.manager.transition.direction = "right"
Label:
text: "Label 1"
width:70
height: 30
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spid
multiline:False
width:70
height: 50
font_size: 24
Label:
text: "Label 2"
width:70
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spfhgt
multiline:False
width: 70
height: 50
font_size: 24
Label:
text: "Label 3"
width:70
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: sptrv
multiline:False
width:70
height: 50
font_size: 24
Label:
text: "Label 4"
width:50
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: sptrv
multiline:False
width:70
height: 50
font_size: 24
Label:
text: "Label 5"
width:70
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spwgt
multiline:False
width:70
height: 50
font_size: 24
Label:
text: "Label 6"
width:70
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spod
multiline:False
width:270
height: 50
font_size: 24
Label:
text: "Label 7 "
width:270
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spsrr
multiline:False
width:270
height: 50
font_size: 24
Label:
text: "Label 8 "
width:70
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spsrgs
multiline:False
width:70
height: 50
font_size: 24
Label:
text: "Label 9 "
width:70
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spmat
multiline:False
width:70
height: 50
font_size: 24
Label:
text: "Label 10"
width:70
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spseta
multiline:False
width:270
height: 50
font_size: 24
Label:
text: "Label 11"
width:270
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: spsetb
multiline:False
width:270
height: 50
font_size: 24
Label:
text: "Label 12"
width:270
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: sprubsz
multiline:False
width:270
height: 50
font_size: 24
Label:
text: "Label 13 "
width:270
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: sprubgrv
multiline:False
width:270
height: 50
font_size: 24
Label:
text: "Label 14 "
width:270
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: sprubdurm
multiline:False
width:270
height: 50
font_size: 24
Label:
text: "Label 15 "
width:270
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: sprubmat
multiline:False
#pos_hint: {"x":0.57, "top":0.10}
width:270
height: 50
font_size: 24
Label:
text: "Label 16 "
width:270
height: 50
font_size: 24
canvas.before:
Color:
rgba: self.background_color
Rectangle:
size: self.size
pos: self.pos
color: utils.get_color_from_hex('#f2f5f7')
bold: True
italic: True
TextInput:
id: sprubnm
multiline:False
width:270
height: 50
font_size: 24
You can use Window.softinput_mode to control where the keyboard shows. I have found the following to be best for my uses:
Window.softinput_mode = ‘below_target’

How do I remove extra unwanted space in kivy BoxLayout?

<BoxExample#BoxLayout>:
orientation: "vertical"
BoxLayout:
orientation: "horizontal"
size_hint_y: None
Button:
text: "Logo"
size_hint: None, None
width: "80dp"
height: "40dp"
pos_hint: {'top': 1}
Button:
text: "Menu"
size_hint: 1, None
height: "40dp"
pos_hint: {'top': 1}
Button:
text: "Body"
Button:
text: "Footer"
size_hint: 1, None
height: "40dp"
That black space in the picture above, which I want to get rid of.
However after adding size_hint_y: None the gap has been narrowed as in the picture.
It is due to BoxLayout which provides each of its child widgets equal space but here you have changed the size of buttons which are inside of BoxLayout.You also need to change the size of BoxLayout Otherwise it will show black.
<BoxExample#BoxLayout>:
orientation: "vertical"
BoxLayout:
orientation: "horizontal"
size_hint: None,None
size:root.size[0],"40dp"
Button:
text: "Logo"
size_hint: None, None
width: "80dp"
height: "40dp"
pos_hint: {'top': 1}
Button:
text: "Menu"
size_hint: 1, None
height: "40dp"
pos_hint: {'top': 1}
Button:
text: "Body"
Button:
text: "Footer"
size_hint: 1, None
height: "40dp"
Just add:
height: self.minimum_height
to the BoxLayout:
<BoxExample#BoxLayout>:
orientation: "vertical"
BoxLayout:
orientation: "horizontal"
size_hint_y: None
height: self.minimum_height
Button:
text: "Logo"
size_hint: None, None
width: "80dp"
height: "40dp"
pos_hint: {'top': 1}
Button:
text: "Menu"
size_hint: 1, None
height: "40dp"
pos_hint: {'top': 1}
Button:
text: "Body"
Button:
text: "Footer"
size_hint: 1, None
height: "40dp"

kivy KeyError in an ids dictionary

I have the following code snippet:
def on_articles(self, *args):
#self.parent.ids['recommendations'].update_recommendations(self.articles)
self.parent.children[0].update_recommendations(self.articles)
The commented line does not work, because self.parent.ids is an empty dictionary ({})
The uncommented line does work. Why? How to best refer to Recommendations widget?
Here is the UI.
Builder.load_string('''
<SearchItem>:
canvas.before:
Color:
rgba: [0.8, 0.8, 0.8, 1] if self.state == 'normal' else [30/255, 139/255, 195/255, 1]
Rectangle:
size: self.size
pos: self.pos
Color:
rgba: 0, 0, 0, 1
Line:
rectangle: self.x, self.y, self.width, self.height
color: 0, 0, 0, 1
<Urlpopup>:
size_hint: .7, .7
auto_dismiss: False
title: ''
BoxLayout:
canvas.before:
Color:
rgba: 1, 1, 1, 1
Rectangle:
size: self.size
pos: self.pos
orientation: 'vertical'
padding: self.width * 0.1
spacing: self.height * 0.1
Spinner:
id: spinner
size_hint: None, None
size: 100, 44
text: 'en'
values: 'en', 'fr', 'de', 'it'
SearchBar:
id: searchbar
size_hint: 1, 0.4
multiline: False
font_size: self.height*0.8
Recommendations:
id: recommendations
orientation: 'vertical'
SearchItem
''')

Kivy ScrollView with two Labels and simultaneously scrolling?

I have created a UI that displays two labels with long text in the lower area. Both labels are in a separate scrollview and therefore scrollable. How can I combine both labels into a single scrollview so that both labels are scrollable at the same time? Do I need to create another Layout around a Scrollview?
Here is my kv:
<Button>:
font_size: 20
color: 0.1,0.5,0.6,1
size_hint: 0.3,0.1
<Label>:
size_hint: 0.1,0.1
<TextInput>:
size_hint: 1,0.1
<PopupBox>:
size_hint: .2, .15
auto_dismiss: True
title: 'Please wait'
Label:
pos_hint: {"x":0.5, "top":0.7}
text: 'Creating the data...'
<FloatLayout>:
canvas:
Color:
rgba: 0.15, 0.15, 0.15, 0.15
Rectangle:
size: self.size
pos: self.pos
Label:
text: "Label 1"
size_hint: 0.1,0.1
pos_hint: {"x":0.0, "top":1}
TextInput:
id: input1
pos_hint: {"x":0.11, "top":1}
multiline: True
Label:
text: "Label 2"
size_hint: 0.1,0.1
pos_hint: {"x":0.0, "top":0.9}
TextInput:
id: input2
pos_hint: {"x":0.11, "top":0.9}
multiline: True
Label:
text: "Label 3"
size_hint: 0.11, None
pos_hint: {"x":0, "top":0.8}
height: 30
TextInput:
id: input3
text: "|"
pos_hint: {"x":0.11, "top":0.8}
size_hint: 0.03, None
height: 30
Button:
text: "Clear"
on_press: app.clear_inputs()
pos_hint: {"x":0.15, "top":0.8}
size_hint: 0.1, None
height: 30
Label:
id: dd_label
text: "dd"
pos_hint: {"x":0.7, "top":0.8}
size_hint: 0.1, None
height: 30
Button:
text: "Comp"
on_press: app.start_second_thread()
pos_hint: {"x":0, "top":0.76}
size_hint: 1, None
height: 50
Button:
text: "So"
on_press: app.show_popup()
pos_hint: {"x":0, "top":0.69}
size_hint: 0.1, None
height: 25
GridLayout:
cols: 2
size_hint: 1, 0.67
ScrollView:
size_hint: (1, 1)
bar_width: 10
bar_color: 0.1, 0.1, 0.1, 0.1
bar_inactive_color: 0.15, 0.15, 0.15, 0.15
effect_cls: "ScrollEffect"
scroll_type: ['bars']
Label:
id: f_output1
text: "long text1 \n" * 100
size_hint_y: None
size_hint_x: 0.7
size: self.texture_size
pos_hint: {"x":0.6, "top":0.7}
markup: True
text_size: 700, None
valign: "middle"
halign: 'right'
padding_x: 5
ScrollView:
size_hint: (1, 1)
bar_width: 10
bar_color: 0.1, 0.1, 0.1, 0.1
bar_inactive_color: 0.15, 0.15, 0.15, 0.15
effect_cls: "ScrollEffect"
scroll_type: ['bars']
Label:
id: f_output2
text: "long text2 \n" * 100
size_hint_y: None
size_hint_x: 1
size: self.texture_size
pos_hint: {"x":0.6, "top":0.7}
text_size: 600, None
markup: True
You can make a single ScrollView and make create a GridLayout with cols:2 for 2 labels
ScrollView:
size_hint: (1, 1)
bar_width: 10
bar_color: 0.1, 0.1, 0.1, 0.1
bar_inactive_color: 0.15, 0.15, 0.15, 0.15
effect_cls: "ScrollEffect"
scroll_type: ['bars']
GridLayout:
cols: 2
size_hint_y:None
height:self.minimum_height
Label:
id: f_output1
text: "long text1 \n" * 100
size_hint_y: None
size_hint_x: 0.7
size: self.texture_size
pos_hint: {"x":0.6, "top":0.7}
markup: True
text_size: 700, None
valign: "middle"
halign: 'right'
padding_x: 5
Label:
id: f_output2
text: "long text2 \n" * 100
size_hint_y: None
size_hint_x: 1
size: self.texture_size
pos_hint: {"x":0.6, "top":0.7}
text_size: 600, None
markup: True

Resources