← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol/openlp/bug-1164925 into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol/openlp/bug-1164925 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1164925 in OpenLP: "Separate blank buttons don't hide on resizing"
  https://bugs.launchpad.net/openlp/+bug/1164925

For more details, see:
https://code.launchpad.net/~googol/openlp/bug-1164925/+merge/157325

Hello,

- reduced threshold for "separate blank button" (bug #1164925)

http://ci.openlp.org/view/Specific%20Branch/job/OpenLP-Pull_and_Run_Functional_Tests/77/console
http://ci.openlp.org/view/Specific%20Branch/job/OpenLP-Pull_and_Run_Interface_Tests/23/console
-- 
https://code.launchpad.net/~googol/openlp/bug-1164925/+merge/157325
Your team OpenLP Core is requested to review the proposed merge of lp:~googol/openlp/bug-1164925 into lp:openlp.
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2013-03-26 07:34:42 +0000
+++ openlp/core/ui/slidecontroller.py	2013-04-05 10:54:23 +0000
@@ -588,12 +588,14 @@
         if self.is_live:
             # Space used by the toolbar.
             used_space = self.toolbar.size().width() + self.hide_menu.size().width()
-            # The + 40 is needed to prevent flickering. This can be considered a "buffer".
-            if width > used_space + 40 and self.hide_menu.isVisible():
+            # Threshold which has to be trespassed to toggle.
+            threshold = 27
+            # Add the threshold to prevent flickering.
+            if width > used_space + threshold and self.hide_menu.isVisible():
                 self.toolbar.set_widget_visible(self.narrow_menu, False)
                 self.toolbar.set_widget_visible(self.wide_menu)
-            # The - 40 is needed to prevent flickering. This can be considered a "buffer".
-            elif width < used_space - 40 and not self.hide_menu.isVisible():
+            # Take away a threshold to prevent flickering.
+            elif width < used_space - threshold and not self.hide_menu.isVisible():
                 self.toolbar.set_widget_visible(self.wide_menu, False)
                 self.toolbar.set_widget_visible(self.narrow_menu)
 


Follow ups