Ticket #1294: sugar-1294.patch

File sugar-1294.patch, 3.2 KB (added by alsroot, 12 years ago)
  • src/jarabe/frame/framewindow.py

    From af7542947aad4fe56668e1cac0e523a15ff9ac13 Mon Sep 17 00:00:00 2001
    From: Aleksey Lim <alsroot@member.fsf.org>
    Date: Mon, 7 Sep 2009 08:33:54 +0000
    Subject: Hidden decorations of corner frame buttons #1294
    
    ---
     src/jarabe/frame/framewindow.py |   39 ++++++++++++++++++++++++---------------
     1 files changed, 24 insertions(+), 15 deletions(-)
    
    diff --git a/src/jarabe/frame/framewindow.py b/src/jarabe/frame/framewindow.py
    index e717d35..a7d8fe7 100644
    a b class FrameWindow(gtk.Window): 
    4545        box = hippo.CanvasBox()
    4646        self._canvas.set_root(box)
    4747
     48        bg_box = hippo.CanvasBox(
     49                border_color=style.COLOR_BUTTON_GREY.get_int())
     50        box.append(bg_box, hippo.PACK_EXPAND)
     51
     52        self._bg = hippo.CanvasBox()
     53        bg_box.append(self._bg, hippo.PACK_EXPAND)
     54
    4855        padding = style.GRID_CELL_SIZE
    49         if self._position == gtk.POS_TOP or self._position == gtk.POS_BOTTOM:
     56        border = style.LINE_WIDTH
     57
     58        if position == gtk.POS_TOP or position == gtk.POS_BOTTOM:
    5059            box.props.orientation = hippo.ORIENTATION_HORIZONTAL
    5160            box.props.padding_left = padding
    5261            box.props.padding_right = padding
    5362            box.props.padding_top = 0
    5463            box.props.padding_bottom = 0
     64            self._bg.props.orientation = hippo.ORIENTATION_HORIZONTAL
     65            self._bg.props.padding_left = border * 2
     66            self._bg.props.padding_right = border * 2
    5567        else:
    5668            box.props.orientation = hippo.ORIENTATION_VERTICAL
    5769            box.props.padding_left = 0
    5870            box.props.padding_right = 0
    5971            box.props.padding_top = padding
    6072            box.props.padding_bottom = padding
     73            self._bg.props.orientation = hippo.ORIENTATION_VERTICAL
     74            self._bg.props.padding_top = border * 2
     75            self._bg.props.padding_bottom = border * 2
    6176
    62         self._bg = hippo.CanvasBox(
    63                 border_color=style.COLOR_BUTTON_GREY.get_int())
    64 
    65         border = style.LINE_WIDTH
    6677        if position == gtk.POS_TOP:
    67             self._bg.props.orientation = hippo.ORIENTATION_HORIZONTAL
    68             self._bg.props.border_bottom = border
     78            bg_box.props.orientation = hippo.ORIENTATION_HORIZONTAL
     79            bg_box.props.border_bottom = border
    6980        elif position == gtk.POS_BOTTOM:
    70             self._bg.props.orientation = hippo.ORIENTATION_HORIZONTAL
    71             self._bg.props.border_top = border
     81            bg_box.props.orientation = hippo.ORIENTATION_HORIZONTAL
     82            bg_box.props.border_top = border
    7283        elif position == gtk.POS_LEFT:
    73             self._bg.props.orientation = hippo.ORIENTATION_VERTICAL
    74             self._bg.props.border_right = border
     84            bg_box.props.orientation = hippo.ORIENTATION_VERTICAL
     85            bg_box.props.border_right = border
    7586        elif position == gtk.POS_RIGHT:
    76             self._bg.props.orientation = hippo.ORIENTATION_VERTICAL
    77             self._bg.props.border_left = border
    78 
    79         box.append(self._bg, hippo.PACK_EXPAND)
     87            bg_box.props.orientation = hippo.ORIENTATION_VERTICAL
     88            bg_box.props.border_left = border
    8089
    8190        self._update_size()
    8291