diff options
author | Alexander Tkachev | 2019-07-18 23:10:49 +0700 |
---|---|---|
committer | Matan Bareket | 2019-07-30 14:51:41 -0400 |
commit | 99c2418d1a270c4496b21d6d6c8035b6ef73e8a1 (patch) | |
tree | 6670b93b28b24080a8ec40286cbf49804cdd91d9 /gui/widgets | |
parent | 31628d642881499f7d6833732b096c028087e14e (diff) | |
download | scummvm-rg350-99c2418d1a270c4496b21d6d6c8035b6ef73e8a1.tar.gz scummvm-rg350-99c2418d1a270c4496b21d6d6c8035b6ef73e8a1.tar.bz2 scummvm-rg350-99c2418d1a270c4496b21d6d6c8035b6ef73e8a1.zip |
GUI: Rewrite Cloud tab
- StorageWizardDialog is removed, along with bmps it was using;
- EditTextWidget now accepts custom font in constructor;
- ScrollContainer scrollbar now jumps to top when content height changes
so it's "overscrolled";
- IndexPageHandler now does not awaits for `code` GET-parameter, as
local webserver is no longer used to connect Storages;
- CloudManager and all corresponding Storages are updated to support
disconnecting and to notify about successful connection.
Diffstat (limited to 'gui/widgets')
-rw-r--r-- | gui/widgets/edittext.cpp | 8 | ||||
-rw-r--r-- | gui/widgets/edittext.h | 4 | ||||
-rw-r--r-- | gui/widgets/scrollcontainer.cpp | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/gui/widgets/edittext.cpp b/gui/widgets/edittext.cpp index ba9ef616ba..b73cb99ced 100644 --- a/gui/widgets/edittext.cpp +++ b/gui/widgets/edittext.cpp @@ -28,26 +28,26 @@ namespace GUI { -EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd) +EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font) : EditableWidget(boss, x, y - 1, w, h + 2, tooltip, cmd) { setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE); _type = kEditTextWidget; _finishCmd = finishCmd; setEditString(text); - setFontStyle(ThemeEngine::kFontStyleNormal); + setFontStyle(font); _leftPadding = _rightPadding = 0; } -EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd) +EditTextWidget::EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltip, uint32 cmd, uint32 finishCmd, ThemeEngine::FontStyle font) : EditableWidget(boss, name, tooltip, cmd) { setFlags(WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE); _type = kEditTextWidget; _finishCmd = finishCmd; setEditString(text); - setFontStyle(ThemeEngine::kFontStyleNormal); + setFontStyle(font); _leftPadding = _rightPadding = 0; } diff --git a/gui/widgets/edittext.h b/gui/widgets/edittext.h index 9a1b698606..a20d40eb33 100644 --- a/gui/widgets/edittext.h +++ b/gui/widgets/edittext.h @@ -40,8 +40,8 @@ protected: int _rightPadding; public: - EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0, uint32 finishCmd = 0); - EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0, uint32 finishCmd = 0); + EditTextWidget(GuiObject *boss, int x, int y, int w, int h, const String &text, const char *tooltip = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal); + EditTextWidget(GuiObject *boss, const String &name, const String &text, const char *tooltp = 0, uint32 cmd = 0, uint32 finishCmd = 0, ThemeEngine::FontStyle font = ThemeEngine::kFontStyleNormal); void setEditString(const String &str); diff --git a/gui/widgets/scrollcontainer.cpp b/gui/widgets/scrollcontainer.cpp index 7e3f50d3bb..5a0e408d1e 100644 --- a/gui/widgets/scrollcontainer.cpp +++ b/gui/widgets/scrollcontainer.cpp @@ -74,6 +74,7 @@ void ScrollContainerWidget::recalc() { h = max - min; if (h <= _limitH) _scrolledY = 0; + if (_scrolledY > h - _limitH) _scrolledY = 0; _verticalScroll->_numEntries = h; _verticalScroll->_currentPos = _scrolledY; |