diff options
author | Alexander Tkachev | 2019-07-19 17:55:39 +0700 |
---|---|---|
committer | Matan Bareket | 2019-07-30 14:51:41 -0400 |
commit | 28c93ed027130e10a8bd2ea9f57aa3cb5e2d147a (patch) | |
tree | 114475475a0306464ce3f2bb8ee7e70874aa8266 | |
parent | 3df126853aa661f760792d478f80c2e2427b298c (diff) | |
download | scummvm-rg350-28c93ed027130e10a8bd2ea9f57aa3cb5e2d147a.tar.gz scummvm-rg350-28c93ed027130e10a8bd2ea9f57aa3cb5e2d147a.tar.bz2 scummvm-rg350-28c93ed027130e10a8bd2ea9f57aa3cb5e2d147a.zip |
GUI: Fix Cloud tab wizard elements displaying after connecting storage
Elements were displayed until scrollbar was used, now they are hidden
right after storage is connected.
-rw-r--r-- | gui/options.cpp | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/gui/options.cpp b/gui/options.cpp index d69cd29a22..b5557275e6 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -2521,32 +2521,33 @@ void GlobalOptionsDialog::setupCloudTab() { // there goes layout for non-connected Storage (connection wizard) - if (!shownConnectedInfo) { - bool connecting = _connectingStorage; - if (_storageWizardNotConnectedHint) _storageWizardNotConnectedHint->setVisible(shown); - if (_storageWizardOpenLinkHint) _storageWizardOpenLinkHint->setVisible(shown); - if (_storageWizardLink) { - _storageWizardLink->setVisible(shown); - _storageWizardLink->setEnabled(g_system->hasFeature(OSystem::kFeatureOpenUrl) && !connecting); - } - if (_storageWizardCodeHint) _storageWizardCodeHint->setVisible(shown); - if (_storageWizardCodeBox) { - _storageWizardCodeBox->setVisible(shown); - _storageWizardCodeBox->setEnabled(!connecting); - } - if (_storageWizardPasteButton) { - _storageWizardPasteButton->setVisible(shown && g_system->hasFeature(OSystem::kFeatureClipboardSupport)); - _storageWizardPasteButton->setEnabled(!connecting); - } - if (_storageWizardConnectButton) { - _storageWizardConnectButton->setVisible(shown); - _storageWizardConnectButton->setEnabled(!connecting); - } - if (_storageWizardConnectionStatusHint) { - _storageWizardConnectionStatusHint->setVisible(shown && _storageWizardConnectionStatusHint->getLabel() != "..."); - _storageWizardConnectionStatusHint->setEnabled(!connecting); - } + shown = (!shownConnectedInfo && shown); + bool wizardEnabled = !_connectingStorage; + if (_storageWizardNotConnectedHint) _storageWizardNotConnectedHint->setVisible(shown); + if (_storageWizardOpenLinkHint) _storageWizardOpenLinkHint->setVisible(shown); + if (_storageWizardLink) { + _storageWizardLink->setVisible(shown); + _storageWizardLink->setEnabled(g_system->hasFeature(OSystem::kFeatureOpenUrl) && wizardEnabled); + } + if (_storageWizardCodeHint) _storageWizardCodeHint->setVisible(shown); + if (_storageWizardCodeBox) { + _storageWizardCodeBox->setVisible(shown); + _storageWizardCodeBox->setEnabled(wizardEnabled); + } + if (_storageWizardPasteButton) { + _storageWizardPasteButton->setVisible(shown && g_system->hasFeature(OSystem::kFeatureClipboardSupport)); + _storageWizardPasteButton->setEnabled(wizardEnabled); + } + if (_storageWizardConnectButton) { + _storageWizardConnectButton->setVisible(shown); + _storageWizardConnectButton->setEnabled(wizardEnabled); + } + if (_storageWizardConnectionStatusHint) { + _storageWizardConnectionStatusHint->setVisible(shown && _storageWizardConnectionStatusHint->getLabel() != "..."); + _storageWizardConnectionStatusHint->setEnabled(wizardEnabled); + } + if (!shownConnectedInfo) { int16 shiftUp; if (!g_gui.xmlEval()->getWidgetData("GlobalOptions_Cloud_Container.StorageUsernameDesc", x, y, w, h)) warning("GlobalOptions_Cloud_Container.StorageUsernameDesc's position is undefined"); |