Skip to content

Commit

Permalink
Fix #2465: Use correct text for autosizing 'Offline' label
Browse files Browse the repository at this point in the history
And removed unnecessary margin before Other versions checkbox.
  • Loading branch information
patrikjuvonen committed Apr 16, 2023
1 parent d073b61 commit 0291f82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Client/core/ServerBrowser/CServerBrowser.cpp
Expand Up @@ -515,15 +515,15 @@ void CServerBrowser::CreateTab(ServerBrowserType type, const char* szName)
fX = fX + 20.0f + pManager->GetTextExtent(m_pIncludeLocked[type]->GetText().c_str()) + SB_SPACER;
m_pIncludeOffline[type] = reinterpret_cast<CGUICheckBox*>(pManager->CreateCheckBox(m_pTab[type], _("Offline"), true));
m_pIncludeOffline[type]->SetPosition(CVector2D(fX, fY), false);
m_pIncludeOffline[type]->AutoSize(m_pIncludeLocked[type]->GetText().c_str(), 20.0f);
m_pIncludeOffline[type]->AutoSize(m_pIncludeOffline[type]->GetText().c_str(), 20.0f);
m_pIncludeOffline[type]->SetClickHandler(GUI_CALLBACK(&CServerBrowser::OnFilterChanged, this));

fX = fX + 20.0f + pManager->GetTextExtent(m_pIncludeOffline[type]->GetText().c_str()) + SB_SPACER * 2;
fX = fX + 20.0f + pManager->GetTextExtent(m_pIncludeOffline[type]->GetText().c_str()) + SB_SPACER;
}
else
{
m_pIncludeOffline[type] = NULL;
fX = fX + 20.0f + pManager->GetTextExtent(m_pIncludeLocked[type]->GetText().c_str()) + SB_SPACER * 2;
fX = fX + 20.0f + pManager->GetTextExtent(m_pIncludeLocked[type]->GetText().c_str()) + SB_SPACER;
}

m_pIncludeOtherVersions[type] = reinterpret_cast<CGUICheckBox*>(pManager->CreateCheckBox(m_pTab[type], _("Other Versions"), false));
Expand Down

0 comments on commit 0291f82

Please sign in to comment.