mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-04 16:35:44 +00:00
Shrink dialogs column when enabling emoji sidebar.
Try to hold the ratio between the chat width and the dialogs list width when the emoji sidebar is created by shrinking the left column.
This commit is contained in:
@@ -3779,8 +3779,16 @@ int HistoryWidget::minimalWidthForTabbedSelectorSection() const {
|
||||
return st::windowMinWidth + tabbedSelectorSectionWidth();
|
||||
}
|
||||
|
||||
bool HistoryWidget::willSwitchToTabbedSelectorWithWidth(int newWidth) const {
|
||||
if (!AuthSession::Current().data().tabbedSelectorSectionEnabled()) {
|
||||
return false;
|
||||
} else if (_tabbedSectionUsed) {
|
||||
return false;
|
||||
}
|
||||
return (newWidth >= minimalWidthForTabbedSelectorSection());
|
||||
}
|
||||
|
||||
void HistoryWidget::toggleTabbedSelectorMode() {
|
||||
auto sectionEnabled = AuthSession::Current().data().tabbedSelectorSectionEnabled();
|
||||
if (_tabbedSection) {
|
||||
AuthSession::Current().data().setTabbedSelectorSectionEnabled(false);
|
||||
AuthSession::Current().saveDataDelayed(kSaveTabbedSelectorSectionTimeoutMs);
|
||||
|
Reference in New Issue
Block a user