diff --git a/flutter/lib/common/widgets/peer_tab_page.dart b/flutter/lib/common/widgets/peer_tab_page.dart index 39c633963..ef1021090 100644 --- a/flutter/lib/common/widgets/peer_tab_page.dart +++ b/flutter/lib/common/widgets/peer_tab_page.dart @@ -450,22 +450,17 @@ class _PeerSortDropdownState extends State { @override Widget build(BuildContext context) { - final enableStyle = TextStyle( + final style = TextStyle( color: Theme.of(context).textTheme.titleLarge?.color, fontSize: MenuConfig.fontSize, fontWeight: FontWeight.normal); - final disableStyle = TextStyle( - color: Colors.grey, - fontSize: MenuConfig.fontSize, - fontWeight: FontWeight.normal); List items = List.empty(growable: true); items.add(PopupMenuItem( - enabled: false, - child: Text(translate("Sort by"), style: disableStyle))); + enabled: false, child: Text(translate("Sort by"), style: style))); for (var e in PeerSortType.values) { items.add(PopupMenuItem( - child: Obx(() => getRadio( - Text(translate(e), style: enableStyle), e, peerSort.value, + child: Obx(() => + getRadio(Text(translate(e), style: style), e, peerSort.value, (String? v) async { if (v != null) { peerSort.value = v; @@ -477,6 +472,7 @@ class _PeerSortDropdownState extends State { })))); } + var menuPos = RelativeRect.fromLTRB(0, 0, 0, 0); return InkWell( child: Icon( Icons.sort, @@ -485,14 +481,14 @@ class _PeerSortDropdownState extends State { onTapDown: (details) { final x = details.globalPosition.dx; final y = details.globalPosition.dy; - final menuPos = RelativeRect.fromLTRB(x, y, x, y); - showMenu( - context: context, - position: menuPos, - items: items, - elevation: 8, - ); + menuPos = RelativeRect.fromLTRB(x, y, x, y); }, + onTap: () => showMenu( + context: context, + position: menuPos, + items: items, + elevation: 8, + ), ); } } diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dart index e4c4b1288..a346548b2 100644 --- a/flutter/lib/desktop/pages/desktop_setting_page.dart +++ b/flutter/lib/desktop/pages/desktop_setting_page.dart @@ -1339,6 +1339,7 @@ class _DisplayState extends State<_Display> { return _Card(title: 'Other Default Options', children: [ otherRow('View Mode', 'view_only'), otherRow('show_monitors_tip', 'show_monitors_toolbar'), + otherRow('Collapse toolbar', 'collapse_toolbar'), otherRow('Show remote cursor', 'show_remote_cursor'), otherRow('Zoom cursor', 'zoom-cursor'), otherRow('Show quality monitor', 'show_quality_monitor'), diff --git a/flutter/lib/desktop/pages/remote_tab_page.dart b/flutter/lib/desktop/pages/remote_tab_page.dart index 587b2f7fd..d802d2aa3 100644 --- a/flutter/lib/desktop/pages/remote_tab_page.dart +++ b/flutter/lib/desktop/pages/remote_tab_page.dart @@ -103,6 +103,8 @@ class _ConnectionTabPageState extends State { final switchUuid = args['switch_uuid']; window_on_top(windowId()); ConnectionTypeState.init(id); + _menubarState.setShow( + bind.mainGetUserDefaultOption(key: 'collapse_toolbar') != 'Y'); tabController.add(TabInfo( key: id, label: id, diff --git a/flutter/lib/desktop/widgets/remote_toolbar.dart b/flutter/lib/desktop/widgets/remote_toolbar.dart index 2a7ce4eab..6ff522f8d 100644 --- a/flutter/lib/desktop/widgets/remote_toolbar.dart +++ b/flutter/lib/desktop/widgets/remote_toolbar.dart @@ -56,7 +56,8 @@ class MenubarState { _initSet(bool s, bool p) { // Show remubar when connection is established. - show = RxBool(true); + show = + RxBool(bind.mainGetUserDefaultOption(key: 'collapse_toolbar') != 'Y'); _pin = RxBool(p); } diff --git a/src/lang/ca.rs b/src/lang/ca.rs index 15c2294a8..691da827c 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 625d7630c..3d0552e63 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "原始分辨率"), ("resolution_fit_local_tip", "适应本地分辨率"), ("resolution_custom_tip", "自定义分辨率"), + ("Collapse toolbar", "折叠工具栏"), ].iter().cloned().collect(); } diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 379aa189e..d934f155b 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/da.rs b/src/lang/da.rs index cde1a4bbe..704ae537c 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/de.rs b/src/lang/de.rs index 423ad2fe7..59ea0a10c 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "Originalauflösung"), ("resolution_fit_local_tip", "Lokale Auflösung anpassen"), ("resolution_custom_tip", "Benutzerdefinierte Auflösung"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/el.rs b/src/lang/el.rs index d7a873767..78ffbc580 100644 --- a/src/lang/el.rs +++ b/src/lang/el.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/eo.rs b/src/lang/eo.rs index 4a04550cf..a840a89cd 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/es.rs b/src/lang/es.rs index d39e686bc..9ef692d7f 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "Resolución original"), ("resolution_fit_local_tip", "Ajustar resolución local"), ("resolution_custom_tip", "Resolución personalizada"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fa.rs b/src/lang/fa.rs index 3bb4a126e..2f696d135 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "وضوح اصلی"), ("resolution_fit_local_tip", "متناسب با وضوح محلی"), ("resolution_custom_tip", "وضوح سفارشی"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fr.rs b/src/lang/fr.rs index 213bd7bf3..9b7897423 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index 542a2cc56..bbe967757 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/id.rs b/src/lang/id.rs index 7b94f026e..167546679 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/it.rs b/src/lang/it.rs index 7e9a6a5f2..ed1508ae6 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "Risoluzione originale"), ("resolution_fit_local_tip", "Adatta risoluzione locale"), ("resolution_custom_tip", "Risoluzione personalizzata"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ja.rs b/src/lang/ja.rs index 7823eaea6..35ccf6444 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ko.rs b/src/lang/ko.rs index 4237958f2..91fd88b4f 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/kz.rs b/src/lang/kz.rs index c6e7e6803..7529b9272 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/lt.rs b/src/lang/lt.rs index cbd83f3d0..6e4b4f339 100644 --- a/src/lang/lt.rs +++ b/src/lang/lt.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/nl.rs b/src/lang/nl.rs index 724ada4f9..edd3108a5 100644 --- a/src/lang/nl.rs +++ b/src/lang/nl.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "Oorspronkelijke resolutie"), ("resolution_fit_local_tip", "Lokale resolutie aanpassen"), ("resolution_custom_tip", "Aangepaste resolutie"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 92d938c82..acf5f8891 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index f2a1314af..558ee1732 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index 300335b7e..0d68739e5 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "Resolução original"), ("resolution_fit_local_tip", "Adequar a resolução local"), ("resolution_custom_tip", "Customizar resolução"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ro.rs b/src/lang/ro.rs index 41f703304..1f537c996 100644 --- a/src/lang/ro.rs +++ b/src/lang/ro.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ru.rs b/src/lang/ru.rs index 4f5ea4b9e..048d5c1d5 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "Исходное разрешение"), ("resolution_fit_local_tip", "Соответствие локальному разрешению"), ("resolution_custom_tip", "Произвольное разрешение"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 31cce8645..ca74e09fa 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sl.rs b/src/lang/sl.rs index a8a22a6e2..e955d5efa 100755 --- a/src/lang/sl.rs +++ b/src/lang/sl.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sq.rs b/src/lang/sq.rs index 3dbeb959f..67b3ab776 100644 --- a/src/lang/sq.rs +++ b/src/lang/sq.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sr.rs b/src/lang/sr.rs index cf7662007..23a634fc7 100644 --- a/src/lang/sr.rs +++ b/src/lang/sr.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sv.rs b/src/lang/sv.rs index ea7ce3e41..8ca487cf0 100644 --- a/src/lang/sv.rs +++ b/src/lang/sv.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/template.rs b/src/lang/template.rs index 12d510086..dad7bae41 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/th.rs b/src/lang/th.rs index add555a38..90b3930f2 100644 --- a/src/lang/th.rs +++ b/src/lang/th.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tr.rs b/src/lang/tr.rs index effea5446..03444fa2d 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tw.rs b/src/lang/tw.rs index b877ede5f..c4586436f 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ua.rs b/src/lang/ua.rs index 76c1b9132..d218d06d2 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", "Початкова роздільна здатність"), ("resolution_fit_local_tip", "Припасувати поточну роздільну здатність"), ("resolution_custom_tip", "Користувацька роздільна здатність"), + ("Collapse toolbar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/vn.rs b/src/lang/vn.rs index e0a84b925..e4cc0c226 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -508,5 +508,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("resolution_original_tip", ""), ("resolution_fit_local_tip", ""), ("resolution_custom_tip", ""), + ("Collapse toolbar", ""), ].iter().cloned().collect(); }