Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

remove tooltip of main window tab, opt some tooltip by raising its hierarchy (#7672)

21pagesac79c4552913
diff --git a/flutter/lib/desktop/pages/desktop_home_page.dart b/flutter/lib/desktop/pages/desktop_home_page.dart
index b56bc0c75..7395f4708 100644
--- a/flutter/lib/desktop/pages/desktop_home_page.dart
+++ b/flutter/lib/desktop/pages/desktop_home_page.dart
@@ -298,19 +298,20 @@ class _DesktopHomePageState extends State<DesktopHomePage>
RxBool hover = false.obs;
return InkWell(
onTap: DesktopTabPage.onAddSetting,
- child: Obx(
- () => CircleAvatar(
- radius: 15,
- backgroundColor: hover.value
- ? Theme.of(context).scaffoldBackgroundColor
- : Theme.of(context).colorScheme.background,
- child: Tooltip(
- message: translate('Settings'),
- child: Icon(
- Icons.more_vert_outlined,
- size: 20,
- color: hover.value ? textColor : textColor?.withOpacity(0.5),
- )),
+ child: Tooltip(
+ message: translate('Settings'),
+ child: Obx(
+ () => CircleAvatar(
+ radius: 15,
+ backgroundColor: hover.value
+ ? Theme.of(context).scaffoldBackgroundColor
+ : Theme.of(context).colorScheme.background,
+ child: Icon(
+ Icons.more_vert_outlined,
+ size: 20,
+ color: hover.value ? textColor : textColor?.withOpacity(0.5),
+ ),
+ ),
),
),
onHover: (value) => hover.value = value,
@@ -371,31 +372,33 @@ class _DesktopHomePageState extends State<DesktopHomePage>
),
AnimatedRotationWidget(
onPressed: () => bind.mainUpdateTemporaryPassword(),
- child: Obx(() => RotatedBox(
- quarterTurns: 2,
- child: Tooltip(
- message: translate('Refresh Password'),
- child: Icon(
- Icons.refresh,
- color: refreshHover.value
- ? textColor
- : Color(0xFFDDDDDD),
- size: 22,
- )))),
+ child: Tooltip(
+ message: translate('Refresh Password'),
+ child: Obx(() => RotatedBox(
+ quarterTurns: 2,
+ child: Icon(
+ Icons.refresh,
+ color: refreshHover.value
+ ? textColor
+ : Color(0xFFDDDDDD),
+ size: 22,
+ ))),
+ ),
onHover: (value) => refreshHover.value = value,
).marginOnly(right: 8, top: 4),
if (!bind.isDisableSettings())
InkWell(
- child: Obx(
- () => Tooltip(
- message: translate('Change Password'),
- child: Icon(
- Icons.edit,
- color: editHover.value
- ? textColor
- : Color(0xFFDDDDDD),
- size: 22,
- )).marginOnly(right: 8, top: 4),
+ child: Tooltip(
+ message: translate('Change Password'),
+ child: Obx(
+ () => Icon(
+ Icons.edit,
+ color: editHover.value
+ ? textColor
+ : Color(0xFFDDDDDD),
+ size: 22,
+ ).marginOnly(right: 8, top: 4),
+ ),
),
onTap: () => DesktopSettingPage.switch2page(0),
onHover: (value) => editHover.value = value,
diff --git a/flutter/lib/desktop/widgets/tabbar_widget.dart b/flutter/lib/desktop/widgets/tabbar_widget.dart
index 76777b19f..fb13efbef 100644
--- a/flutter/lib/desktop/widgets/tabbar_widget.dart
+++ b/flutter/lib/desktop/widgets/tabbar_widget.dart
@@ -865,6 +865,7 @@ class _ListView extends StatelessWidget {
label: labelGetter == null
? Rx<String>(tab.label)
: labelGetter!(tab.label),
+ tabType: controller.tabType,
selectedIcon: tab.selectedIcon,
unselectedIcon: tab.unselectedIcon,
closable: tab.closable,
@@ -896,6 +897,7 @@ class _Tab extends StatefulWidget {
final int index;
final String tabInfoKey;
final Rx<String> label;
+ final DesktopTabType tabType;
final IconData? selectedIcon;
final IconData? unselectedIcon;
final bool closable;
@@ -914,6 +916,7 @@ class _Tab extends StatefulWidget {
required this.index,
required this.tabInfoKey,
required this.label,
+ required this.tabType,
this.selectedIcon,
this.unselectedIcon,
this.tabBuilder,
@@ -953,7 +956,9 @@ class _TabState extends State<_Tab> with RestorationMixin {
return ConstrainedBox(
constraints: BoxConstraints(maxWidth: widget.maxLabelWidth ?? 200),
child: Tooltip(
- message: translate(widget.label.value),
+ message: widget.tabType == DesktopTabType.main
+ ? ''
+ : translate(widget.label.value),
child: Text(
translate(widget.label.value),
textAlign: TextAlign.center,