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:
Alessandro De Blasis
2025-10-28 06:23:11 +01:00
parent e66d2facd4
commit 0ae6e3c02f
2 changed files with 210 additions and 0 deletions

View File

@@ -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>(