diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 98b23e2dbc..5999c47f4f 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1016,7 +1016,7 @@ historyToEndSkip: 10px; activeFadeInDuration: 500; activeFadeOutDuration: 3000; -historyMaxWidth: 680px; +historyMaxWidth: 720px; msgRadius: 3px; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 0f2300491a..dc3fc7505d 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -926,6 +926,9 @@ void AppClass::checkLocalTime() { void AppClass::onAppStateChanged(Qt::ApplicationState state) { checkLocalTime(); _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + if (state != Qt::ApplicationActive) { + PopupTooltip::Hide(); + } } void AppClass::killDownloadSessions() { diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 890cd38b51..b27b6aac0e 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -7462,7 +7462,11 @@ void HistoryServiceMsg::initDimensions() { void HistoryServiceMsg::countPositionAndSize(int32 &left, int32 &width) const { left = st::msgServiceMargin.left(); - width = qMin(_history->width, int(st::msgMaxWidth + 2 * st::msgPhotoSkip)) - st::msgServiceMargin.left() - st::msgServiceMargin.left(); + int32 maxwidth = _history->width; + if (Adaptive::Wide()) { + maxwidth = qMin(maxwidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip)); + } + width = maxwidth - st::msgServiceMargin.left() - st::msgServiceMargin.left(); } QString HistoryServiceMsg::selectedText(uint32 selection) const { @@ -7536,7 +7540,10 @@ void HistoryServiceMsg::draw(Painter &p, const QRect &r, uint32 selection, uint6 } int32 HistoryServiceMsg::resize(int32 width) { - int32 maxwidth = qMin(_history->width, int(st::msgMaxWidth + 2 * st::msgPhotoSkip)); + int32 maxwidth = _history->width; + if (Adaptive::Wide()) { + maxwidth = qMin(maxwidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip)); + } if (width > maxwidth) width = maxwidth; width -= st::msgServiceMargin.left() + st::msgServiceMargin.left(); // two small margins if (width < st::msgServicePadding.left() + st::msgServicePadding.right() + 1) width = st::msgServicePadding.left() + st::msgServicePadding.right() + 1; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 01a3cb2b6e..e8b3539667 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -792,6 +792,7 @@ void HistoryInner::mouseReleaseEvent(QMouseEvent *e) { void HistoryInner::mouseDoubleClickEvent(QMouseEvent *e) { if (!_history) return; + dragActionStart(e->globalPos(), e->button()); if (((_dragAction == Selecting && !_selected.isEmpty() && _selected.cbegin().value() != FullSelection) || (_dragAction == NoDrag && (_selected.isEmpty() || _selected.cbegin().value() != FullSelection))) && _dragSelType == TextSelectLetters && _dragItem) { bool afterDragSymbol, uponSelected; uint16 symbol; @@ -813,8 +814,6 @@ void HistoryInner::mouseDoubleClickEvent(QMouseEvent *e) { _trippleClickPoint = e->globalPos(); _trippleClickTimer.start(QApplication::doubleClickInterval()); } - } else { - mousePressEvent(e); } }