Skip to content

Commit

Permalink
Improve the appearance of the session tabs
Browse files Browse the repository at this point in the history
Signed-off-by: xiaoming <[email protected]>
  • Loading branch information
QQxiaoming committed Sep 11, 2024
1 parent 17fd54b commit cf88f0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ en-US:
- Add system beep support
- Add record script feature
- Improve the default path of recording logs, etc. to the last saved path
- Improve the appearance of the session tabs
- Fix the small probability memory leak problem

zh-CN:
Expand All @@ -18,6 +19,7 @@ zh-CN:
- 增加系统响铃支持
- 增加记录脚本功能
- 改进记录日志等默认路径为上次保存路径
- 改进会话标签外观
- 修复可能存在的小概率内存泄漏问题

## [[V0.5.0](https://github.com/QQxiaoming/quardCRT/releases/tag/V0.5.0)] - 2024-08-26
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add system beep support
- Add record script feature
- Improve the default path of recording logs, etc. to the last saved path
- Improve the appearance of the session tabs
- Fix the small probability memory leak problem

## [[V0.5.0](https://github.com/QQxiaoming/quardCRT/releases/tag/V0.5.0)] - 2024-08-26
Expand Down
5 changes: 3 additions & 2 deletions src/sessiontab/sessiontab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ SessionTabBar::SessionTabBar(QWidget *parent)
: QTabBar(parent) {
tabBarInstances << this;
setAttribute(Qt::WA_Hover, true);
setExpanding(false);
preview = new SessionTabBarPreviewWidget;
preview->hide();
preview->window()->lower();
Expand Down Expand Up @@ -463,9 +464,9 @@ void SessionTab::setTabStaticText(TitleScrollMode mode, int index, QString title
}
}
txt = txt + "...";
title = txt + QString(titleWidth - CharWidth::string_unicode_width(txt),' ');
title = txt + QString(titleWidth - CharWidth::string_unicode_width(txt),QChar(0x00A0));
} else {
title = title + QString(titleWidth - CharWidth::string_unicode_width(title),' ');
title = title + QString(titleWidth - CharWidth::string_unicode_width(title),QChar(0x00A0));
}
FancyTabWidget::setTabText(index,title);
}
Expand Down

0 comments on commit cf88f0b

Please sign in to comment.