dropdown menu for tabs that cannot be displayed (#7918)

* The visibility threshold is 75%
* Used in remote, file transfer, port forward and cm

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2024-05-06 17:10:02 +08:00
committed by GitHub
parent 937cea5a01
commit f6223a6f71
5 changed files with 190 additions and 36 deletions

View File

@@ -99,7 +99,7 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
body: DesktopTab(
controller: tabController,
onWindowCloseButton: handleWindowCloseButton,
tail: const AddButton().paddingOnly(left: 10),
tail: const AddButton(),
labelGetter: DesktopTab.tablabelGetter,
)),
);

View File

@@ -108,7 +108,7 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
tabController.clear();
return true;
},
tail: AddButton().paddingOnly(left: 10),
tail: AddButton(),
labelGetter: DesktopTab.tablabelGetter,
)),
);

View File

@@ -143,7 +143,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
body: DesktopTab(
controller: tabController,
onWindowCloseButton: handleWindowCloseButton,
tail: const AddButton().paddingOnly(left: 10),
tail: const AddButton(),
pageViewBuilder: (pageView) => pageView,
labelGetter: DesktopTab.tablabelGetter,
tabBuilder: (key, icon, label, themeConf) => Obx(() {

View File

@@ -157,7 +157,7 @@ class ConnectionManagerState extends State<ConnectionManager> {
controller: serverModel.tabController,
selectedBorderColor: MyTheme.accent,
maxLabelWidth: 100,
tail: buildScrollJumper(),
tail: null, //buildScrollJumper(),
selectedTabBackgroundColor:
Theme.of(context).hintColor.withOpacity(0),
tabBuilder: (key, icon, label, themeConf) {