resize widget size
This commit is contained in:
parent
b69626d0ec
commit
5909b62ce8
@ -1,7 +1,6 @@
|
||||
#:kivy 1.0
|
||||
|
||||
<guiApp>:
|
||||
width: 400
|
||||
Button:
|
||||
id: prev
|
||||
|
||||
|
@ -2,14 +2,18 @@
|
||||
|
||||
from ..VDM import VDM
|
||||
import os
|
||||
import i3
|
||||
|
||||
from kivy.config import Config
|
||||
Config.set('graphics','resizable',0)
|
||||
from kivy.core.window import Window
|
||||
Window.size = (600, 150)
|
||||
|
||||
import kivy
|
||||
import i3
|
||||
from kivy.app import App
|
||||
from kivy.properties import *
|
||||
from kivy.uix.gridlayout import GridLayout
|
||||
|
||||
|
||||
class guiApp(GridLayout):
|
||||
""" display all vdm into kivy interface """
|
||||
|
||||
@ -22,17 +26,14 @@ class guiApp(GridLayout):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(guiApp, self).__init__(**kwargs)
|
||||
from kivy.config import Config
|
||||
Config.set('graphics', 'width', '600')
|
||||
|
||||
from kivy.core.window import Window
|
||||
|
||||
self._keyboard = Window.request_keyboard(self._keyboard_closed, self)
|
||||
self._keyboard.bind(on_key_down = self._on_keyboard_down)
|
||||
i3.msg("command", "floating enable")
|
||||
|
||||
self.v = VDM()
|
||||
self.vdm = self.v.get()
|
||||
self.render()
|
||||
i3.msg("command", "floating enable")
|
||||
|
||||
def _nextAction(self):
|
||||
if self.indice == len(self.vdm)-1:
|
||||
@ -62,7 +63,6 @@ class guiApp(GridLayout):
|
||||
print(self.indice)
|
||||
self.ids["Message"].text = self.vdm[self.indice]
|
||||
|
||||
|
||||
class kivyApp(App):
|
||||
def build(self):
|
||||
return guiApp(cols=3)
|
||||
|
@ -24,7 +24,13 @@ class VDM(object):
|
||||
else:
|
||||
print("Error {}".format(r.status_code))
|
||||
|
||||
except ConnectionError as e:
|
||||
print("Connection error {}".format(e))
|
||||
|
||||
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
raise errorVDM("network error")
|
||||
|
||||
except HTTPError as e:
|
||||
raise errorVDM("HTTP Error")
|
||||
|
||||
class errorVDM(Exception):
|
||||
def __init__(self, message):
|
||||
super(errorVDM, self).__init__(message)
|
||||
|
BIN
dist/VDM API-1.0.tar.gz
vendored
BIN
dist/VDM API-1.0.tar.gz
vendored
Binary file not shown.
BIN
dist/VDM_API-1.0-py2.py3-none-any.whl
vendored
BIN
dist/VDM_API-1.0-py2.py3-none-any.whl
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user