support padding width
This commit is contained in:
1 parent
90f53a0578
commit
b430697b5c
2 files changed
+27
-5
No files matched your search
@@ -9,7 +9,8 @@ import 'package:px_eye/widget/button.dart';
|
||||
import 'package:window_manager/window_manager.dart';
|
||||
|
||||
class ImagePage extends StatefulWidget {
|
||||
const ImagePage({Key? key}) : super(key: key);
|
||||
const ImagePage({Key? key, this.paddingWidth = 100}) : super(key: key);
|
||||
final int paddingWidth;
|
||||
|
||||
@override
|
||||
State<ImagePage> createState() => _ImagePageState();
|
||||
@@ -114,7 +115,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
|
||||
double dy = 0,
|
||||
Function(double dx, double dy)? moveChanged,
|
||||
}) {
|
||||
var width = MediaQuery.of(context).size.width - 100;
|
||||
var width = MediaQuery.of(context).size.width - widget.paddingWidth;
|
||||
if (!show || imageFile == null) {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user