Ejemplo n.º 1
0
    def on_size(self, instance, value):
        width, height = value
        self._orientation = "landscape" if width > height else "portrait"

        global inch
        if not inch:
            from kivy.metrics import inch

        self._ui_mode = "tablet" if min(width, height) > inch(3.51) else "phone"
        Logger.debug("orientation: {} ui_mode: {}".format(self._orientation, self._ui_mode))
Ejemplo n.º 2
0
    def on_size(self, instance, value):
        width, height = value
        self._orientation = 'landscape' if width > height else 'portrait'

        global inch
        if not inch:
            from kivy.metrics import inch

        self._ui_mode = 'tablet' if min(width, height) > inch(3.51) else 'phone'
        Logger.debug('orientation: {} ui_mode: {}'.format(self._orientation,
                                                          self._ui_mode))
Ejemplo n.º 3
0
 def on_size(self, instance, value):
     width, height = value
     self._orientation = 'landscape' if width > height else 'portrait'
     self._ui_mode = 'tablet' if min(width, height) > inch(3.51) else 'phone'
Ejemplo n.º 4
0
 def on_size(self, instance, value):
     width, height = value
     self._orientation = "landscape" if width > height else "portrait"
     self._ui_mode = "tablet" if min(width, height) > inch(3.51) else "phone"
Ejemplo n.º 5
0
 def on_size(self, instance, value):
     width, height = value
     self._orientation = 'landscape' if width > height else 'portrait'
     self._ui_mode = 'tablet' if min(width,
                                     height) > inch(3.51) else 'phone'