188
188
If the expander is expanded afterwards the window won't change its
189
189
size anymore. So we have to do this manually. See LP#840942
191
if expander.get_expanded() and expander.terminal.is_visible():
191
if expander.get_expanded():
192
192
win_width, win_height = self.window_main.get_size()
193
193
exp_width = expander.get_allocation().width
194
194
exp_height = expander.get_allocation().height
195
terminal_width = expander.terminal.get_char_width() * 80
196
terminal_height = expander.terminal.get_char_height() * 24
197
new_width = terminal_width - exp_width + win_width
198
new_height = terminal_height - exp_height + win_height
195
if expander.terminal.get_visible():
196
terminal_width = expander.terminal.get_char_width() * 80
197
terminal_height = expander.terminal.get_char_height() * 24
198
new_width = terminal_width - exp_width + win_width
199
new_height = terminal_height - exp_height + win_height
201
new_width = win_width + 100
202
new_height = win_height + 200
199
203
self.window_main.begin_user_resizable(new_width, new_height)
201
self.window_main.end_user_resizable()
203
205
def _on_medium_required(self, transaction, medium, drive):
204
206
dialog = AptMediumRequiredDialog(medium, drive, self.window_main)