From 3c1bf990be6047b0749d707d2aea187f6195770e Mon Sep 17 00:00:00 2001 From: qua-non Date: Mon, 26 Nov 2012 06:32:35 +0530 Subject: [PATCH 1/4] UIX: Widget fix canvas positioning when inserting at first position ref: issue #819 --- kivy/uix/widget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/uix/widget.py b/kivy/uix/widget.py index ae3153a4e..7e2628e53 100644 --- a/kivy/uix/widget.py +++ b/kivy/uix/widget.py @@ -280,7 +280,7 @@ class Widget(EventDispatcher): children = self.children if index >= len(children): index = len(children) - next_index = 0 + next_index = -1 else: next_child = children[index] next_index = canvas.indexof(next_child.canvas) From 3c98cbdf2db390bf76e2c7694b74ce34a3fcc6ef Mon Sep 17 00:00:00 2001 From: Julien Miotte Date: Thu, 29 Nov 2012 01:28:39 +0100 Subject: [PATCH 2/4] Fixing the docstring: the attribute name was wrong --- kivy/uix/popup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kivy/uix/popup.py b/kivy/uix/popup.py index 61fbca346..86b4d1075 100644 --- a/kivy/uix/popup.py +++ b/kivy/uix/popup.py @@ -115,7 +115,7 @@ class Popup(ModalView): .. 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.] ''' From 6440fd88eadd46d39111e3b92164021f257778a9 Mon Sep 17 00:00:00 2001 From: Julien Miotte Date: Thu, 29 Nov 2012 01:36:55 +0100 Subject: [PATCH 3/4] Amending docstring: precision on non-fullscreen ModalViews/Popups --- kivy/uix/modalview.py | 5 +++-- kivy/uix/popup.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kivy/uix/modalview.py b/kivy/uix/modalview.py index 92ebe7a18..e9fc6f0a0 100644 --- a/kivy/uix/modalview.py +++ b/kivy/uix/modalview.py @@ -8,8 +8,9 @@ The :class:`ModalView` widget is used to create modal views. By default, the view will cover the whole "parent" window. 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 -size attribute. +want your view to be fullscreen, either use lower than 1 size hints (for +instance size_hint=(.8, .8)) or deactivate the size_hint and use fixed size +attributes. Examples -------- diff --git a/kivy/uix/popup.py b/kivy/uix/popup.py index 61fbca346..42f1d5f98 100644 --- a/kivy/uix/popup.py +++ b/kivy/uix/popup.py @@ -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. 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 -size attribute. +want your popup to be fullscreen, either use lower than 1 size hints (for +instance size_hint=(.8, .8)) or deactivate the size_hint and use fixed size +attributes. .. versionchanged:: 1.4.0 From bcfbd68306e3fd2f3a0fa286f3b803dbc23863f0 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 29 Nov 2012 15:43:38 +0100 Subject: [PATCH 4/4] window: remove the alpha size needed, because i am not able to tell why it is needed, and because it's failing for few users, let's remove it. Plus add a couple of informations about the GL window opened. closes #808 --- kivy/core/window/window_pygame.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/kivy/core/window/window_pygame.py b/kivy/core/window/window_pygame.py index 6db0ea61e..c8cf59665 100644 --- a/kivy/core/window/window_pygame.py +++ b/kivy/core/window/window_pygame.py @@ -66,7 +66,6 @@ class WindowPygame(WindowBase): multisamples) 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_ALPHA_SIZE, 8) pygame.display.set_caption(self.title) if self.position == 'auto': @@ -135,6 +134,22 @@ class WindowPygame(WindowBase): self._size = (info.current_w, info.current_h) #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() # set mouse visibility