diff options
| author | Nate Graham <[email protected]> | 2019-04-19 10:24:52 -0600 |
|---|---|---|
| committer | Nate Graham <[email protected]> | 2019-05-20 07:14:49 -0600 |
| commit | d863dd9ad46b3a291751bcb9d6fd3930c4ea8afb (patch) | |
| tree | 2a025ba04507168be1e4e9fce794893f6c61d0eb /src/dolphintabwidget.cpp | |
| parent | f3e966e0eda16366603bfd92d67880938e4271a6 (diff) | |
Elide tab titles left so key information at the end of the string doesn't get cut off
Summary:
Tab Titles currently elide right. Generally the more useful information is at the right
side of the string--even more so when full paths are being used.
BUG: 406569
FIXED-IN: 19.04.2
Test Plan:
- No change when tab titles don't get elided
- When tabs show the full path and titles are elided, they're now useful: {F6782447}
- When tabs don't show the full path and are elided, they're elided on the other side which seems maybe a tiny bit better, but at least no worse: {F6782448}
Reviewers: #dolphin, #vdg, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Subscribers: ndavis, elvisangelaccio, kneckermcknacksack, filipf, kfm-devel
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D20689
Diffstat (limited to 'src/dolphintabwidget.cpp')
| -rw-r--r-- | src/dolphintabwidget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 73c275242..c677054d8 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -19,6 +19,7 @@ #include "dolphintabwidget.h" +#include "dolphin_generalsettings.h" #include "dolphintabbar.h" #include "dolphintabpage.h" #include "dolphinviewcontainer.h" @@ -114,6 +115,14 @@ void DolphinTabWidget::readProperties(const KConfigGroup& group) void DolphinTabWidget::refreshViews() { + // Left-elision is better when showing full paths, since you care most + // about the current directory which is on the right + if (GeneralSettings::showFullPathInTitlebar()) { + setElideMode(Qt::ElideLeft); + } else { + setElideMode(Qt::ElideRight); + } + const int tabCount = count(); for (int i = 0; i < tabCount; ++i) { tabBar()->setTabText(i, tabName(tabPageAt(i))); |
