mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Improve phrases in SendFilesBox drag areas.
This commit is contained in:
parent
3dc0e3818b
commit
f10da51517
2 changed files with 7 additions and 4 deletions
|
@ -622,9 +622,10 @@ void EditCaptionBox::setupDragArea() {
|
||||||
};
|
};
|
||||||
// Avoid both drag areas appearing at one time.
|
// Avoid both drag areas appearing at one time.
|
||||||
auto computeState = [=](const QMimeData *data) {
|
auto computeState = [=](const QMimeData *data) {
|
||||||
|
using DragState = Storage::MimeDataState;
|
||||||
const auto state = Storage::ComputeMimeDataState(data);
|
const auto state = Storage::ComputeMimeDataState(data);
|
||||||
return (state == Storage::MimeDataState::PhotoFiles)
|
return (state == DragState::PhotoFiles || state == DragState::Image)
|
||||||
? Storage::MimeDataState::Image
|
? (_asFile ? DragState::Files : DragState::Image)
|
||||||
: state;
|
: state;
|
||||||
};
|
};
|
||||||
const auto areas = DragArea::SetupDragAreaToContainer(
|
const auto areas = DragArea::SetupDragAreaToContainer(
|
||||||
|
|
|
@ -442,8 +442,10 @@ void SendFilesBox::setupDragArea() {
|
||||||
auto computeState = [=](const QMimeData *data) {
|
auto computeState = [=](const QMimeData *data) {
|
||||||
using DragState = Storage::MimeDataState;
|
using DragState = Storage::MimeDataState;
|
||||||
const auto state = Storage::ComputeMimeDataState(data);
|
const auto state = Storage::ComputeMimeDataState(data);
|
||||||
return (state == DragState::PhotoFiles)
|
return (state == DragState::PhotoFiles || state == DragState::Image)
|
||||||
? DragState::Image
|
? (_sendWay.current().sendImagesAsPhotos()
|
||||||
|
? DragState::Image
|
||||||
|
: DragState::Files)
|
||||||
: state;
|
: state;
|
||||||
};
|
};
|
||||||
const auto areas = DragArea::SetupDragAreaToContainer(
|
const auto areas = DragArea::SetupDragAreaToContainer(
|
||||||
|
|
Loading…
Add table
Reference in a new issue