Method: Ruber::ExceptionDialog#sizeHint

Defined in:
lib/ruber/exception_widgets.rb

#sizeHintQt::Size

Override of @KDE::Dialog#sizeHint@

It takes into account the size of the details widget, if shown.

Returns:

  • (Qt::Size)

    the suggested size for the dialog



114
115
116
117
118
119
120
121
122
123
124
# File 'lib/ruber/exception_widgets.rb', line 114

def sizeHint
  orig = super
  if defined?(@backtrace_widget) and @backtrace_widget.visible?
    main_width = main_widget.sizeHint.width
    diff = orig.width - main_width
    det_width = @backtrace_widget.sizeHint.width
    w = [det_width, main_width].max + diff
    Qt::Size.new(w, orig.height)
  else orig
  end
end