Changeset 268:9a90e1d8c5a2


Ignore:
Timestamp:
07/01/12 17:38:25 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added a scroll window around the file lists in the checklist and the approach callouts editors

Location:
src/mlx/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/callouts.py

    r267 r268  
    8585        # FIXME: common code until here, but note that some texts are different
    8686
    87         fileBox = gtk.HBox()       
     87        contentBox = gtk.HBox()       
    8888
    8989        controlBox = gtk.VBox()
     
    9393                                     padding_left = 32, padding_right = 32)
    9494        controlAlignment.add(controlBox)
    95         fileBox.pack_start(controlAlignment, False, False, 0)
     95        contentBox.pack_start(controlAlignment, False, False, 0)
    9696
    9797        self._addButton = gtk.Button(xstr("callouts_add"))
     
    154154       
    155155        self._fileList.set_tooltip_column(2)
     156        self._fileList.set_size_request(300, -1)
    156157        self._fileList.set_reorderable(False)
    157         self._fileList.set_size_request(300, -1)
    158158        selection = self._fileList.get_selection()
    159159        selection.set_mode(SELECTION_MULTIPLE)
    160160        selection.connect("changed", self._fileListSelectionChanged)
    161161       
    162         fileBox.pack_start(self._fileList, False, False, 4)
    163 
    164         contentArea.pack_start(fileBox, True, True, 4)
    165 
    166         self.set_size_request(400, 300)
     162        scrolledWindow = gtk.ScrolledWindow()
     163        scrolledWindow.add(self._fileList)
     164        scrolledWindow.set_size_request(300, -1)
     165        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
     166        scrolledWindow.set_shadow_type(SHADOW_IN)
     167       
     168        fileListAlignment = gtk.Alignment(xscale=1.0, yscale=1.0,
     169                                          xalign=0.5, yalign=0.5)
     170        fileListAlignment.set_padding(padding_top = 0, padding_bottom = 16,
     171                                      padding_left = 0, padding_right = 8)
     172        fileListAlignment.add(scrolledWindow)
     173       
     174        contentBox.pack_start(fileListAlignment, False, False, 4)
     175
     176        contentArea.pack_start(contentBox, True, True, 4)
     177
     178        self.set_size_request(-1, 300)
    167179
    168180    def run(self):
  • src/mlx/gui/checklist.py

    r266 r268  
    149149        self._fileList.set_tooltip_column(1)
    150150        self._fileList.set_reorderable(True)
    151         self._fileList.set_size_request(200, -1)
    152151        selection = self._fileList.get_selection()
    153152        selection.set_mode(SELECTION_MULTIPLE)
    154153        selection.connect("changed", self._fileListSelectionChanged)
    155154
    156         fileBox.pack_start(self._fileList, False, False, 4)
     155        scrolledWindow = gtk.ScrolledWindow()
     156        scrolledWindow.add(self._fileList)
     157        scrolledWindow.set_size_request(200, -1)
     158        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
     159        scrolledWindow.set_shadow_type(SHADOW_IN)
     160
     161        fileBox.pack_start(scrolledWindow, False, False, 4)
    157162
    158163        contentArea.pack_start(fileBox, True, True, 4)
Note: See TracChangeset for help on using the changeset viewer.