add ExcludeFocus to avoid slider get the focus

This commit is contained in:
Siyi Guo committed 2023-04-13 19:13:19 +08:00
1 parent cb4531f046
commit ba642e21d0
1 file changed
+6
+6
View File
@@ -59,6 +59,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
child: 'Window Opacity'.toText(size: 12.dp), child: 'Window Opacity'.toText(size: 12.dp),
), ),
Expanded( Expanded(
child: ExcludeFocus(
child: Slider( child: Slider(
value: opacityWindow, value: opacityWindow,
onChanged: (v) { onChanged: (v) {
@@ -68,6 +69,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
}, },
), ),
), ),
),
], ],
), ),
getSelectedButton(), getSelectedButton(),
@@ -175,6 +177,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
), ),
SizedBox( SizedBox(
width: 80.dp, width: 80.dp,
child: ExcludeFocus(
child: Slider( child: Slider(
value: opacity1, value: opacity1,
onChanged: (v) { onChanged: (v) {
@@ -183,6 +186,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
}, },
), ),
), ),
),
const Spacer(), const Spacer(),
SizedBox( SizedBox(
width: 20.dp, width: 20.dp,
@@ -201,6 +205,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
), ),
SizedBox( SizedBox(
width: 80.dp, width: 80.dp,
child: ExcludeFocus(
child: Slider( child: Slider(
value: opacity2, value: opacity2,
onChanged: (v) { onChanged: (v) {
@@ -208,6 +213,7 @@ class _ImagePageState extends State<ImagePage> with WindowListener {
setState(() {}); setState(() {});
}, },
), ),
),
) )
], ],
), ),