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.
|
||||
Offstage(
|
||||
offstage: kUseCompatibleUiMode,
|
||||
child: WindowActionPanel(
|
||||
WindowActionPanel(
|
||||
isMainWindow: isMainWindow,
|
||||
tabType: tabType,
|
||||
state: state,
|
||||
@ -433,7 +431,6 @@ class DesktopTab extends StatelessWidget {
|
||||
showMaximize: showMaximize,
|
||||
showClose: showClose,
|
||||
onClose: onWindowCloseButton,
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
@ -546,6 +543,10 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Offstage(offstage: widget.tail == null, child: widget.tail),
|
||||
Offstage(
|
||||
offstage: kUseCompatibleUiMode,
|
||||
child: Row(
|
||||
children: [
|
||||
Offstage(
|
||||
offstage: !widget.showMinimize,
|
||||
child: ActionIcon(
|
||||
@ -563,7 +564,8 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
Offstage(
|
||||
offstage: !widget.showMaximize,
|
||||
child: Obx(() => ActionIcon(
|
||||
message: widget.isMaximized.value ? "Restore" : "Maximize",
|
||||
message:
|
||||
widget.isMaximized.value ? "Restore" : "Maximize",
|
||||
icon: widget.isMaximized.value
|
||||
? IconFont.restore
|
||||
: IconFont.max,
|
||||
@ -584,13 +586,17 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
if (widget.isMainWindow) {
|
||||
await windowManager.close();
|
||||
} else {
|
||||
await WindowController.fromWindowId(windowId!).close();
|
||||
await WindowController.fromWindowId(windowId!)
|
||||
.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
isClose: true,
|
||||
)),
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user