opt: preserve addon buttons
This commit is contained in:
parent
85529105be
commit
10e1336221
@ -421,9 +421,7 @@ class DesktopTab extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
))),
|
))),
|
||||||
// hide simulated action buttons when we in compatible ui mode, because of reusing system title bar.
|
// hide simulated action buttons when we in compatible ui mode, because of reusing system title bar.
|
||||||
Offstage(
|
WindowActionPanel(
|
||||||
offstage: kUseCompatibleUiMode,
|
|
||||||
child: WindowActionPanel(
|
|
||||||
isMainWindow: isMainWindow,
|
isMainWindow: isMainWindow,
|
||||||
tabType: tabType,
|
tabType: tabType,
|
||||||
state: state,
|
state: state,
|
||||||
@ -433,7 +431,6 @@ class DesktopTab extends StatelessWidget {
|
|||||||
showMaximize: showMaximize,
|
showMaximize: showMaximize,
|
||||||
showClose: showClose,
|
showClose: showClose,
|
||||||
onClose: onWindowCloseButton,
|
onClose: onWindowCloseButton,
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -546,6 +543,10 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Offstage(offstage: widget.tail == null, child: widget.tail),
|
Offstage(offstage: widget.tail == null, child: widget.tail),
|
||||||
|
Offstage(
|
||||||
|
offstage: kUseCompatibleUiMode,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
Offstage(
|
Offstage(
|
||||||
offstage: !widget.showMinimize,
|
offstage: !widget.showMinimize,
|
||||||
child: ActionIcon(
|
child: ActionIcon(
|
||||||
@ -563,7 +564,8 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
Offstage(
|
Offstage(
|
||||||
offstage: !widget.showMaximize,
|
offstage: !widget.showMaximize,
|
||||||
child: Obx(() => ActionIcon(
|
child: Obx(() => ActionIcon(
|
||||||
message: widget.isMaximized.value ? "Restore" : "Maximize",
|
message:
|
||||||
|
widget.isMaximized.value ? "Restore" : "Maximize",
|
||||||
icon: widget.isMaximized.value
|
icon: widget.isMaximized.value
|
||||||
? IconFont.restore
|
? IconFont.restore
|
||||||
: IconFont.max,
|
: IconFont.max,
|
||||||
@ -584,13 +586,17 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
|||||||
if (widget.isMainWindow) {
|
if (widget.isMainWindow) {
|
||||||
await windowManager.close();
|
await windowManager.close();
|
||||||
} else {
|
} else {
|
||||||
await WindowController.fromWindowId(windowId!).close();
|
await WindowController.fromWindowId(windowId!)
|
||||||
|
.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isClose: true,
|
isClose: true,
|
||||||
)),
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user