From b6abac8822fbe720c896c98dd2c9a33c3655b8cc Mon Sep 17 00:00:00 2001 From: Martin Hanzik <martin@hanzik.com> Date: Sun, 13 May 2018 11:42:18 +0200 Subject: [PATCH] Input dialog fixes --- agui2/src/Graphics/Dialogs/InputDialog.cpp | 1 + agui2/src/Graphics/Dialogs/InputDialog.ui | 27 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/agui2/src/Graphics/Dialogs/InputDialog.cpp b/agui2/src/Graphics/Dialogs/InputDialog.cpp index bc76f9e7ed..8cbdb16cf0 100644 --- a/agui2/src/Graphics/Dialogs/InputDialog.cpp +++ b/agui2/src/Graphics/Dialogs/InputDialog.cpp @@ -50,6 +50,7 @@ void InputDialog::setAutomaton(std::shared_ptr<abstraction::OperationAbstraction if (auto image = Converter::toPNG(this->automaton)) { ui->label_image->setPixmap(QPixmap::fromImage(*image)); + ui->scrollArea->setFixedSize(ui->tab_image->size()); this->setTabShown(ui->tab_image, true); } else { diff --git a/agui2/src/Graphics/Dialogs/InputDialog.ui b/agui2/src/Graphics/Dialogs/InputDialog.ui index 9d53ddbc7d..1dd4770689 100644 --- a/agui2/src/Graphics/Dialogs/InputDialog.ui +++ b/agui2/src/Graphics/Dialogs/InputDialog.ui @@ -38,7 +38,7 @@ <item> <widget class="QTabWidget" name="tabWidget"> <property name="currentIndex"> - <number>1</number> + <number>2</number> </property> <widget class="QWidget" name="tab_xml"> <attribute name="title"> @@ -66,10 +66,29 @@ </attribute> <layout class="QGridLayout" name="gridLayout_3"> <item row="0" column="0"> - <widget class="QLabel" name="label_image"> - <property name="text"> - <string/> + <widget class="QScrollArea" name="scrollArea"> + <property name="widgetResizable"> + <bool>true</bool> </property> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>546</width> + <height>501</height> + </rect> + </property> + <layout class="QGridLayout" name="gridLayout_4"> + <item row="0" column="0"> + <widget class="QLabel" name="label_image"> + <property name="text"> + <string/> + </property> + </widget> + </item> + </layout> + </widget> </widget> </item> </layout> -- GitLab