commit 8ef6df19c8b626a5b31284246aba37a960399699
parent c68242c4582c0b6f08900c0663ab27795ab24256
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sat, 20 Aug 2016 20:32:44 -0700
about: preventing fast blinking on windows when refilling the dialog
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/about.cpp b/src/about.cpp
@@ -80,6 +80,11 @@ void About::onCommand(const int id, int)
void About::setDelegate(const DelegatePtr &delegate)
{
+#ifdef _WIN32
+ // preventing fast blinking on windows
+ SendMessage(handle(), WM_SETREDRAW, false, 0);
+#endif
+
m_tabs->clear();
m_menu->reset();
m_menu->sortByColumn(0);
@@ -115,9 +120,13 @@ void About::setDelegate(const DelegatePtr &delegate)
m_list->resizeColumn(m_list->columnCount() - 1, LVSCW_AUTOSIZE_USEHEADER);
#endif
+#ifdef _WIN32
+ SendMessage(handle(), WM_SETREDRAW, true, 0);
+
// This is required on Windows to get the first tab to be fully draw,
// but I have no idea why...
InvalidateRect(handle(), nullptr, true);
+#endif
}
void About::setTitle(const string &what)