mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
rename menubar as toolbar in code and view
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -1169,7 +1169,7 @@ class AndroidPermissionManager {
|
||||
// TODO remove argument contentPadding, it’s not used, getToggle() has not
|
||||
RadioListTile<T> getRadio<T>(
|
||||
Widget title, T toValue, T curValue, ValueChanged<T?>? onChange,
|
||||
{EdgeInsetsGeometry? contentPadding}) {
|
||||
{EdgeInsetsGeometry? contentPadding, bool? dense}) {
|
||||
return RadioListTile<T>(
|
||||
contentPadding: contentPadding ?? EdgeInsets.zero,
|
||||
visualDensity: VisualDensity.compact,
|
||||
@@ -1178,6 +1178,7 @@ RadioListTile<T> getRadio<T>(
|
||||
value: toValue,
|
||||
groupValue: curValue,
|
||||
onChanged: onChange,
|
||||
dense: dense,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,20 +456,28 @@ class _PeerSortDropdownState extends State<PeerSortDropdown> {
|
||||
fontWeight: FontWeight.normal);
|
||||
List<PopupMenuEntry> items = List.empty(growable: true);
|
||||
items.add(PopupMenuItem(
|
||||
enabled: false, child: Text(translate("Sort by"), style: style)));
|
||||
height: 36,
|
||||
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: style), e, peerSort.value,
|
||||
(String? v) async {
|
||||
if (v != null) {
|
||||
peerSort.value = v;
|
||||
await bind.setLocalFlutterConfig(
|
||||
k: "peer-sorting",
|
||||
v: peerSort.value,
|
||||
);
|
||||
}
|
||||
}))));
|
||||
height: 36,
|
||||
child: Obx(() => Center(
|
||||
child: SizedBox(
|
||||
height: 36,
|
||||
child: getRadio(
|
||||
Text(translate(e), style: style), e, peerSort.value,
|
||||
dense: true, (String? v) async {
|
||||
if (v != null) {
|
||||
peerSort.value = v;
|
||||
await bind.setLocalFlutterConfig(
|
||||
k: "peer-sorting",
|
||||
v: peerSort.value,
|
||||
);
|
||||
}
|
||||
}),
|
||||
),
|
||||
))));
|
||||
}
|
||||
|
||||
var menuPos = RelativeRect.fromLTRB(0, 0, 0, 0);
|
||||
|
||||
@@ -33,7 +33,7 @@ class RemotePage extends StatefulWidget {
|
||||
Key? key,
|
||||
required this.id,
|
||||
required this.password,
|
||||
required this.menubarState,
|
||||
required this.toolbarState,
|
||||
required this.tabController,
|
||||
this.switchUuid,
|
||||
this.forceRelay,
|
||||
@@ -41,7 +41,7 @@ class RemotePage extends StatefulWidget {
|
||||
|
||||
final String id;
|
||||
final String? password;
|
||||
final MenubarState menubarState;
|
||||
final ToolbarState toolbarState;
|
||||
final String? switchUuid;
|
||||
final bool? forceRelay;
|
||||
final SimpleWrapper<State<RemotePage>?> _lastState = SimpleWrapper(null);
|
||||
@@ -75,7 +75,7 @@ class _RemotePageState extends State<RemotePage>
|
||||
|
||||
final FocusNode _rawKeyFocusNode = FocusNode(debugLabel: "rawkeyFocusNode");
|
||||
|
||||
Function(bool)? _onEnterOrLeaveImage4Menubar;
|
||||
Function(bool)? _onEnterOrLeaveImage4Toolbar;
|
||||
|
||||
late FFI _ffi;
|
||||
|
||||
@@ -265,14 +265,14 @@ class _RemotePageState extends State<RemotePage>
|
||||
child: getBodyForDesktop(context))),
|
||||
upperLayer: [
|
||||
OverlayEntry(
|
||||
builder: (context) => RemoteMenubar(
|
||||
builder: (context) => RemoteToolbar(
|
||||
id: widget.id,
|
||||
ffi: _ffi,
|
||||
state: widget.menubarState,
|
||||
state: widget.toolbarState,
|
||||
onEnterOrLeaveImageSetter: (func) =>
|
||||
_onEnterOrLeaveImage4Menubar = func,
|
||||
_onEnterOrLeaveImage4Toolbar = func,
|
||||
onEnterOrLeaveImageCleaner: () =>
|
||||
_onEnterOrLeaveImage4Menubar = null,
|
||||
_onEnterOrLeaveImage4Toolbar = null,
|
||||
))
|
||||
],
|
||||
),
|
||||
@@ -299,9 +299,9 @@ class _RemotePageState extends State<RemotePage>
|
||||
void enterView(PointerEnterEvent evt) {
|
||||
_cursorOverImage.value = true;
|
||||
_firstEnterImage.value = true;
|
||||
if (_onEnterOrLeaveImage4Menubar != null) {
|
||||
if (_onEnterOrLeaveImage4Toolbar != null) {
|
||||
try {
|
||||
_onEnterOrLeaveImage4Menubar!(true);
|
||||
_onEnterOrLeaveImage4Toolbar!(true);
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
@@ -322,9 +322,9 @@ class _RemotePageState extends State<RemotePage>
|
||||
|
||||
_cursorOverImage.value = false;
|
||||
_firstEnterImage.value = false;
|
||||
if (_onEnterOrLeaveImage4Menubar != null) {
|
||||
if (_onEnterOrLeaveImage4Toolbar != null) {
|
||||
try {
|
||||
_onEnterOrLeaveImage4Menubar!(false);
|
||||
_onEnterOrLeaveImage4Toolbar!(false);
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -29,12 +29,12 @@ const _kKeyLegacyMode = 'legacy';
|
||||
const _kKeyMapMode = 'map';
|
||||
const _kKeyTranslateMode = 'translate';
|
||||
|
||||
class MenubarState {
|
||||
class ToolbarState {
|
||||
final kStoreKey = 'remoteMenubarState';
|
||||
late RxBool show;
|
||||
late RxBool _pin;
|
||||
|
||||
MenubarState() {
|
||||
ToolbarState() {
|
||||
final s = bind.getLocalFlutterConfig(k: kStoreKey);
|
||||
if (s.isEmpty) {
|
||||
_initSet(false, false);
|
||||
@@ -49,7 +49,7 @@ class MenubarState {
|
||||
_initSet(m['pin'] ?? false, m['pin'] ?? false);
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('Failed to decode menubar state ${e.toString()}');
|
||||
debugPrint('Failed to decode toolbar state ${e.toString()}');
|
||||
_initSet(false, false);
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class MenubarState {
|
||||
}
|
||||
}
|
||||
|
||||
class _MenubarTheme {
|
||||
class _ToolbarTheme {
|
||||
static const Color blueColor = MyTheme.button;
|
||||
static const Color hoverBlueColor = MyTheme.accent;
|
||||
static const Color redColor = Colors.redAccent;
|
||||
@@ -286,14 +286,14 @@ class RemoteMenuEntry {
|
||||
}
|
||||
}
|
||||
|
||||
class RemoteMenubar extends StatefulWidget {
|
||||
class RemoteToolbar extends StatefulWidget {
|
||||
final String id;
|
||||
final FFI ffi;
|
||||
final MenubarState state;
|
||||
final ToolbarState state;
|
||||
final Function(Function(bool)) onEnterOrLeaveImageSetter;
|
||||
final Function() onEnterOrLeaveImageCleaner;
|
||||
|
||||
RemoteMenubar({
|
||||
RemoteToolbar({
|
||||
Key? key,
|
||||
required this.id,
|
||||
required this.ffi,
|
||||
@@ -303,10 +303,10 @@ class RemoteMenubar extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<RemoteMenubar> createState() => _RemoteMenubarState();
|
||||
State<RemoteToolbar> createState() => _RemoteToolbarState();
|
||||
}
|
||||
|
||||
class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
class _RemoteToolbarState extends State<RemoteToolbar> {
|
||||
late Debouncer<int> _debouncerHide;
|
||||
bool _isCursorOverImage = false;
|
||||
final _fractionX = 0.5.obs;
|
||||
@@ -390,7 +390,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
child: Offstage(
|
||||
offstage: _dragging.isTrue,
|
||||
child: Material(
|
||||
elevation: _MenubarTheme.elevation,
|
||||
elevation: _ToolbarTheme.elevation,
|
||||
shadowColor: MyTheme.color(context).shadow,
|
||||
child: _DraggableShowHide(
|
||||
sessionId: widget.ffi.sessionId,
|
||||
@@ -440,7 +440,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Material(
|
||||
elevation: _MenubarTheme.elevation,
|
||||
elevation: _ToolbarTheme.elevation,
|
||||
shadowColor: MyTheme.color(context).shadow,
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.0)),
|
||||
color: Theme.of(context)
|
||||
@@ -454,9 +454,9 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
data: themeData(),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(width: _MenubarTheme.buttonHMargin * 2),
|
||||
SizedBox(width: _ToolbarTheme.buttonHMargin * 2),
|
||||
...toolbarItems,
|
||||
SizedBox(width: _MenubarTheme.buttonHMargin * 2)
|
||||
SizedBox(width: _ToolbarTheme.buttonHMargin * 2)
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -491,7 +491,7 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
}
|
||||
|
||||
class _PinMenu extends StatelessWidget {
|
||||
final MenubarState state;
|
||||
final ToolbarState state;
|
||||
const _PinMenu({Key? key, required this.state}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -499,18 +499,18 @@ class _PinMenu extends StatelessWidget {
|
||||
return Obx(
|
||||
() => _IconMenuButton(
|
||||
assetName: state.pin ? "assets/pinned.svg" : "assets/unpinned.svg",
|
||||
tooltip: state.pin ? 'Unpin menubar' : 'Pin menubar',
|
||||
tooltip: state.pin ? 'Unpin Toolbar' : 'Pin Toolbar',
|
||||
onPressed: state.switchPin,
|
||||
color: state.pin ? _MenubarTheme.blueColor : Colors.grey[800]!,
|
||||
color: state.pin ? _ToolbarTheme.blueColor : Colors.grey[800]!,
|
||||
hoverColor:
|
||||
state.pin ? _MenubarTheme.hoverBlueColor : Colors.grey[850]!,
|
||||
state.pin ? _ToolbarTheme.hoverBlueColor : Colors.grey[850]!,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class _FullscreenMenu extends StatelessWidget {
|
||||
final MenubarState state;
|
||||
final ToolbarState state;
|
||||
final Function(bool) setFullscreen;
|
||||
bool get isFullscreen => stateGlobal.fullscreen;
|
||||
const _FullscreenMenu(
|
||||
@@ -524,8 +524,8 @@ class _FullscreenMenu extends StatelessWidget {
|
||||
isFullscreen ? "assets/fullscreen_exit.svg" : "assets/fullscreen.svg",
|
||||
tooltip: isFullscreen ? 'Exit Fullscreen' : 'Fullscreen',
|
||||
onPressed: () => setFullscreen(!isFullscreen),
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -541,8 +541,8 @@ class _MobileActionMenu extends StatelessWidget {
|
||||
assetName: 'assets/actions_mobile.svg',
|
||||
tooltip: 'Mobile Actions',
|
||||
onPressed: () => ffi.dialogManager.toggleMobileActionsOverlay(ffi: ffi),
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -559,8 +559,8 @@ class _MonitorMenu extends StatelessWidget {
|
||||
tooltip: 'Select Monitor',
|
||||
icon: icon(),
|
||||
ffi: ffi,
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
menuStyle: MenuStyle(
|
||||
padding:
|
||||
MaterialStatePropertyAll(EdgeInsets.symmetric(horizontal: 6))),
|
||||
@@ -581,7 +581,7 @@ class _MonitorMenu extends StatelessWidget {
|
||||
return Text(
|
||||
'${display.value + 1}/${pi.displays.length}',
|
||||
style: const TextStyle(
|
||||
color: _MenubarTheme.blueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
fontSize: 8,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -597,14 +597,14 @@ class _MonitorMenu extends StatelessWidget {
|
||||
for (int i = 0; i < pi.displays.length; i++) {
|
||||
rowChildren.add(_IconMenuButton(
|
||||
topLevel: false,
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
tooltip: "",
|
||||
hMargin: 6,
|
||||
vMargin: 12,
|
||||
icon: Container(
|
||||
alignment: AlignmentDirectional.center,
|
||||
constraints: const BoxConstraints(minHeight: _MenubarTheme.height),
|
||||
constraints: const BoxConstraints(minHeight: _ToolbarTheme.height),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@@ -615,7 +615,7 @@ class _MonitorMenu extends StatelessWidget {
|
||||
Text(
|
||||
(i + 1).toString(),
|
||||
style: TextStyle(
|
||||
color: _MenubarTheme.blueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -639,7 +639,7 @@ class _MonitorMenu extends StatelessWidget {
|
||||
class _ControlMenu extends StatelessWidget {
|
||||
final String id;
|
||||
final FFI ffi;
|
||||
final MenubarState state;
|
||||
final ToolbarState state;
|
||||
_ControlMenu(
|
||||
{Key? key, required this.id, required this.ffi, required this.state})
|
||||
: super(key: key);
|
||||
@@ -649,8 +649,8 @@ class _ControlMenu extends StatelessWidget {
|
||||
return _IconSubmenuButton(
|
||||
tooltip: 'Control Actions',
|
||||
svg: "assets/actions.svg",
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
ffi: ffi,
|
||||
menuChildren: toolbarControls(context, id, ffi).map((e) {
|
||||
if (e.divider) {
|
||||
@@ -804,7 +804,7 @@ class ScreenAdjustor {
|
||||
class _DisplayMenu extends StatefulWidget {
|
||||
final String id;
|
||||
final FFI ffi;
|
||||
final MenubarState state;
|
||||
final ToolbarState state;
|
||||
final Function(bool) setFullscreen;
|
||||
final Widget pluginItem;
|
||||
_DisplayMenu(
|
||||
@@ -852,8 +852,8 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
||||
tooltip: 'Display Settings',
|
||||
svg: "assets/display.svg",
|
||||
ffi: widget.ffi,
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
menuChildren: [
|
||||
_screenAdjustor.adjustWindow(),
|
||||
viewStyle(),
|
||||
@@ -1281,8 +1281,8 @@ class _KeyboardMenu extends StatelessWidget {
|
||||
tooltip: 'Keyboard Settings',
|
||||
svg: "assets/keyboard.svg",
|
||||
ffi: ffi,
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
menuChildren: [
|
||||
mode(modeOnly),
|
||||
localKeyboardType(),
|
||||
@@ -1401,8 +1401,8 @@ class _ChatMenuState extends State<_ChatMenu> {
|
||||
key: chatButtonKey,
|
||||
svg: 'assets/chat.svg',
|
||||
ffi: widget.ffi,
|
||||
color: _MenubarTheme.blueColor,
|
||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
menuChildren: [textChat(), voiceCall()]);
|
||||
}
|
||||
|
||||
@@ -1417,7 +1417,7 @@ class _ChatMenuState extends State<_ChatMenu> {
|
||||
Offset? initPos;
|
||||
if (renderBox != null) {
|
||||
final pos = renderBox.localToGlobal(Offset.zero);
|
||||
initPos = Offset(pos.dx, pos.dy + _MenubarTheme.dividerHeight);
|
||||
initPos = Offset(pos.dx, pos.dy + _ToolbarTheme.dividerHeight);
|
||||
}
|
||||
|
||||
widget.ffi.chatModel.changeCurrentID(ChatModel.clientModeID);
|
||||
@@ -1467,8 +1467,8 @@ class _VoiceCallMenu extends StatelessWidget {
|
||||
tooltip: tooltip,
|
||||
onPressed: () =>
|
||||
bind.sessionCloseVoiceCall(sessionId: ffi.sessionId),
|
||||
color: _MenubarTheme.redColor,
|
||||
hoverColor: _MenubarTheme.hoverRedColor);
|
||||
color: _ToolbarTheme.redColor,
|
||||
hoverColor: _ToolbarTheme.hoverRedColor);
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -1491,11 +1491,11 @@ class _RecordMenu extends StatelessWidget {
|
||||
: 'Start session recording',
|
||||
onPressed: () => recordingModel.toggle(),
|
||||
color: recordingModel.start
|
||||
? _MenubarTheme.redColor
|
||||
: _MenubarTheme.blueColor,
|
||||
? _ToolbarTheme.redColor
|
||||
: _ToolbarTheme.blueColor,
|
||||
hoverColor: recordingModel.start
|
||||
? _MenubarTheme.hoverRedColor
|
||||
: _MenubarTheme.hoverBlueColor,
|
||||
? _ToolbarTheme.hoverRedColor
|
||||
: _ToolbarTheme.hoverBlueColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1512,8 +1512,8 @@ class _CloseMenu extends StatelessWidget {
|
||||
assetName: 'assets/close.svg',
|
||||
tooltip: 'Close',
|
||||
onPressed: () => clientClose(ffi.sessionId, ffi.dialogManager),
|
||||
color: _MenubarTheme.redColor,
|
||||
hoverColor: _MenubarTheme.hoverRedColor,
|
||||
color: _ToolbarTheme.redColor,
|
||||
hoverColor: _ToolbarTheme.hoverRedColor,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1555,12 +1555,12 @@ class _IconMenuButtonState extends State<_IconMenuButton> {
|
||||
SvgPicture.asset(
|
||||
widget.assetName!,
|
||||
color: Colors.white,
|
||||
width: _MenubarTheme.buttonSize,
|
||||
height: _MenubarTheme.buttonSize,
|
||||
width: _ToolbarTheme.buttonSize,
|
||||
height: _ToolbarTheme.buttonSize,
|
||||
);
|
||||
final button = SizedBox(
|
||||
width: _MenubarTheme.buttonSize,
|
||||
height: _MenubarTheme.buttonSize,
|
||||
width: _ToolbarTheme.buttonSize,
|
||||
height: _ToolbarTheme.buttonSize,
|
||||
child: MenuItemButton(
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStatePropertyAll(Colors.transparent),
|
||||
@@ -1574,14 +1574,14 @@ class _IconMenuButtonState extends State<_IconMenuButton> {
|
||||
type: MaterialType.transparency,
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(_MenubarTheme.iconRadius),
|
||||
borderRadius: BorderRadius.circular(_ToolbarTheme.iconRadius),
|
||||
color: hover ? widget.hoverColor : widget.color,
|
||||
),
|
||||
child: icon)),
|
||||
),
|
||||
).marginSymmetric(
|
||||
horizontal: widget.hMargin ?? _MenubarTheme.buttonHMargin,
|
||||
vertical: widget.vMargin ?? _MenubarTheme.buttonVMargin);
|
||||
horizontal: widget.hMargin ?? _ToolbarTheme.buttonHMargin,
|
||||
vertical: widget.vMargin ?? _ToolbarTheme.buttonVMargin);
|
||||
if (widget.topLevel) {
|
||||
return MenuBar(children: [button]);
|
||||
} else {
|
||||
@@ -1626,12 +1626,12 @@ class _IconSubmenuButtonState extends State<_IconSubmenuButton> {
|
||||
SvgPicture.asset(
|
||||
widget.svg!,
|
||||
color: Colors.white,
|
||||
width: _MenubarTheme.buttonSize,
|
||||
height: _MenubarTheme.buttonSize,
|
||||
width: _ToolbarTheme.buttonSize,
|
||||
height: _ToolbarTheme.buttonSize,
|
||||
);
|
||||
final button = SizedBox(
|
||||
width: _MenubarTheme.buttonSize,
|
||||
height: _MenubarTheme.buttonSize,
|
||||
width: _ToolbarTheme.buttonSize,
|
||||
height: _ToolbarTheme.buttonSize,
|
||||
child: SubmenuButton(
|
||||
menuStyle: widget.menuStyle,
|
||||
style: ButtonStyle(
|
||||
@@ -1646,7 +1646,7 @@ class _IconSubmenuButtonState extends State<_IconSubmenuButton> {
|
||||
child: Ink(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(_MenubarTheme.iconRadius),
|
||||
BorderRadius.circular(_ToolbarTheme.iconRadius),
|
||||
color: hover ? widget.hoverColor : widget.color,
|
||||
),
|
||||
child: icon)),
|
||||
@@ -1655,8 +1655,8 @@ class _IconSubmenuButtonState extends State<_IconSubmenuButton> {
|
||||
.toList()));
|
||||
return MenuBar(children: [
|
||||
button.marginSymmetric(
|
||||
horizontal: _MenubarTheme.buttonHMargin,
|
||||
vertical: _MenubarTheme.buttonVMargin)
|
||||
horizontal: _ToolbarTheme.buttonHMargin,
|
||||
vertical: _ToolbarTheme.buttonVMargin)
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1938,15 +1938,15 @@ class _MultiMonitorMenu extends StatelessWidget {
|
||||
return _IconMenuButton(
|
||||
topLevel: false,
|
||||
color: i == display.value
|
||||
? _MenubarTheme.blueColor
|
||||
? _ToolbarTheme.blueColor
|
||||
: Colors.grey[800]!,
|
||||
hoverColor: i == display.value
|
||||
? _MenubarTheme.hoverBlueColor
|
||||
? _ToolbarTheme.hoverBlueColor
|
||||
: Colors.grey[850]!,
|
||||
icon: Container(
|
||||
alignment: AlignmentDirectional.center,
|
||||
constraints:
|
||||
const BoxConstraints(minHeight: _MenubarTheme.height),
|
||||
const BoxConstraints(minHeight: _ToolbarTheme.height),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
@@ -1959,7 +1959,7 @@ class _MultiMonitorMenu extends StatelessWidget {
|
||||
(i + 1).toString(),
|
||||
style: TextStyle(
|
||||
color: i == display.value
|
||||
? _MenubarTheme.blueColor
|
||||
? _ToolbarTheme.blueColor
|
||||
: Colors.grey[800]!,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -14,7 +14,7 @@ class StateGlobal {
|
||||
final RxBool _showTabBar = true.obs;
|
||||
final RxDouble _resizeEdgeSize = RxDouble(kWindowEdgeSize);
|
||||
final RxDouble _windowBorderWidth = RxDouble(kWindowBorderWidth);
|
||||
final RxBool showRemoteMenuBar = false.obs;
|
||||
final RxBool showRemoteToolBar = false.obs;
|
||||
final RxInt displaysCount = 0.obs;
|
||||
|
||||
// Use for desktop -> remote toolbar -> resolution
|
||||
|
||||
Reference in New Issue
Block a user