Compare commits
2
Commits
cb4531f046
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70f87c73fc | ||
|
|
ba642e21d0 |
No files matched your search
+8
-5
@@ -31,12 +31,12 @@ class _DraggableAreaState extends State<DraggableArea> {
|
|||||||
bool isPressShift = false;
|
bool isPressShift = false;
|
||||||
|
|
||||||
Axis? get axis {
|
Axis? get axis {
|
||||||
if (isPressCommand) {
|
|
||||||
return Axis.vertical;
|
|
||||||
}
|
|
||||||
if (isPressShift) {
|
if (isPressShift) {
|
||||||
return Axis.horizontal;
|
return Axis.horizontal;
|
||||||
}
|
}
|
||||||
|
if (isPressCommand) {
|
||||||
|
return Axis.vertical;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,8 +101,11 @@ class _DraggableAreaState extends State<DraggableArea> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
if (value is KeyUpEvent && isShift(value)) {
|
if (value is KeyUpEvent && isShift(value)) {
|
||||||
isPressShift = false;
|
Future.delayed(const Duration(milliseconds: 500)).then((value) {
|
||||||
setState(() {});
|
isPressShift = false;
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() {});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (value is! KeyDownEvent && value is! KeyRepeatEvent) {
|
if (value is! KeyDownEvent && value is! KeyRepeatEvent) {
|
||||||
return KeyEventResult.ignored;
|
return KeyEventResult.ignored;
|
||||||
|
|||||||
+25
-19
@@ -59,13 +59,15 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
|
|||||||
child: 'Window Opacity'.toText(size: 12.dp),
|
child: 'Window Opacity'.toText(size: 12.dp),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Slider(
|
child: ExcludeFocus(
|
||||||
value: opacityWindow,
|
child: Slider(
|
||||||
onChanged: (v) {
|
value: opacityWindow,
|
||||||
opacityWindow = v;
|
onChanged: (v) {
|
||||||
windowManager.setOpacity(opacityWindow);
|
opacityWindow = v;
|
||||||
setState(() {});
|
windowManager.setOpacity(opacityWindow);
|
||||||
},
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -175,12 +177,14 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
|
|||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 80.dp,
|
width: 80.dp,
|
||||||
child: Slider(
|
child: ExcludeFocus(
|
||||||
value: opacity1,
|
child: Slider(
|
||||||
onChanged: (v) {
|
value: opacity1,
|
||||||
opacity1 = v;
|
onChanged: (v) {
|
||||||
setState(() {});
|
opacity1 = v;
|
||||||
},
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
@@ -201,12 +205,14 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
|
|||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 80.dp,
|
width: 80.dp,
|
||||||
child: Slider(
|
child: ExcludeFocus(
|
||||||
value: opacity2,
|
child: Slider(
|
||||||
onChanged: (v) {
|
value: opacity2,
|
||||||
opacity2 = v;
|
onChanged: (v) {
|
||||||
setState(() {});
|
opacity2 = v;
|
||||||
},
|
setState(() {});
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in new issue
Block a user