mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-09 13:41:29 +03:00
rename menubar as toolbar in code and view
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -45,12 +45,12 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
static const IconData selectedIcon = Icons.desktop_windows_sharp;
|
||||
static const IconData unselectedIcon = Icons.desktop_windows_outlined;
|
||||
|
||||
late MenubarState _menubarState;
|
||||
late ToolbarState _toolbarState;
|
||||
|
||||
var connectionMap = RxList<Widget>.empty(growable: true);
|
||||
|
||||
_ConnectionTabPageState(Map<String, dynamic> params) {
|
||||
_menubarState = MenubarState();
|
||||
_toolbarState = ToolbarState();
|
||||
RemoteCountState.init();
|
||||
final peerId = params['id'];
|
||||
if (peerId != null) {
|
||||
@@ -76,7 +76,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
key: ValueKey(peerId),
|
||||
id: peerId,
|
||||
password: params['password'],
|
||||
menubarState: _menubarState,
|
||||
toolbarState: _toolbarState,
|
||||
tabController: tabController,
|
||||
switchUuid: params['switch_uuid'],
|
||||
forceRelay: params['forceRelay'],
|
||||
@@ -103,7 +103,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
final switchUuid = args['switch_uuid'];
|
||||
window_on_top(windowId());
|
||||
ConnectionTypeState.init(id);
|
||||
_menubarState.setShow(
|
||||
_toolbarState.setShow(
|
||||
bind.mainGetUserDefaultOption(key: 'collapse_toolbar') != 'Y');
|
||||
tabController.add(TabInfo(
|
||||
key: id,
|
||||
@@ -115,7 +115,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
key: ValueKey(id),
|
||||
id: id,
|
||||
password: args['password'],
|
||||
menubarState: _menubarState,
|
||||
toolbarState: _toolbarState,
|
||||
tabController: tabController,
|
||||
switchUuid: switchUuid,
|
||||
forceRelay: args['forceRelay'],
|
||||
@@ -138,7 +138,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_menubarState.save();
|
||||
_toolbarState.save();
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -243,7 +243,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
));
|
||||
}
|
||||
|
||||
// Note: Some dup code to ../widgets/remote_menubar
|
||||
// Note: Some dup code to ../widgets/remote_toolbar
|
||||
Widget _tabMenuBuilder(String key, CancelFunc cancelFunc) {
|
||||
final List<MenuEntryBase<String>> menu = [];
|
||||
const EdgeInsets padding = EdgeInsets.only(left: 8.0, right: 5.0);
|
||||
@@ -269,11 +269,11 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
MenuEntryButton<String>(
|
||||
childBuilder: (TextStyle? style) => Obx(() => Text(
|
||||
translate(
|
||||
_menubarState.show.isTrue ? 'Hide Menubar' : 'Show Menubar'),
|
||||
_toolbarState.show.isTrue ? 'Hide Toolbar' : 'Show Toolbar'),
|
||||
style: style,
|
||||
)),
|
||||
proc: () {
|
||||
_menubarState.switchShow();
|
||||
_toolbarState.switchShow();
|
||||
cancelFunc();
|
||||
},
|
||||
padding: padding,
|
||||
|
||||
Reference in New Issue
Block a user