Skip to content

Commit 51c296e

Browse files
committed
Truncate filepath in status bar if > 80 chars
Resolves #201
1 parent 5baadf1 commit 51c296e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Source/*.obj
1515
Source/*.tlog
1616
Source/*.VC.opendb
1717
Source/*.VC.db
18+
Source/.cache/
1819
Source/.vs/
1920
Source/.vscode/
2021
.vscode/

Source/GUI/MainWindow.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,10 @@ void MainWindow::updateStatusBar()
732732

733733
if (!m_watcher->m_watchListFile.isEmpty())
734734
{
735-
tags << m_watcher->m_watchListFile;
735+
if (m_watcher->m_watchListFile.size() > 80)
736+
tags << "..." + m_watcher->m_watchListFile.right(77);
737+
else
738+
tags << m_watcher->m_watchListFile;
736739
}
737740

738741
const QSize actualIconSize{icon.actualSize(QSize(100, 100))};

0 commit comments

Comments
 (0)