Ticket #3715: Fix_size_handle_in_help_view.diff

File Fix_size_handle_in_help_view.diff, 1.7 KB (added by godiard, 12 years ago)
  • helpwidget.py

    diff --git a/helpwidget.py b/helpwidget.py
    index a7b8930..b89922e 100644
    a b class _HelpStage(Gtk.EventBox): 
    142142        self.add(hbox)
    143143
    144144        vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
    145         hbox.pack_start(vbox, expand=True, fill=False,
     145        hbox.pack_start(vbox, expand=True, fill=True,
    146146                        padding=_DEFAULT_SPACING)
    147147
    148148        self.preview = _PreviewWidget(icon_file_func)
    class _PreviewWidget(Gtk.DrawingArea): 
    824824        logging.debug('FUNC: _configure_event_cb()')
    825825        (width, height) = (event.width, event.height)
    826826
    827         avail_width = width - _DEFAULT_SPACING * 2
    828         other_height = avail_width * 3 / 4
     827        actual_width = width - style.GRID_CELL_SIZE * 4
     828        actual_height = actual_width * 3 / 4
    829829
    830         avail_height = height - _DEFAULT_SPACING * 2
    831         other_width = avail_height * 4 / 3
     830#        other_height = avail_width * 3 / 4
    832831
    833         if other_height < avail_height:
    834             actual_width = avail_width
    835             actual_height = other_height
    836         else:
    837             actual_width = other_width
    838             actual_height = avail_height
     832#        avail_height = height - _DEFAULT_SPACING * 2
     833#        other_width = avail_height * 4 / 3
     834
     835#        if other_height < avail_height:
     836#            actual_width = avail_width
     837#            actual_height = other_height
     838#        else:
     839#            actual_width = other_width
     840#            actual_height = avail_height
     841
     842        self.set_size_request(actual_width, actual_height)
    839843
    840844        icon_height = int(math.ceil(actual_height * _ICON_HEIGHT))
    841845        board_height = actual_height - icon_height