mirror of https://github.com/kivy/kivy.git
Merge branch 'master' of github.com:kivy/kivy
This commit is contained in:
commit
27c30cec12
|
@ -66,7 +66,6 @@ class WindowPygame(WindowBase):
|
||||||
multisamples)
|
multisamples)
|
||||||
pygame.display.gl_set_attribute(pygame.GL_DEPTH_SIZE, 16)
|
pygame.display.gl_set_attribute(pygame.GL_DEPTH_SIZE, 16)
|
||||||
pygame.display.gl_set_attribute(pygame.GL_STENCIL_SIZE, 1)
|
pygame.display.gl_set_attribute(pygame.GL_STENCIL_SIZE, 1)
|
||||||
pygame.display.gl_set_attribute(pygame.GL_ALPHA_SIZE, 8)
|
|
||||||
pygame.display.set_caption(self.title)
|
pygame.display.set_caption(self.title)
|
||||||
|
|
||||||
if self.position == 'auto':
|
if self.position == 'auto':
|
||||||
|
@ -135,6 +134,22 @@ class WindowPygame(WindowBase):
|
||||||
self._size = (info.current_w, info.current_h)
|
self._size = (info.current_w, info.current_h)
|
||||||
#self.dispatch('on_resize', *self._size)
|
#self.dispatch('on_resize', *self._size)
|
||||||
|
|
||||||
|
# in order to debug futur issue with pygame/display, let's show
|
||||||
|
# more debug output.
|
||||||
|
Logger.debug('Window: Display driver ' + pygame.display.get_driver())
|
||||||
|
Logger.debug('Window: Actual window size: %dx%d',
|
||||||
|
info.current_w, info.current_h)
|
||||||
|
Logger.debug('Window: Actual color bits r%d g%d b%d a%d',
|
||||||
|
pygame.display.gl_get_attribute(pygame.GL_RED_SIZE),
|
||||||
|
pygame.display.gl_get_attribute(pygame.GL_GREEN_SIZE),
|
||||||
|
pygame.display.gl_get_attribute(pygame.GL_BLUE_SIZE),
|
||||||
|
pygame.display.gl_get_attribute(pygame.GL_ALPHA_SIZE))
|
||||||
|
Logger.debug('Window: Actual depth bits: %d',
|
||||||
|
pygame.display.gl_get_attribute(pygame.GL_DEPTH_SIZE))
|
||||||
|
Logger.debug('Window: Actual stencil bits: %d',
|
||||||
|
pygame.display.gl_get_attribute(pygame.GL_STENCIL_SIZE))
|
||||||
|
Logger.debug('Window: Actual multisampling samples: %d',
|
||||||
|
pygame.display.gl_get_attribute(pygame.GL_MULTISAMPLESAMPLES))
|
||||||
super(WindowPygame, self).create_window()
|
super(WindowPygame, self).create_window()
|
||||||
|
|
||||||
# set mouse visibility
|
# set mouse visibility
|
||||||
|
|
|
@ -8,8 +8,9 @@ The :class:`ModalView` widget is used to create modal views. By default, the
|
||||||
view will cover the whole "parent" window.
|
view will cover the whole "parent" window.
|
||||||
|
|
||||||
Remember that the default size of a Widget is size_hint=(1, 1). If you don't
|
Remember that the default size of a Widget is size_hint=(1, 1). If you don't
|
||||||
want your view to be fullscreen, deactivate the size_hint and use a specific
|
want your view to be fullscreen, either use lower than 1 size hints (for
|
||||||
size attribute.
|
instance size_hint=(.8, .8)) or deactivate the size_hint and use fixed size
|
||||||
|
attributes.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -12,8 +12,9 @@ will cover the whole "parent" window. When you are creating a popup, you must at
|
||||||
a minimum set a :data:`Popup.title` and a :data:`Popup.content` widget.
|
a minimum set a :data:`Popup.title` and a :data:`Popup.content` widget.
|
||||||
|
|
||||||
Remember that the default size of a Widget is size_hint=(1, 1). If you don't
|
Remember that the default size of a Widget is size_hint=(1, 1). If you don't
|
||||||
want your popup to be fullscreen, deactivate the size_hint and use a specific
|
want your popup to be fullscreen, either use lower than 1 size hints (for
|
||||||
size attribute.
|
instance size_hint=(.8, .8)) or deactivate the size_hint and use fixed size
|
||||||
|
attributes.
|
||||||
|
|
||||||
|
|
||||||
.. versionchanged:: 1.4.0
|
.. versionchanged:: 1.4.0
|
||||||
|
@ -115,7 +116,7 @@ class Popup(ModalView):
|
||||||
|
|
||||||
.. versionadded:: 1.1.0
|
.. versionadded:: 1.1.0
|
||||||
|
|
||||||
:data:`background_color` is a :class:`~kivy.properties.ListProperty`,
|
:data:`separator_color` is a :class:`~kivy.properties.ListProperty`,
|
||||||
default to [47 / 255., 167 / 255., 212 / 255., 1.]
|
default to [47 / 255., 167 / 255., 212 / 255., 1.]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
|
@ -280,7 +280,7 @@ class Widget(EventDispatcher):
|
||||||
children = self.children
|
children = self.children
|
||||||
if index >= len(children):
|
if index >= len(children):
|
||||||
index = len(children)
|
index = len(children)
|
||||||
next_index = 0
|
next_index = -1
|
||||||
else:
|
else:
|
||||||
next_child = children[index]
|
next_child = children[index]
|
||||||
next_index = canvas.indexof(next_child.canvas)
|
next_index = canvas.indexof(next_child.canvas)
|
||||||
|
|
Loading…
Reference in New Issue