diff --git a/liteidex/src/liteapp/optionmanager.cpp b/liteidex/src/liteapp/optionmanager.cpp index 3fea2cbee..98f96f03c 100644 --- a/liteidex/src/liteapp/optionmanager.cpp +++ b/liteidex/src/liteapp/optionmanager.cpp @@ -24,6 +24,8 @@ #include "optionmanager.h" #include "optionsbrowser.h" #include +#include +#include //lite_memory_check_begin #if defined(WIN32) && defined(_MSC_VER) && defined(_DEBUG) #define _CRTDBG_MAP_ALLOC @@ -79,6 +81,17 @@ void OptionManager::exec(const QString &mimeType) { if (!m_browser) { m_browser = new OptionsBrowser(m_liteApp,m_liteApp->mainWindow()); + QRect rc = qApp->desktop()->screenGeometry(m_browser); + int width = rc.width(); + if (width > 900) { + width = 900; + } + int height = rc.height(); + if (height > 600) { + height = 600; + } + m_browser->resize(width,height); + connect(m_browser,SIGNAL(applyOption(QString)),this,SIGNAL(applyOption(QString))); foreach (IOptionFactory *f, m_factoryList) { QStringList mimeTypes = f->mimeTypes(); diff --git a/liteidex/src/liteapp/optionsbrowser.cpp b/liteidex/src/liteapp/optionsbrowser.cpp index 46460fd46..8d0f0b7da 100644 --- a/liteidex/src/liteapp/optionsbrowser.cpp +++ b/liteidex/src/liteapp/optionsbrowser.cpp @@ -99,14 +99,15 @@ int OptionsBrowser::execute(const QString &mimeType) ui->listWidget->setCurrentItem(item); LiteApi::IOption *opt = m_widgetOptionMap.value(item); if (opt) { + //ui->scrollArea->resize(opt->widget()->size()); opt->load(); } - this->setMinimumHeight(600); -#ifdef Q_OS_MAC - this->setMinimumWidth(900); -#else - this->setMinimumWidth(800); -#endif +// this->setMinimumHeight(600); +//#ifdef Q_OS_MAC +// this->setMinimumWidth(900); +//#else +// this->setMinimumWidth(800); +//#endif return exec(); } diff --git a/liteidex/src/liteapp/optionswidget.ui b/liteidex/src/liteapp/optionswidget.ui index 913d3646a..23f28379e 100644 --- a/liteidex/src/liteapp/optionswidget.ui +++ b/liteidex/src/liteapp/optionswidget.ui @@ -6,18 +6,21 @@ 0 0 - 654 - 294 + 602 + 304 Options - + + true + + - + 0 0 @@ -28,6 +31,12 @@ 0 + + + 150 + 16777215 + + @@ -55,13 +64,38 @@ - - - - 0 - 0 - + + + Qt::ScrollBarAlwaysOn + + + Qt::ScrollBarAlwaysOn + + + true + + + + 0 + 0 + 464 + 204 + + + + + + + + 0 + 0 + + + + + +