Skip to content

Commit

Permalink
closes #49 Make About Dialog Scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmelt committed Feb 10, 2015
1 parent da85b8e commit 5a06bb0
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions lib/cosmos/gui/dialogs/about_dialog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,23 @@ def initialize (parent, about_string)
end

self.layout = Qt::VBoxLayout.new do
addLayout(icon_layout)
addWidget(about)
addLayout(button_layout)
scroll_area = Qt::ScrollArea.new
scroll_area.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff)
addWidget(scroll_area)
scroll_widget = Qt::Widget.new
scroll_area.setWidget(scroll_widget)
interior_layout = Qt::VBoxLayout.new
interior_layout.addLayout(icon_layout)
interior_layout.addWidget(about)
interior_layout.addLayout(button_layout)
scroll_widget.setLayout(interior_layout)
if scroll_widget.minimumSizeHint.height < 800
scroll_area.setMinimumHeight(scroll_widget.minimumSizeHint.height + 80)
scroll_area.setMinimumWidth(scroll_widget.minimumSizeHint.width)
else
scroll_area.setMinimumWidth(scroll_widget.minimumSizeHint.width + 20)
end
scroll_widget.adjustSize
end

setMaximumWidth(600)
Expand Down

0 comments on commit 5a06bb0

Please sign in to comment.