aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
authorAlexander Tkachev2019-07-19 17:55:39 +0700
committerMatan Bareket2019-07-30 14:51:41 -0400
commit28c93ed027130e10a8bd2ea9f57aa3cb5e2d147a (patch)
tree114475475a0306464ce3f2bb8ee7e70874aa8266 /gui/options.cpp
parent3df126853aa661f760792d478f80c2e2427b298c (diff)
downloadscummvm-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.
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp51
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");