diff --git a/flutter/lib/desktop/pages/remote_page.dart b/flutter/lib/desktop/pages/remote_page.dart index 8ca9c0cfb..fbba5bafe 100644 --- a/flutter/lib/desktop/pages/remote_page.dart +++ b/flutter/lib/desktop/pages/remote_page.dart @@ -197,19 +197,19 @@ class _RemotePageState extends State return Scaffold( backgroundColor: MyTheme.color(context).bg, // resizeToAvoidBottomInset: true, - floatingActionButton: _showBar - ? null - : FloatingActionButton( - mini: true, - child: Icon(Icons.expand_less), - backgroundColor: MyTheme.accent, - onPressed: () { - setState(() { - _showBar = !_showBar; - }); - }), - bottomNavigationBar: - _showBar && hasDisplays ? getBottomAppBar(ffiModel) : null, + // floatingActionButton: _showBar + // ? null + // : FloatingActionButton( + // mini: true, + // child: Icon(Icons.expand_less), + // backgroundColor: MyTheme.accent, + // onPressed: () { + // setState(() { + // _showBar = !_showBar; + // }); + // }), + // bottomNavigationBar: + // _showBar && hasDisplays ? getBottomAppBar(ffiModel) : null, body: Overlay( initialEntries: [ OverlayEntry(builder: (context) { diff --git a/flutter/lib/desktop/widgets/remote_menubar.dart b/flutter/lib/desktop/widgets/remote_menubar.dart index 9568d0404..011525ba9 100644 --- a/flutter/lib/desktop/widgets/remote_menubar.dart +++ b/flutter/lib/desktop/widgets/remote_menubar.dart @@ -10,7 +10,7 @@ import '../../mobile/widgets/overlay.dart'; import '../../models/model.dart'; import '../../models/platform_model.dart'; import './popup_menu.dart'; -import './material_mod_popup_menu.dart' as modMenu; +import './material_mod_popup_menu.dart' as mod_menu; class _MenubarTheme { static const Color commonColor = MyTheme.accent; @@ -50,19 +50,22 @@ class _RemoteMenubarState extends State { } Widget _buildShowHide(BuildContext context) { - return SizedBox( - width: 100, - height: 5, - child: TextButton( - onHover: (bool v) { - _hideColor.value = v ? Colors.white60 : Colors.white24; - }, - onPressed: () { - _show.value = !_show.value; - }, - child: Obx(() => Container( - color: _hideColor.value, - )))); + return Obx(() => Tooltip( + message: translate(_show.value ? "Hide Menubar" : "Show Menubar"), + child: SizedBox( + width: 100, + height: 5, + child: TextButton( + onHover: (bool v) { + _hideColor.value = v ? Colors.white60 : Colors.white24; + }, + onPressed: () { + _show.value = !_show.value; + }, + child: Obx(() => Container( + color: _hideColor.value, + )))), + )); } Widget _buildMenubar(BuildContext context) { @@ -73,7 +76,7 @@ class _RemoteMenubarState extends State { menubarItems.add(IconButton( tooltip: translate('Mobile Actions'), color: _MenubarTheme.commonColor, - icon: Icon(Icons.build), + icon: const Icon(Icons.build), onPressed: () { if (mobileActionsOverlayEntry == null) { showMobileActionsOverlay(); @@ -92,7 +95,7 @@ class _RemoteMenubarState extends State { } menubarItems.add(_buildClose(context)); return PopupMenuTheme( - data: PopupMenuThemeData( + data: const PopupMenuThemeData( textStyle: TextStyle(color: _MenubarTheme.commonColor)), child: Column(mainAxisSize: MainAxisSize.min, children: [ Container( @@ -112,11 +115,11 @@ class _RemoteMenubarState extends State { setFullscreen(!isFullscreen); }, icon: Obx(() => isFullscreen - ? Icon( + ? const Icon( Icons.fullscreen_exit, color: _MenubarTheme.commonColor, ) - : Icon( + : const Icon( Icons.fullscreen, color: _MenubarTheme.commonColor, )), @@ -130,7 +133,7 @@ class _RemoteMenubarState extends State { widget.ffi.chatModel.changeCurrentID(ChatModel.clientModeID); widget.ffi.chatModel.toggleChatOverlay(); }, - icon: Icon( + icon: const Icon( Icons.message, color: _MenubarTheme.commonColor, ), @@ -139,24 +142,25 @@ class _RemoteMenubarState extends State { Widget _buildMonitor(BuildContext context) { final pi = widget.ffi.ffiModel.pi; - return modMenu.PopupMenuButton( + return mod_menu.PopupMenuButton( tooltip: translate('Select Monitor'), padding: EdgeInsets.zero, - position: modMenu.PopupMenuPosition.under, + position: mod_menu.PopupMenuPosition.under, icon: Stack( alignment: Alignment.center, children: [ - Icon( + const Icon( Icons.personal_video, color: _MenubarTheme.commonColor, ), Padding( - padding: EdgeInsets.only(bottom: 3.9), + padding: const EdgeInsets.only(bottom: 3.9), child: Obx(() { RxInt display = CurrentDisplayState.find(widget.id); return Text( "${display.value + 1}/${pi.displays.length}", - style: TextStyle(color: _MenubarTheme.commonColor, fontSize: 8), + style: const TextStyle( + color: _MenubarTheme.commonColor, fontSize: 8), ); }), ) @@ -164,14 +168,14 @@ class _RemoteMenubarState extends State { ), itemBuilder: (BuildContext context) { final List rowChildren = []; - final double selectorScale = 1.3; + const double selectorScale = 1.3; for (int i = 0; i < pi.displays.length; i++) { rowChildren.add(Transform.scale( scale: selectorScale, child: Stack( alignment: Alignment.center, children: [ - Icon( + const Icon( Icons.personal_video, color: _MenubarTheme.commonColor, ), @@ -179,12 +183,13 @@ class _RemoteMenubarState extends State { child: Container( alignment: AlignmentDirectional.center, constraints: - BoxConstraints(minHeight: _MenubarTheme.height), + const BoxConstraints(minHeight: _MenubarTheme.height), child: Padding( - padding: EdgeInsets.only(bottom: 2.5), + padding: const EdgeInsets.only(bottom: 2.5), child: Text( (i + 1).toString(), - style: TextStyle(color: _MenubarTheme.commonColor), + style: + const TextStyle(color: _MenubarTheme.commonColor), ), )), onPressed: () { @@ -200,8 +205,8 @@ class _RemoteMenubarState extends State { ), )); } - return >[ - modMenu.PopupMenuItem( + return >[ + mod_menu.PopupMenuItem( height: _MenubarTheme.height, padding: EdgeInsets.zero, child: Row( @@ -214,18 +219,18 @@ class _RemoteMenubarState extends State { } Widget _buildControl(BuildContext context) { - return modMenu.PopupMenuButton( + return mod_menu.PopupMenuButton( padding: EdgeInsets.zero, - icon: Icon( + icon: const Icon( Icons.bolt, color: _MenubarTheme.commonColor, ), tooltip: translate('Control Actions'), - position: modMenu.PopupMenuPosition.under, + position: mod_menu.PopupMenuPosition.under, itemBuilder: (BuildContext context) => _getControlMenu() .map((entry) => entry.build( context, - MenuConfig( + const MenuConfig( commonColor: _MenubarTheme.commonColor, secondMenuHeight: _MenubarTheme.height, ))) @@ -234,19 +239,19 @@ class _RemoteMenubarState extends State { } Widget _buildDisplay(BuildContext context) { - return modMenu.PopupMenuButton( + return mod_menu.PopupMenuButton( padding: EdgeInsets.zero, - icon: Icon( + icon: const Icon( Icons.tv, color: _MenubarTheme.commonColor, ), tooltip: translate('Display Settings'), - position: modMenu.PopupMenuPosition.under, + position: mod_menu.PopupMenuPosition.under, onSelected: (String item) {}, itemBuilder: (BuildContext context) => _getDisplayMenu() .map((entry) => entry.build( context, - MenuConfig( + const MenuConfig( commonColor: _MenubarTheme.commonColor, secondMenuHeight: _MenubarTheme.height, ))) @@ -260,7 +265,7 @@ class _RemoteMenubarState extends State { onPressed: () { clientClose(widget.ffi.dialogManager); }, - icon: Icon( + icon: const Icon( Icons.close, color: _MenubarTheme.commonColor, ), @@ -332,7 +337,7 @@ class _RemoteMenubarState extends State { if (pi.platform == 'Linux' || pi.sasEnabled) { displayMenu.add(MenuEntryButton( childBuilder: (TextStyle? style) => Text( - translate('Insert') + ' Ctrl + Alt + Del', + '${translate("Insert")} Ctrl + Alt + Del', style: style, ), proc: () { @@ -357,8 +362,7 @@ class _RemoteMenubarState extends State { displayMenu.add(MenuEntryButton( childBuilder: (TextStyle? style) => Obx(() => Text( translate( - (BlockInputState.find(widget.id).value ? 'Unb' : 'B') + - 'lock user input'), + '${BlockInputState.find(widget.id).value ? "Unb" : "B"}lock user input'), style: style, )), proc: () { @@ -366,7 +370,7 @@ class _RemoteMenubarState extends State { RxBool blockInput = BlockInputState.find(widget.id); bind.sessionToggleOption( id: widget.id, - value: (blockInput.value ? 'un' : '') + 'block-input'); + value: '${blockInput.value ? "un" : ""}block-input'); blockInput.value = !blockInput.value; }, )); @@ -447,7 +451,7 @@ class _RemoteMenubarState extends State { MenuEntrySwitch( text: translate('Show remote cursor'), getter: () async { - return await bind.sessionGetToggleOptionSync( + return bind.sessionGetToggleOptionSync( id: widget.id, arg: 'show-remote-cursor'); }, setter: (bool v) async { @@ -457,7 +461,7 @@ class _RemoteMenubarState extends State { MenuEntrySwitch( text: translate('Show quality monitor'), getter: () async { - return await bind.sessionGetToggleOptionSync( + return bind.sessionGetToggleOptionSync( id: widget.id, arg: 'show-quality-monitor'); }, setter: (bool v) async { diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 4c66acff4..3e50396e6 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "比例"), ("Image Quality", "画质"), ("Scroll Style", "滚屏方式"), + ("Show Menubar", "显示菜单栏"), + ("Hide Menubar", "隐藏菜单栏"), ].iter().cloned().collect(); } diff --git a/src/lang/cs.rs b/src/lang/cs.rs index fbe0287aa..f94df1ceb 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Poměr"), ("Image Quality", "Kvalita obrazu"), ("Scroll Style", "Štýl posúvania"), + ("Show Menubar", "Zobrazit panel nabídek"), + ("Hide Menubar", "skrýt panel nabídek"), ].iter().cloned().collect(); } diff --git a/src/lang/da.rs b/src/lang/da.rs index 5b88db08d..c0f7abf91 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Forhold"), ("Image Quality", "Billede kvalitet"), ("Scroll Style", "Rulstil"), + ("Show Menubar", "Vis menulinje"), + ("Hide Menubar", "skjul menulinjen"), ].iter().cloned().collect(); } diff --git a/src/lang/de.rs b/src/lang/de.rs index f41d8c313..e411a751d 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Verhältnis"), ("Image Quality", "Bildqualität"), ("Scroll Style", "Scroll-Stil"), + ("Show Menubar", "Menüleiste anzeigen"), + ("Hide Menubar", "Menüleiste ausblenden"), ].iter().cloned().collect(); } diff --git a/src/lang/eo.rs b/src/lang/eo.rs index b1207ff47..211e6728d 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Proporcio"), ("Image Quality", "Bilda Kvalito"), ("Scroll Style", "Ruluma Stilo"), + ("Show Menubar", "Montru menubreton"), + ("Hide Menubar", "kaŝi menubreton"), ].iter().cloned().collect(); } diff --git a/src/lang/es.rs b/src/lang/es.rs index a018472f7..068442bf4 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Relación"), ("Image Quality", "La calidad de imagen"), ("Scroll Style", "Estilo de desplazamiento"), + ("Show Menubar", "ajustes de pantalla"), + ("Hide Menubar", "ocultar barra de menú"), ].iter().cloned().collect(); } diff --git a/src/lang/fr.rs b/src/lang/fr.rs index 73624290b..d568f050b 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Rapport"), ("Image Quality", "Qualité d'image"), ("Scroll Style", "Style de défilement"), + ("Show Menubar", "Afficher la barre de menus"), + ("Hide Menubar", "masquer la barre de menus"), ].iter().cloned().collect(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index 15175175f..1fe693248 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Hányados"), ("Image Quality", "Képminőség"), ("Scroll Style", "Görgetési stílus"), + ("Show Menubar", "Menüsor megjelenítése"), + ("Hide Menubar", "menüsor elrejtése"), ].iter().cloned().collect(); } diff --git a/src/lang/id.rs b/src/lang/id.rs index 4415488f4..d5d6ed920 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Perbandingan"), ("Image Quality", "Kualitas gambar"), ("Scroll Style", "Gaya Gulir"), + ("Show Menubar", "Tampilkan bilah menu"), + ("Hide Menubar", "sembunyikan bilah menu"), ].iter().cloned().collect(); } diff --git a/src/lang/it.rs b/src/lang/it.rs index c8cad290f..26e7d4073 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -310,5 +310,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Rapporto"), ("Image Quality", "Qualità dell'immagine"), ("Scroll Style", "Stile di scorrimento"), + ("Show Menubar", "Mostra la barra dei menu"), + ("Hide Menubar", "nascondi la barra dei menu"), ].iter().cloned().collect(); } diff --git a/src/lang/ja.rs b/src/lang/ja.rs index 2cb0ce6c5..f1331b01d 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -308,5 +308,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "比率"), ("Image Quality", "画質"), ("Scroll Style", "スクロール スタイル"), + ("Show Menubar", "メニューバーを表示"), + ("Hide Menubar", "メニューバーを隠す"), ].iter().cloned().collect(); } diff --git a/src/lang/ko.rs b/src/lang/ko.rs index 24e1db7bf..7a0d8dbdf 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -308,5 +308,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "비율"), ("Image Quality", "이미지 품질"), ("Scroll Style", "스크롤 스타일"), + ("Show Menubar", "메뉴 표시줄 표시"), + ("Hide Menubar", "메뉴 표시줄 숨기기"), ].iter().cloned().collect(); } \ No newline at end of file diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 16ff7c4e7..6f6326121 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -312,5 +312,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Stosunek"), ("Image Quality", "Jakość obrazu"), ("Scroll Style", "Styl przewijania"), + ("Show Menubar", "Pokaż pasek menu"), + ("Hide Menubar", "ukryj pasek menu"), ].iter().cloned().collect(); } diff --git a/src/lang/pt_PT b/src/lang/pt_PT.rs similarity index 99% rename from src/lang/pt_PT rename to src/lang/pt_PT.rs index adac5af15..2df6c63dc 100644 --- a/src/lang/pt_PT +++ b/src/lang/pt_PT.rs @@ -308,5 +308,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Razão"), ("Image Quality", "Qualidade da imagem"), ("Scroll Style", "Estilo de rolagem"), + ("Show Menubar", "Mostrar barra de menus"), + ("Hide Menubar", "ocultar barra de menu"), ].iter().cloned().collect(); } diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index cd40fb2a5..a0981f867 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", ""), ("Image Quality", ""), ("Scroll Style", ""), + ("Show Menubar", ""), + ("Hide Menubar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ru.rs b/src/lang/ru.rs index df07e5e8e..eed658dfd 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Соотношение"), ("Image Quality", "Качество изображения"), ("Scroll Style", "Стиль прокрутки"), + ("Show Menubar", "Показать строку меню"), + ("Hide Menubar", "скрыть строку меню"), ].iter().cloned().collect(); } diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 935544eb2..b4e61e83f 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Pomer"), ("Image Quality", "Kvalita obrazu"), ("Scroll Style", "Štýl posúvania"), + ("Show Menubar", "Zobraziť panel s ponukami"), + ("Hide Menubar", "skryť panel s ponukami"), ].iter().cloned().collect(); } diff --git a/src/lang/template.rs b/src/lang/template.rs index e92a032fb..2e5c67cd8 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", ""), ("Image Quality", ""), ("Scroll Style", ""), + ("Show Menubar", ""), + ("Hide Menubar", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tr.rs b/src/lang/tr.rs index 215c14058..829659954 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Oran"), ("Image Quality", "Görüntü kalitesi"), ("Scroll Style", "Kaydırma Stili"), + ("Show Menubar", "Menü çubuğunu göster"), + ("Hide Menubar", "menü çubuğunu gizle"), ].iter().cloned().collect(); } diff --git a/src/lang/tw.rs b/src/lang/tw.rs index 39d636592..f7d7cbe1d 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "比例"), ("Image Quality", "畫質"), ("Scroll Style", "滾動樣式"), + ("Show Menubar", "顯示菜單欄"), + ("Hide Menubar", "隱藏菜單欄"), ].iter().cloned().collect(); } diff --git a/src/lang/vn.rs b/src/lang/vn.rs index 2f9dfcafd..1c77139b3 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -311,5 +311,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Ratio", "Tỉ lệ"), ("Image Quality", "Chất lượng hình ảnh"), ("Scroll Style", "Kiểu cuộn"), + ("Show Menubar", "Hiển thị thanh menu"), + ("Hide Menubar", "ẩn thanh menu"), ].iter().cloned().collect(); }