mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-04 11:59:18 +08:00
Merge pull request #4614 from 21pages/collapse_toolbar
option collapse toolbar
This commit is contained in:
commit
0312e84057
@ -450,22 +450,17 @@ class _PeerSortDropdownState extends State<PeerSortDropdown> {
|
||||
|
||||
@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<PopupMenuEntry> 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<PeerSortDropdown> {
|
||||
}))));
|
||||
}
|
||||
|
||||
var menuPos = RelativeRect.fromLTRB(0, 0, 0, 0);
|
||||
return InkWell(
|
||||
child: Icon(
|
||||
Icons.sort,
|
||||
@ -485,14 +481,14 @@ class _PeerSortDropdownState extends State<PeerSortDropdown> {
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -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'),
|
||||
|
@ -103,6 +103,8 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user