mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
Added ability to select links and monospaced text with pressed Alt key.
This commit is contained in:
parent
8bea6776f5
commit
59ed41abfe
3 changed files with 12 additions and 0 deletions
|
@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/sticker_set_box.h"
|
#include "boxes/sticker_set_box.h"
|
||||||
#include "ui/boxes/confirm_box.h"
|
#include "ui/boxes/confirm_box.h"
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
|
#include "base/qt/qt_key_modifiers.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
|
@ -1729,6 +1730,9 @@ void InnerWidget::updateSelected() {
|
||||||
} else {
|
} else {
|
||||||
selectingText = false;
|
selectingText = false;
|
||||||
}
|
}
|
||||||
|
if (base::IsAltPressed()) {
|
||||||
|
request.flags &= ~Ui::Text::StateRequest::Flag::LookupLink;
|
||||||
|
}
|
||||||
dragState = view->textState(itemPoint, request);
|
dragState = view->textState(itemPoint, request);
|
||||||
lnkhost = view;
|
lnkhost = view;
|
||||||
if (!dragState.link && itemPoint.x() >= st::historyPhotoLeft && itemPoint.x() < st::historyPhotoLeft + st::msgPhotoSize) {
|
if (!dragState.link && itemPoint.x() >= st::historyPhotoLeft && itemPoint.x() < st::historyPhotoLeft + st::msgPhotoSize) {
|
||||||
|
|
|
@ -51,6 +51,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "history/history_widget.h"
|
#include "history/history_widget.h"
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "base/qt/qt_common_adapters.h"
|
#include "base/qt/qt_common_adapters.h"
|
||||||
|
#include "base/qt/qt_key_modifiers.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "layout/layout_selection.h"
|
#include "layout/layout_selection.h"
|
||||||
|
@ -3352,6 +3353,9 @@ void HistoryInner::mouseActionUpdate() {
|
||||||
} else {
|
} else {
|
||||||
selectingText = false;
|
selectingText = false;
|
||||||
}
|
}
|
||||||
|
if (base::IsAltPressed()) {
|
||||||
|
request.flags &= ~Ui::Text::StateRequest::Flag::LookupLink;
|
||||||
|
}
|
||||||
dragState = view->textState(m, request);
|
dragState = view->textState(m, request);
|
||||||
_dragStateItem = session().data().message(dragState.itemId);
|
_dragStateItem = session().data().message(dragState.itemId);
|
||||||
lnkhost = view;
|
lnkhost = view;
|
||||||
|
|
|
@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "history/view/history_view_list_widget.h"
|
#include "history/view/history_view_list_widget.h"
|
||||||
|
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
|
#include "base/qt/qt_key_modifiers.h"
|
||||||
#include "history/history_message.h"
|
#include "history/history_message.h"
|
||||||
#include "history/history_item_components.h"
|
#include "history/history_item_components.h"
|
||||||
#include "history/history_item_text.h"
|
#include "history/history_item_text.h"
|
||||||
|
@ -2664,6 +2665,9 @@ void ListWidget::mouseActionUpdate() {
|
||||||
} else {
|
} else {
|
||||||
inTextSelection = false;
|
inTextSelection = false;
|
||||||
}
|
}
|
||||||
|
if (base::IsAltPressed()) {
|
||||||
|
request.flags &= ~Ui::Text::StateRequest::Flag::LookupLink;
|
||||||
|
}
|
||||||
|
|
||||||
const auto dateHeight = st::msgServicePadding.bottom()
|
const auto dateHeight = st::msgServicePadding.bottom()
|
||||||
+ st::msgServiceFont->height
|
+ st::msgServiceFont->height
|
||||||
|
|
Loading…
Add table
Reference in a new issue