mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-20 07:23:19 +03:00
fix: prevent custom scale dialog from closing when interacting with slider
Wrapped MobileCustomScaleControls in GestureDetector with opaque behavior to prevent touch events from propagating to parent dialog's clickMaskDismiss handler. The slider now works correctly without closing the dialog. Signed-off-by: Alessandro De Blasis <alex@deblasis.net>
This commit is contained in:
@@ -25,6 +25,7 @@ import '../../models/model.dart';
|
||||
import '../../models/platform_model.dart';
|
||||
import '../../utils/image.dart';
|
||||
import '../widgets/dialog.dart';
|
||||
import '../widgets/custom_scale_widget.dart';
|
||||
|
||||
final initText = '1' * 1024;
|
||||
|
||||
@@ -1201,6 +1202,14 @@ void showOptions(
|
||||
if (v != null) viewStyle.value = v;
|
||||
}
|
||||
: null)),
|
||||
// Show custom scale controls when custom view style is selected
|
||||
Obx(() => viewStyle.value == kRemoteViewStyleCustom
|
||||
? GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {}, // Absorb tap events to prevent dialog dismiss
|
||||
child: MobileCustomScaleControls(ffi: gFFI),
|
||||
)
|
||||
: SizedBox.shrink()),
|
||||
const Divider(color: MyTheme.border),
|
||||
for (var e in imageQualityRadios)
|
||||
Obx(() => getRadio<String>(
|
||||
|
||||
Reference in New Issue
Block a user