Skip to content
Permalink
b6f72ecdfe
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
62 lines (55 sloc) 1.08 KB
from kivy.lang import Builder
from kivy.uix.screenmanager import Screen
Builder.load_string('''
<Setup>:
name:'setup'
BoxLayout:
orientation:'vertical'
Widget:
MDLabel:
text: ' Server Connection Setup'
font_style:'H4'
adaptive_height:True
halign:'center'
Widget:
MDTextField:
id:host
hint_text:'Host'
size_hint_x:.8
pos_hint:{'center_x':.5}
MDTextField:
id:port
hint_text:'Port'
size_hint_x:.8
pos_hint:{'center_x':.5}
MDLabel:
theme_text_color:'Custom'
text_color:1,0,0,1
id:error
adaptive_height:True
halign:'center'
Widget:
BoxLayout:
size_hint_y:None
height:dp(50)
Widget:
Button:
text:'Exit'
background_color:1,0,0,1
on_release:app.exit()
Widget:
Button:
text:'Create Server'
background_color:0,1,0,1
on_release:app.setupServer()
Widget:
Widget:
''')
class Setup(Screen):
pass
if __name__ == '__main__':
from kivymd.app import MDApp
class SetupApp(MDApp):
def build(self):
return Setup()
SetupApp().run()