diff --git a/qt/main.cpp b/qt/main.cpp index 5415a3bdfa..90e7c7a196 100644 --- a/qt/main.cpp +++ b/qt/main.cpp @@ -170,6 +170,7 @@ int main(int argc, char * argv[]) #if defined(OMIM_OS_MAC) apiOpenGLES3 = a.arguments().contains("es3", Qt::CaseInsensitive); +#endif if (!FLAGS_lang.empty()) (void)::setenv("LANGUAGE", FLAGS_lang.c_str(), 1); @@ -201,7 +202,7 @@ int main(int argc, char * argv[]) if (FLAGS_dpi_scale >= df::VisualParams::kMdpiScale && FLAGS_dpi_scale <= df::VisualParams::kXxxhdpiScale) screenshotParams->m_dpiScale = FLAGS_dpi_scale; } -#endif + qt::MainWindow::SetDefaultSurfaceFormat(apiOpenGLES3); FrameworkParams frameworkParams; diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp index e49fd73c9c..ae371d9a4f 100644 --- a/qt/mainwindow.cpp +++ b/qt/mainwindow.cpp @@ -177,19 +177,16 @@ MainWindow::MainWindow(Framework & framework, bool apiOpenGLES3, m_pDrawWidget = new DrawWidget(framework, apiOpenGLES3, std::move(screenshotParams), this); + setCentralWidget(m_pDrawWidget); + if (m_screenshotMode) { - QSizePolicy policy(QSizePolicy::Fixed, QSizePolicy::Fixed); - setSizePolicy(policy); QSize size(static_cast(screenshotParams->m_width), static_cast(screenshotParams->m_height)); - m_pDrawWidget->resize(size); size.setHeight(size.height() + statusBar()->height()); - setMaximumSize(size); - setMinimumSize(size); + m_pDrawWidget->setFixedSize(size); + setFixedSize(size); } - setCentralWidget(m_pDrawWidget); - QObject::connect(m_pDrawWidget, SIGNAL(BeforeEngineCreation()), this, SLOT(OnBeforeEngineCreation())); CreateCountryStatusControls(); diff --git a/qt/screenshoter.cpp b/qt/screenshoter.cpp index bba3d920bf..eaa7b42eba 100644 --- a/qt/screenshoter.cpp +++ b/qt/screenshoter.cpp @@ -75,7 +75,7 @@ bool ParsePointsStr(std::string const & pointsStr, std::list & rects) m2::RectD rect; while (tupleIter) { - if (ParseRect(*tupleIter, ",", rect)) + if (ParseRect(*tupleIter, ", \t", rect)) { rects.push_back(rect); }