diff --git a/lang/en.ts b/lang/en.ts
index 09db540..1f68aba 100644
--- a/lang/en.ts
+++ b/lang/en.ts
@@ -14,22 +14,22 @@
-
+
-
+
-
+
-
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 39da4c0..d850836 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,6 +2,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ../lang/en.ts)
-add_executable(om-repo-picker MainDialog.cpp Tools.cpp UpdateChannelPicker.cpp OMRepos.cpp ThirdPartyRepoWidget.cpp ClickableLabel.cpp main.cpp ${QM_FILES})
+add_executable(om-repo-picker MainDialog.cpp Tools.cpp UpdateChannelPicker.cpp OMRepos.cpp ThirdPartyRepoWidget.cpp ClickableLabel.cpp FixedWidthScrollArea.cpp main.cpp ${QM_FILES})
target_link_libraries(om-repo-picker Qt5::Widgets Qt5::Core)
install(TARGETS om-repo-picker DESTINATION bin)
diff --git a/src/FixedWidthScrollArea.cpp b/src/FixedWidthScrollArea.cpp
new file mode 100644
index 0000000..dcf1909
--- /dev/null
+++ b/src/FixedWidthScrollArea.cpp
@@ -0,0 +1,7 @@
+#include "FixedWidthScrollArea.h"
+
+void FixedWidthScrollArea::resizeEvent(QResizeEvent *e) {
+ QScrollArea::resizeEvent(e);
+ widget()->setFixedWidth(e->size().width());
+ setMaximumHeight(widget()->height());
+}
diff --git a/src/FixedWidthScrollArea.h b/src/FixedWidthScrollArea.h
new file mode 100644
index 0000000..9a21541
--- /dev/null
+++ b/src/FixedWidthScrollArea.h
@@ -0,0 +1,11 @@
+#pragma once
+#include
+#include
+
+class FixedWidthScrollArea:public QScrollArea {
+ Q_OBJECT
+public:
+ FixedWidthScrollArea(QWidget *parent):QScrollArea(parent) {}
+protected:
+ void resizeEvent(QResizeEvent *e) override;
+};
diff --git a/src/MainDialog.cpp b/src/MainDialog.cpp
index 1d893f7..5e29466 100644
--- a/src/MainDialog.cpp
+++ b/src/MainDialog.cpp
@@ -39,8 +39,11 @@ MainDialog::MainDialog(QWidget *parent, Qt::WindowFlags f):QDialog(parent,f) {
_layout->addWidget(_omRepos, ++y, 1, 1, 2);
_thirdParty = (thirdPartyRepos[0].name ? new ThirdPartyRepoWidget(this) : nullptr);
- if(_thirdParty)
- _layout->addWidget(_thirdParty, ++y, 1, 1, 2);
+ if(_thirdParty) {
+ _thirdPartyScroller = new FixedWidthScrollArea(this);
+ _thirdPartyScroller->setWidget(_thirdParty);
+ _layout->addWidget(_thirdPartyScroller, ++y, 1, 1, 2);
+ }
_ok = new QPushButton(tr("&OK"), this);
_layout->addWidget(_ok, ++y, 1);
diff --git a/src/MainDialog.h b/src/MainDialog.h
index e35157c..5fbf19e 100644
--- a/src/MainDialog.h
+++ b/src/MainDialog.h
@@ -10,6 +10,7 @@
#include "UpdateChannelPicker.h"
#include "OMRepos.h"
#include "ThirdPartyRepoWidget.h"
+#include "FixedWidthScrollArea.h"
class MainDialog:public QDialog {
Q_OBJECT
@@ -24,6 +25,7 @@ public slots:
UpdateChannelPicker * _updateChannel;
QLabel * _topLbl;
OMRepos * _omRepos;
+ FixedWidthScrollArea *_thirdPartyScroller;
ThirdPartyRepoWidget *_thirdParty;
QPushButton * _ok;
QPushButton * _cancel;