Hide ipv6 button in LAN server selection

This commit is contained in:
Benau 2019-11-01 10:49:31 +08:00
parent e5de8f764c
commit 033933d3a2
2 changed files with 9 additions and 1 deletions

View File

@ -23,7 +23,7 @@
I18N="In the server selection screen" text="Show private server(s)"/>
<checkbox width="fit" id="ipv6" text_align="left"/>
<spacer width="10"/>
<label proportion="1" height="100%" text_align="left"
<label proportion="1" height="100%" text_align="left" id="ipv6_text"
I18N="In the server selection screen" text="Use IPv6 connection if server supports"/>
</div>
</div>

View File

@ -138,6 +138,14 @@ void ServerSelection::init()
m_ipv6->setState(false);
m_ipv6->setActive(false);
#endif
if (NetworkConfig::get()->isLAN())
{
m_ipv6->setState(false);
m_ipv6->setVisible(false);
getWidget("ipv6_text")->setVisible(false);
}
else
getWidget("ipv6_text")->setVisible(true);
m_current_column = 5/*distance*/;
m_searcher->clearListeners();