Changeset 1072

Show
Ignore:
Timestamp:
11/13/06 17:49:11 (2 years ago)
Author:
wrobell
Message:

- use minimal size style information where appropriate

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphor/branches/new-canvas/gaphor/diagram/action.py

    r1059 r1072  
    1313    __uml__   = UML.Action 
    1414    __style__ = { 
     15        'min-size':   (50, 30), 
    1516        'name-align': (ALIGN_CENTER, ALIGN_MIDDLE), 
    1617    } 
  • gaphor/branches/new-canvas/gaphor/diagram/activitynodes.py

    r1063 r1072  
    2525    } 
    2626 
    27     def __init__(self, id=None, width=0, height=0): 
    28         NamedItem.__init__(self, id, width, height
     27    def __init__(self, id=None): 
     28        NamedItem.__init__(self, id
    2929        # Do not allow resizing of the node 
    3030        for h in self._handles: 
     
    3939    __uml__     = UML.InitialNode 
    4040    __style__   = { 
     41        'min-size':   (20, 20), 
    4142        'name-align': (ALIGN_LEFT, ALIGN_TOP), 
    4243    } 
    4344     
    4445    RADIUS = 10 
    45  
    46     def __init__(self, id = None, width = 20, height = 20): 
    47         ActivityNodeItem.__init__(self, id, width, height) 
    4846 
    4947    def draw(self, context): 
     
    6563    __uml__ = UML.ActivityFinalNode 
    6664    __style__   = { 
     65        'min-size':   (30, 30), 
    6766        'name-align': (ALIGN_RIGHT, ALIGN_BOTTOM), 
    6867    } 
     
    7170    RADIUS_2 = 15 
    7271 
    73     def __init__(self, id=None, width=30, height=30): 
    74         ActivityNodeItem.__init__(self, id, width, height) 
    75  
    7672    def draw(self, context): 
    7773        cr = context.cairo 
     
    9995    __uml__ = UML.FlowFinalNode 
    10096    __style__   = { 
     97        'min-size':   (20, 20), 
    10198        'name-align': (ALIGN_RIGHT, ALIGN_BOTTOM), 
    10299    } 
    103100 
    104101    RADIUS = 10 
    105  
    106     def __init__(self, id=None, width=20, height=20): 
    107         ActivityNodeItem.__init__(self, id, width, height) 
    108102 
    109103    def draw(self, context): 
     
    132126    """ 
    133127 
    134     def __init__(self, id, width, height): 
    135         ActivityNodeItem.__init__(self, id, width, height
     128    def __init__(self, id=None): 
     129        ActivityNodeItem.__init__(self, id
    136130        self._combined = False 
    137131        self.set_prop_persistent('combined') 
     
    161155    __uml__   = UML.DecisionNode 
    162156    __style__   = { 
     157        'min-size':   (20, 30), 
    163158        'name-align': (ALIGN_LEFT, ALIGN_TOP), 
    164159    } 
    165160 
    166161    RADIUS = 15 
    167  
    168     def __init__(self, id=None, width = 20, height = 30): 
    169         FDNode.__init__(self, id, width, height) 
    170162 
    171163    def draw(self, context): 
     
    195187    #__uml__   = UML.ForkNode 
    196188    __style__ = { 
     189        'min-size':   (6, 45), 
    197190        'name-align': (ALIGN_CENTER, ALIGN_BOTTOM), 
    198191    } 
    199192 
    200     def __init__(self, id = None, width = 6.0, height = 45.0): 
    201 #        GroupBase.__init__(self) 
    202         FDNode.__init__(self, id, width, height) 
     193    def __init__(self, id=None): 
     194        FDNode.__init__(self, id) 
    203195 
    204196        self._join_spec = 'join spec test'