Skip to content

Commit

Permalink
Move version column to after location
Browse files Browse the repository at this point in the history
  • Loading branch information
softins committed Nov 1, 2024
1 parent b8c4421 commit 16c4b90
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
14 changes: 8 additions & 6 deletions src/connectdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
#ifdef ANDROID
// for Android we need larger numbers because of the default font size
lvwServers->setColumnWidth ( LVC_NAME, 200 );
lvwServers->setColumnWidth ( LVC_VERSION, 110 );
lvwServers->setColumnWidth ( LVC_PING, 130 );
lvwServers->setColumnWidth ( LVC_CLIENTS, 100 );
lvwServers->setColumnWidth ( LVC_VERSION, 110 );
#else
lvwServers->setColumnWidth ( LVC_NAME, 180 );
lvwServers->setColumnWidth ( LVC_VERSION, 65 );
lvwServers->setColumnWidth ( LVC_PING, 75 );
lvwServers->setColumnWidth ( LVC_CLIENTS, 70 );
lvwServers->setColumnWidth ( LVC_LOCATION, 220 );
lvwServers->setColumnWidth ( LVC_VERSION, 65 );
#endif
lvwServers->clear();

Expand All @@ -131,12 +131,14 @@ CConnectDlg::CConnectDlg ( CClientSettings* pNSetP, const bool bNewShowCompleteR
// add invisible columns which are used for sorting the list and storing
// the current/maximum number of clients
// 0: server name
// 1: server version
// 2: ping time
// 3: number of musicians (including additional strings like " (full)")
// 4: location
// 1: ping time
// 2: number of musicians (including additional strings like " (full)")
// 3: location
// 4: server version
// 5: minimum ping time (invisible)
// 6: maximum number of clients (invisible)
// (see EConnectListViewColumns in connectdlg.h, which must match the above)

lvwServers->setColumnCount ( LVC_COLUMNS );
lvwServers->hideColumn ( LVC_PING_MIN_HIDDEN );
lvwServers->hideColumn ( LVC_CLIENTS_MAX_HIDDEN );
Expand Down
2 changes: 1 addition & 1 deletion src/connectdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ class CConnectDlg : public CBaseDlg, private Ui_CConnectDlgBase
enum EConnectListViewColumns
{
LVC_NAME, // server name
LVC_VERSION, // server version
LVC_PING, // ping time
LVC_CLIENTS, // number of connected clients (including additional strings like " (full)")
LVC_LOCATION, // location
LVC_VERSION, // server version
LVC_PING_MIN_HIDDEN, // minimum ping time (invisible)
LVC_CLIENTS_MAX_HIDDEN, // maximum number of clients (invisible)
LVC_COLUMNS // total number of columns
Expand Down
8 changes: 4 additions & 4 deletions src/connectdlgbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@
</column>
<column>
<property name="text">
<string>Version</string>
<string>Ping Time</string>
</property>
</column>
<column>
<property name="text">
<string>Ping Time</string>
<string>Musicians</string>
</property>
</column>
<column>
<property name="text">
<string>Musicians</string>
<string>Location</string>
</property>
</column>
<column>
<property name="text">
<string>Location</string>
<string>Version</string>
</property>
</column>
</widget>
Expand Down

0 comments on commit 16c4b90

Please sign in to comment.