2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Improve unread counter for HistoryTopBarWidget.

This commit is contained in:
John Preston
2017-11-17 18:54:01 +04:00
parent bef87c6dff
commit 88d7f172ca
5 changed files with 118 additions and 52 deletions

View File

@@ -509,7 +509,7 @@ void WrapWidget::showBackFromStack() {
last.section.get(),
params);
//_anotherTabMemento = std::move(last.anotherTab);
} else {
} else if (wrap() != Wrap::Layer) {
_controller->window()->showBackFromStack(params);
}
}
@@ -864,6 +864,14 @@ void WrapWidget::resizeEvent(QResizeEvent *e) {
updateContentGeometry();
}
void WrapWidget::keyPressEvent(QKeyEvent *e) {
if (e->key() == Qt::Key_Escape) {
showBackFromStack();
} else {
SectionWidget::keyPressEvent(e);
}
}
void WrapWidget::updateContentGeometry() {
if (_content) {
_topShadow->resizeToWidth(width());