forked from qt-creator/qt-creator
Android: Fix rendering of settings background in dark mode
This amends faad83d5a3 by undoing the
insertion of a QScrollArea + QWidget under the whole form. The reason
for adding this was to be able to scroll down to the license agreements.
Since Core::SettingsDialog already puts the settings widget into a
QScrollArea, we have two of those and one is superfluous. When using a
dark theme (e.g. flat-dark), this extra QScrollArea introduces wrong
background color. Also, it complicates the already quite blown
androidsettingswidget.ui
This change removes the QSrollArea + QWidget while keeping the feature
of scrolling to the license text. This is achieved by searching through
the parent chain for a QScrollArea and using the first found one for
scrolling.
Task-number: QTCREATORBUG-24379
Change-Id: I2bdae9367eb06b68fa47badf2556eb1ec7ebcafb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#include <QLoggingCategory>
|
||||
#include <QMessageBox>
|
||||
#include <QModelIndex>
|
||||
#include <QScrollArea>
|
||||
#include <QSettings>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
@@ -367,7 +368,14 @@ AndroidSettingsWidget::AndroidSettingsWidget()
|
||||
m_ui.managerTabWidget->tabBar()->setEnabled(true);
|
||||
});
|
||||
connect(m_sdkManagerWidget, &AndroidSdkManagerWidget::licenseWorkflowStarted, [this] {
|
||||
m_ui.scrollArea->ensureWidgetVisible(m_ui.managerTabWidget);
|
||||
QObject *parentWidget = parent();
|
||||
while (parentWidget) {
|
||||
if (auto scrollArea = qobject_cast<QScrollArea *>(parentWidget)) {
|
||||
scrollArea->ensureWidgetVisible(m_ui.managerTabWidget);
|
||||
break;
|
||||
}
|
||||
parentWidget = parentWidget->parent();
|
||||
};
|
||||
});
|
||||
|
||||
QMap<int, QString> javaValidationPoints;
|
||||
|
||||
Reference in New Issue
Block a user