|
@@ -1,6 +1,7 @@
|
|
from kivy.app import App
|
|
from kivy.app import App
|
|
from kivy.uix.widget import Widget
|
|
from kivy.uix.widget import Widget
|
|
from kivy.uix.button import Button
|
|
from kivy.uix.button import Button
|
|
|
|
+from kivy.uix.gridlayout import GridLayout
|
|
from kivy.properties import (
|
|
from kivy.properties import (
|
|
StringProperty,NumericProperty,
|
|
StringProperty,NumericProperty,
|
|
)
|
|
)
|
|
@@ -48,9 +49,14 @@ class InfoWidget(Widget):
|
|
# else:
|
|
# else:
|
|
# print("Failed to connect to device.")
|
|
# print("Failed to connect to device.")
|
|
def debug(self):
|
|
def debug(self):
|
|
- for i in range(6):
|
|
|
|
- button = Button(text=str(i) + "!!!!!!")
|
|
|
|
- self.add_widget(button)
|
|
|
|
|
|
+ # self.size = (800,480)
|
|
|
|
+ grid = GridLayout(cols=2,rows=4,width=self.width,height=self.height)
|
|
|
|
+ self.add_widget(grid)
|
|
|
|
+ for i in range(8):
|
|
|
|
+ button = Button(text=str(i))
|
|
|
|
+ button.width = grid.width / 2
|
|
|
|
+ button.height = grid.height / 4
|
|
|
|
+ grid.add_widget(button)
|
|
|
|
|
|
class STI2021A(App):
|
|
class STI2021A(App):
|
|
def build(self):
|
|
def build(self):
|