bigboard r7418 - trunk/bigboard/core
- From: otaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7418 - trunk/bigboard/core
- Date: Mon, 18 Aug 2008 16:36:43 +0000 (UTC)
Author: otaylor
Date: Mon Aug 18 16:36:42 2008
New Revision: 7418
URL: http://svn.gnome.org/viewvc/bigboard?rev=7418&view=rev
Log:
Don't force stocks out to the size of the vertical label when bigboard is expanded.
Modified:
trunk/bigboard/core/stock_holder.py
Modified: trunk/bigboard/core/stock_holder.py
==============================================================================
--- trunk/bigboard/core/stock_holder.py (original)
+++ trunk/bigboard/core/stock_holder.py Mon Aug 18 16:36:42 2008
@@ -92,6 +92,8 @@
if child == active_child:
(min_height, natural_height) = child.get_height_request(width)
else:
+ if not self.__box.use_max_height:
+ continue
(_, natural_width) = child.get_width_request()
(min_height, natural_height) = child.get_height_request(natural_width)
@@ -119,6 +121,7 @@
hippo.CanvasBox.__init__(self, *args, **kwargs)
self.set_layout(StackLayout())
self.active = None
+ self.use_max_height = True
def add(self, child):
self.append(child, hippo.PACK_EXPAND)
@@ -130,6 +133,11 @@
self.emit_request_changed()
self.emit_paint_needed(0, 0, -1, -1)
+ def set_use_max_height(self, use_max_height):
+ self.use_max_height = use_max_height
+ self.emit_request_changed()
+ self.emit_paint_needed(0, 0, -1, -1)
+
class StockHolder(ExpandBox):
"""A renderer for stocks."""
@@ -151,6 +159,7 @@
self.__ticker_container = None
self.__stack = Stack()
+ self.__stack.set_use_max_height(False)
self.append(self.__stack)
self.__stack.connect('motion-notify-event', self.__on_stack_motion_notify)
self.__visible_contents = hippo.CanvasBox(orientation=hippo.ORIENTATION_VERTICAL,
@@ -282,6 +291,7 @@
def set_hidden(self, hidden):
self.hidden = hidden
self.__update_appears_hidden()
+ self.__stack.set_use_max_height(hidden)
def __sync_visibility(self):
if self.get_context():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]