refact, minimize on fullscreen
Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
parent
9321a4f486
commit
a4600dd8a8
@ -1896,6 +1896,7 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
|
|||||||
padding: MaterialStateProperty.all(EdgeInsets.zero),
|
padding: MaterialStateProperty.all(EdgeInsets.zero),
|
||||||
);
|
);
|
||||||
final isFullscreen = stateGlobal.fullscreen;
|
final isFullscreen = stateGlobal.fullscreen;
|
||||||
|
const double iconSize = 20;
|
||||||
final child = Row(
|
final child = Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@ -1905,18 +1906,24 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
|
|||||||
widget.setFullscreen(!isFullscreen);
|
widget.setFullscreen(!isFullscreen);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
child: Icon(
|
child: Tooltip(
|
||||||
isFullscreen ? Icons.fullscreen_exit : Icons.fullscreen,
|
message: translate(isFullscreen ? 'Exit Fullscreen' : 'Fullscreen'),
|
||||||
size: 20,
|
child: Icon(
|
||||||
|
isFullscreen ? Icons.fullscreen_exit : Icons.fullscreen,
|
||||||
|
size: iconSize,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Offstage(
|
Offstage(
|
||||||
offstage: !isFullscreen,
|
offstage: !isFullscreen,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => widget.setMinimize(),
|
onPressed: () => widget.setMinimize(),
|
||||||
child: Icon(
|
child: Tooltip(
|
||||||
Icons.minimize,
|
message: translate('Minimize'),
|
||||||
size: 20,
|
child: Icon(
|
||||||
|
Icons.remove,
|
||||||
|
size: iconSize,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -1924,9 +1931,13 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
|
|||||||
onPressed: () => setState(() {
|
onPressed: () => setState(() {
|
||||||
widget.show.value = !widget.show.value;
|
widget.show.value = !widget.show.value;
|
||||||
}),
|
}),
|
||||||
child: Obx((() => Icon(
|
child: Obx((() => Tooltip(
|
||||||
widget.show.isTrue ? Icons.expand_less : Icons.expand_more,
|
message: translate(
|
||||||
size: 20,
|
widget.show.isTrue ? 'Hide Toolbar' : 'Show Toolbar'),
|
||||||
|
child: Icon(
|
||||||
|
widget.show.isTrue ? Icons.expand_less : Icons.expand_more,
|
||||||
|
size: iconSize,
|
||||||
|
),
|
||||||
))),
|
))),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -2008,7 +2019,8 @@ class _MultiMonitorMenu extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
SvgPicture.asset(
|
SvgPicture.asset(
|
||||||
"assets/screen.svg",
|
"assets/screen.svg",
|
||||||
colorFilter: ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
colorFilter:
|
||||||
|
ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
),
|
),
|
||||||
Obx(
|
Obx(
|
||||||
() => Text(
|
() => Text(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user