r7038 - bigboard/trunk/bigboard
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7038 - bigboard/trunk/bigboard
- Date: Wed, 12 Dec 2007 10:44:26 -0600 (CST)
Author: hp
Date: 2007-12-12 10:44:22 -0600 (Wed, 12 Dec 2007)
New Revision: 7038
Modified:
bigboard/trunk/bigboard/scroll_ribbon.py
Log:
shrink the scroll ribbon buttons
Modified: bigboard/trunk/bigboard/scroll_ribbon.py
===================================================================
--- bigboard/trunk/bigboard/scroll_ribbon.py 2007-12-12 15:59:21 UTC (rev 7037)
+++ bigboard/trunk/bigboard/scroll_ribbon.py 2007-12-12 16:44:22 UTC (rev 7038)
@@ -8,6 +8,28 @@
_logger = logging.getLogger("bigboard.ScrollRibbon")
+gtk.rc_parse_string("""
+ style "less-padding-button-style"
+ {
+ GtkWidget::focus-line-width=0
+ GtkWidget::focus-padding=0
+ GtkButton::interior-focus=0
+ }
+
+ widget "*.scroll-ribbon-button" style "less-padding-button-style"
+""")
+
+class SmallerArrow(gtk.Arrow):
+ def __init__(self, direction, shadow):
+ gtk.Arrow.__init__(self, direction, shadow)
+
+ def do_size_request(self, req):
+ gtk.Arrow.do_size_request(self, req)
+ req.height -= 2
+ req.width -= 2
+
+gobject.type_register(SmallerArrow)
+
class ScrollRibbonLayout(gobject.GObject,hippo.CanvasLayout):
"""A Canvas Layout manager that creates a scrollable area with buttons
@@ -48,12 +70,14 @@
self.__down_button = hippo.CanvasButton()
up_widget = self.__up_button.get_property('widget')
- up_widget.add(gtk.Arrow(gtk.ARROW_UP, gtk.SHADOW_NONE))
+ up_widget.set_name("scroll-ribbon-button")
+ up_widget.add(SmallerArrow(gtk.ARROW_UP, gtk.SHADOW_NONE))
up_widget.get_child().show()
up_widget.set_relief(gtk.RELIEF_NONE)
down_widget = self.__down_button.get_property('widget')
- down_widget.add(gtk.Arrow(gtk.ARROW_DOWN, gtk.SHADOW_NONE))
+ down_widget.set_name("scroll-ribbon-button")
+ down_widget.add(SmallerArrow(gtk.ARROW_DOWN, gtk.SHADOW_NONE))
down_widget.get_child().show()
down_widget.set_relief(gtk.RELIEF_NONE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]