mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-20 15:17:41 +00:00
words selection fixed, wide mode starts from 720px conversation width, hiding tooltips on app state changed to inactive, 0.9.23 dev version
This commit is contained in:
parent
bb30b71b86
commit
4081af12dd
@ -1016,7 +1016,7 @@ historyToEndSkip: 10px;
|
||||
activeFadeInDuration: 500;
|
||||
activeFadeOutDuration: 3000;
|
||||
|
||||
historyMaxWidth: 680px;
|
||||
historyMaxWidth: 720px;
|
||||
|
||||
msgRadius: 3px;
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user