diff --git a/src/plugins/android/androidsdkmanagerwidget.cpp b/src/plugins/android/androidsdkmanagerwidget.cpp index 84dfe948d93..cb489716a9c 100644 --- a/src/plugins/android/androidsdkmanagerwidget.cpp +++ b/src/plugins/android/androidsdkmanagerwidget.cpp @@ -446,6 +446,9 @@ void AndroidSdkManagerWidget::switchView(AndroidSdkManagerWidget::View view) else emit updatingSdk(); + if (m_currentView == LicenseWorkflow) + emit licenseWorkflowStarted(); + m_ui->operationProgress->setValue(0); m_ui->viewStack->setCurrentWidget(m_currentView == PackageListing ? m_ui->packagesStack : m_ui->outputStack); diff --git a/src/plugins/android/androidsdkmanagerwidget.h b/src/plugins/android/androidsdkmanagerwidget.h index 7ef83d31f43..eadb61e7eb3 100644 --- a/src/plugins/android/androidsdkmanagerwidget.h +++ b/src/plugins/android/androidsdkmanagerwidget.h @@ -86,6 +86,7 @@ public: signals: void updatingSdk(); void updatingSdkFinished(); + void licenseWorkflowStarted(); private: void onApplyButton(); diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 251b621bf3a..7308bba88c1 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -425,6 +425,9 @@ AndroidSettingsWidget::AndroidSettingsWidget() m_ui->SDKLocationPathChooser->setEnabled(true); m_ui->managerTabWidget->tabBar()->setEnabled(true); }); + connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::licenseWorkflowStarted, [this]() { + m_ui->scrollArea->ensureWidgetVisible(m_ui->managerTabWidget); + }); QMap javaValidationPoints; javaValidationPoints[JavaPathExistsRow] = tr("JDK path exists."); @@ -997,7 +1000,13 @@ AndroidSettingsPage::AndroidSettingsPage() setId(Constants::ANDROID_SETTINGS_ID); setDisplayName(AndroidSettingsWidget::tr("Android")); setCategory(ProjectExplorer::Constants::DEVICE_SETTINGS_CATEGORY); - setWidgetCreator([] { return new AndroidSettingsWidget; }); + setWidgetCreator([] { + auto widget = new AndroidSettingsWidget; + QPalette pal = widget->palette(); + pal.setColor(QPalette::Window, Utils::creatorTheme()->color(Utils::Theme::BackgroundColorNormal)); + widget->setPalette(pal); + return widget; + }); } } // namespace Internal diff --git a/src/plugins/android/androidsettingswidget.ui b/src/plugins/android/androidsettingswidget.ui index 1bd69e556ae..56eba59b99d 100644 --- a/src/plugins/android/androidsettingswidget.ui +++ b/src/plugins/android/androidsettingswidget.ui @@ -27,267 +27,32 @@ 4 - - - - 0 - 0 - + + + QFrame::NoFrame - - Java Settings + + QFrame::Plain - - - - - - 0 - 0 - - - - - - - - Open JDK download URL in the system's browser. - - - - - - - - 0 - 0 - - - - JDK location: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - - - - - - - - Android Settings - - - - - - - 0 - 0 - - - - Android SDK location: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Automatically download Android SDK Tools to selected location. - - - - - - - - - - Open Android SDK download URL in the system's browser. - - - - - - - Open Android NDK download URL in the system's browser. - - - - - - - - - - - - - - - - Android NDK list: - - - - - - - QAbstractScrollArea::AdjustToContents - - - QListView::Adjust - - - 0 - - - false - - - - - - - - - true - - - - 0 - 0 - - - - Add the selected custom NDK. The toolchains and debuggers will be created automatically. - - - Add... - - - - - - - false - - - - 0 - 0 - - - - Remove the selected NDK if it has been added manually. - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - Android OpenSSL settings - - - - - - - 0 - 0 - - - - OpenSSL .pri location: - - - - - - - Select the path of the prebuilt OpenSSL binaries. - - - - - - - Automatically download OpenSSL prebuilt libraries. If the automatic download fails, the download URL will be opened in the system's browser for manual download. - - - - - - - - - - - - - - - - - 0 - 0 - - - - Automatically create kits for Android tool chains - - - true - - - - - - + 0 - - - AVD Manager - - + + true + + + + + 0 + 0 + 1123 + 818 + + + + false + + 0 @@ -301,155 +66,433 @@ 0 - + + + + 0 + 0 + + + + Java Settings + + + + + + + 0 + 0 + + + + + + + + Open JDK download URL in the system's browser. + + + + + + + + 0 + 0 + + + + JDK location: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + + + + Android Settings + + + + + + + 0 + 0 + + + + Android SDK location: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Automatically download Android SDK Tools to selected location. + + + + + + + + + + Open Android SDK download URL in the system's browser. + + + + + + + Open Android NDK download URL in the system's browser. + + + + + + + + + + + + + + + + Android NDK list: + + + + + + + QAbstractScrollArea::AdjustToContents + + + QListView::Adjust + + + 0 + + + false + + + + + + + + + true + + + + 0 + 0 + + + + Add the selected custom NDK. The toolchains and debuggers will be created automatically. + + + Add... + + + + + + + false + + + + 0 + 0 + + + + Remove the selected NDK if it has been added manually. + + + Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + Android OpenSSL settings + + + + + + + 0 + 0 + + + + OpenSSL .pri location: + + + + + + + Select the path of the prebuilt OpenSSL binaries. + + + + + + + Automatically download OpenSSL prebuilt libraries. If the automatic download fails, the download URL will be opened in the system's browser for manual download. + + + + + + + + + + + + + + - + 0 0 - - QAbstractItemView::SingleSelection + + Automatically create kits for Android tool chains - - QAbstractItemView::SelectRows + + true - - Qt::ElideMiddle - - - false - - - false - - - - - - System/data partition size: + + + 0 + + + + AVD Manager + + + + 0 - - - - - - - 0 - 0 - + + 0 - - Mb + + 0 - - 99999 + + 0 - - 1024 - - - - - - - false - - - - 0 - 0 - - - - Start... - - - - - - - Refresh List - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 0 - 8 - - - - - - - - - 0 - 0 - - - - Add... - - - - - - - false - - - - 0 - 0 - - - - Remove - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Native AVD Manager... - - - - + + + + + 0 + 0 + + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + Qt::ElideMiddle + + + false + + + false + + + + + + + + + System/data partition size: + + + + + + + + 0 + 0 + + + + Mb + + + 99999 + + + 1024 + + + + + + + false + + + + 0 + 0 + + + + Start... + + + + + + + Refresh List + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 0 + 8 + + + + + + + + + 0 + 0 + + + + Add... + + + + + + + false + + + + 0 + 0 + + + + Remove + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Native AVD Manager... + + + + + + + + + + SDK Manager + + + - - - SDK Manager - -