Skip to content

Commit

Permalink
Add G size accessibility hint to file list (#1730)
Browse files Browse the repository at this point in the history
* add G in FileSize

* add changelog

Co-authored-by: jeremyp3 <jeremyp3@github.com>
  • Loading branch information
jeremyp3 and jeremyp3 committed Jan 18, 2023
1 parent c48a2db commit ec29e79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Default Qt Client
- TTS event on video transmission and desktop sharing toggled
- Add missing labels on "Font color" and "Background color" buttons on "Video settings" dialog
- TTS event when disconnect from server now includes server name
- Add G size in file list
Accessible Windows Client
-
Android Client
Expand Down
4 changes: 3 additions & 1 deletion Client/qtTeamTalk/filesmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ QVariant FilesModel::data ( const QModelIndex & index, int role /*= Qt::DisplayR
case Qt::AccessibleTextRole :
{
QString result;
if(m_files[index.row()].nFileSize>=1024*1024)
if(m_files[index.row()].nFileSize>=1024*1024*1024)
result = QString("%1 G").arg(m_files[index.row()].nFileSize/(1024*1024*1024));
else if(m_files[index.row()].nFileSize>=1024*1024)
result = QString("%1 M").arg(m_files[index.row()].nFileSize/(1024*1024));
else if(m_files[index.row()].nFileSize>=1024)
result = QString("%1 K").arg(m_files[index.row()].nFileSize/1024);
Expand Down

0 comments on commit ec29e79

Please sign in to comment.