mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Change the option 'Scroll mode' to be 'Reverse mouse wheel'
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
558567d399
commit
f1d5afe72a
@ -105,7 +105,6 @@ class _DesktopSettingPageState extends State<DesktopSettingPage>
|
|||||||
_TabInfo('Network', Icons.link_outlined, Icons.link),
|
_TabInfo('Network', Icons.link_outlined, Icons.link),
|
||||||
_TabInfo(
|
_TabInfo(
|
||||||
'Display', Icons.desktop_windows_outlined, Icons.desktop_windows),
|
'Display', Icons.desktop_windows_outlined, Icons.desktop_windows),
|
||||||
_TabInfo('Input', Icons.keyboard_outlined, Icons.keyboard),
|
|
||||||
_TabInfo('Account', Icons.person_outline, Icons.person),
|
_TabInfo('Account', Icons.person_outline, Icons.person),
|
||||||
_TabInfo('About', Icons.info_outline, Icons.info)
|
_TabInfo('About', Icons.info_outline, Icons.info)
|
||||||
];
|
];
|
||||||
@ -122,7 +121,6 @@ class _DesktopSettingPageState extends State<DesktopSettingPage>
|
|||||||
_Safety(),
|
_Safety(),
|
||||||
_Network(),
|
_Network(),
|
||||||
_Display(),
|
_Display(),
|
||||||
_Input(),
|
|
||||||
_Account(),
|
_Account(),
|
||||||
_About(),
|
_About(),
|
||||||
];
|
];
|
||||||
@ -1218,50 +1216,7 @@ class _DisplayState extends State<_Display> {
|
|||||||
otherRow('Disable clipboard', 'disable_clipboard'),
|
otherRow('Disable clipboard', 'disable_clipboard'),
|
||||||
otherRow('Lock after session end', 'lock_after_session_end'),
|
otherRow('Lock after session end', 'lock_after_session_end'),
|
||||||
otherRow('Privacy mode', 'privacy_mode'),
|
otherRow('Privacy mode', 'privacy_mode'),
|
||||||
]);
|
otherRow('Reverse mouse wheel', 'reverse_mouse_wheel'),
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _Input extends StatefulWidget {
|
|
||||||
const _Input({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<_Input> createState() => _InputState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _InputState extends State<_Input> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
final scrollController = ScrollController();
|
|
||||||
return DesktopScrollWrapper(
|
|
||||||
scrollController: scrollController,
|
|
||||||
child: ListView(
|
|
||||||
controller: scrollController,
|
|
||||||
physics: DraggableNeverScrollableScrollPhysics(),
|
|
||||||
children: [
|
|
||||||
scrollMode(context),
|
|
||||||
]).marginOnly(bottom: _kListViewBottomMargin));
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget scrollMode(BuildContext context) {
|
|
||||||
final key = 'scroll_mode';
|
|
||||||
onChanged(String value) async {
|
|
||||||
await bind.mainSetUserDefaultOption(key: key, value: value);
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
|
|
||||||
final groupValue = bind.mainGetUserDefaultOption(key: key);
|
|
||||||
return _Card(title: 'Default Scroll Mode', children: [
|
|
||||||
_Radio(context,
|
|
||||||
value: kScrollModeDefault,
|
|
||||||
groupValue: groupValue,
|
|
||||||
label: 'Default mode',
|
|
||||||
onChanged: onChanged),
|
|
||||||
_Radio(context,
|
|
||||||
value: kScrollModeReverse,
|
|
||||||
groupValue: groupValue,
|
|
||||||
label: 'Reverse mode',
|
|
||||||
onChanged: onChanged),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -546,9 +546,11 @@ class _PinMenu extends StatelessWidget {
|
|||||||
assetName: state.pin ? "assets/pinned.svg" : "assets/unpinned.svg",
|
assetName: state.pin ? "assets/pinned.svg" : "assets/unpinned.svg",
|
||||||
tooltip: state.pin ? 'Unpin Toolbar' : 'Pin Toolbar',
|
tooltip: state.pin ? 'Unpin Toolbar' : 'Pin Toolbar',
|
||||||
onPressed: state.switchPin,
|
onPressed: state.switchPin,
|
||||||
color: state.pin ? _ToolbarTheme.blueColor : _ToolbarTheme.inactiveColor,
|
color:
|
||||||
hoverColor:
|
state.pin ? _ToolbarTheme.blueColor : _ToolbarTheme.inactiveColor,
|
||||||
state.pin ? _ToolbarTheme.hoverBlueColor : _ToolbarTheme.hoverInactiveColor,
|
hoverColor: state.pin
|
||||||
|
? _ToolbarTheme.hoverBlueColor
|
||||||
|
: _ToolbarTheme.hoverInactiveColor,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -561,15 +563,18 @@ class _MobileActionMenu extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (!ffi.ffiModel.isPeerAndroid) return Offstage();
|
if (!ffi.ffiModel.isPeerAndroid) return Offstage();
|
||||||
return Obx(()=>_IconMenuButton(
|
return Obx(() => _IconMenuButton(
|
||||||
assetName: 'assets/actions_mobile.svg',
|
assetName: 'assets/actions_mobile.svg',
|
||||||
tooltip: 'Mobile Actions',
|
tooltip: 'Mobile Actions',
|
||||||
onPressed: () => ffi.dialogManager.toggleMobileActionsOverlay(ffi: ffi),
|
onPressed: () =>
|
||||||
color: ffi.dialogManager.mobileActionsOverlayVisible.isTrue
|
ffi.dialogManager.toggleMobileActionsOverlay(ffi: ffi),
|
||||||
? _ToolbarTheme.blueColor : _ToolbarTheme.inactiveColor,
|
color: ffi.dialogManager.mobileActionsOverlayVisible.isTrue
|
||||||
hoverColor: ffi.dialogManager.mobileActionsOverlayVisible.isTrue
|
? _ToolbarTheme.blueColor
|
||||||
? _ToolbarTheme.hoverBlueColor : _ToolbarTheme.hoverInactiveColor,
|
: _ToolbarTheme.inactiveColor,
|
||||||
));
|
hoverColor: ffi.dialogManager.mobileActionsOverlayVisible.isTrue
|
||||||
|
? _ToolbarTheme.hoverBlueColor
|
||||||
|
: _ToolbarTheme.hoverInactiveColor,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1309,7 +1314,7 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
Divider(),
|
Divider(),
|
||||||
viewMode(),
|
viewMode(),
|
||||||
Divider(),
|
Divider(),
|
||||||
scrollMode(),
|
reverseMouseWheel(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1398,37 +1403,29 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
child: Text(translate('View Mode')));
|
child: Text(translate('View Mode')));
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollMode() {
|
reverseMouseWheel() {
|
||||||
return futureBuilder(future: () async {
|
return futureBuilder(future: () async {
|
||||||
final mode = await bind.sessionGetScrollMode(sessionId: ffi.sessionId);
|
final v =
|
||||||
if (mode != null) {
|
await bind.sessionGetReverseMouseWheel(sessionId: ffi.sessionId);
|
||||||
return mode;
|
debugPrint('REMOVE ME ======================== $v');
|
||||||
|
if (v != null && v != '') {
|
||||||
|
return v;
|
||||||
}
|
}
|
||||||
return bind.mainGetUserDefaultOption(key: 'scroll_mode');
|
return bind.mainGetUserDefaultOption(key: 'reverse_mouse_wheel');
|
||||||
}(), hasData: (data) {
|
}(), hasData: (data) {
|
||||||
final groupValue = data as String;
|
debugPrint('REMOVE ME ======================== data $data');
|
||||||
List<InputModeMenu> modes = [
|
|
||||||
InputModeMenu(key: kScrollModeDefault, menu: 'Default mode'),
|
|
||||||
InputModeMenu(key: kScrollModeReverse, menu: 'Reverse mode'),
|
|
||||||
];
|
|
||||||
List<RdoMenuButton> list = [];
|
|
||||||
final enabled = !ffi.ffiModel.viewOnly;
|
final enabled = !ffi.ffiModel.viewOnly;
|
||||||
onChanged(String? value) async {
|
onChanged(bool? value) async {
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
await bind.sessionSetScrollMode(sessionId: ffi.sessionId, value: value);
|
await bind.sessionSetReverseMouseWheel(
|
||||||
|
sessionId: ffi.sessionId, value: value ? 'Y' : 'N');
|
||||||
}
|
}
|
||||||
|
|
||||||
for (InputModeMenu mode in modes) {
|
return CkbMenuButton(
|
||||||
var text = translate(mode.menu);
|
value: data == 'Y',
|
||||||
list.add(RdoMenuButton<String>(
|
|
||||||
child: Text(text),
|
|
||||||
value: mode.key,
|
|
||||||
groupValue: groupValue,
|
|
||||||
onChanged: enabled ? onChanged : null,
|
onChanged: enabled ? onChanged : null,
|
||||||
ffi: ffi,
|
child: Text(translate('Reverse mouse wheel')),
|
||||||
));
|
ffi: ffi);
|
||||||
}
|
|
||||||
return Column(children: list);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1628,26 +1625,26 @@ class _IconMenuButtonState extends State<_IconMenuButton> {
|
|||||||
width: _ToolbarTheme.buttonSize,
|
width: _ToolbarTheme.buttonSize,
|
||||||
height: _ToolbarTheme.buttonSize,
|
height: _ToolbarTheme.buttonSize,
|
||||||
child: MenuItemButton(
|
child: MenuItemButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
backgroundColor: MaterialStatePropertyAll(Colors.transparent),
|
backgroundColor: MaterialStatePropertyAll(Colors.transparent),
|
||||||
padding: MaterialStatePropertyAll(EdgeInsets.zero),
|
padding: MaterialStatePropertyAll(EdgeInsets.zero),
|
||||||
overlayColor: MaterialStatePropertyAll(Colors.transparent)),
|
overlayColor: MaterialStatePropertyAll(Colors.transparent)),
|
||||||
onHover: (value) => setState(() {
|
onHover: (value) => setState(() {
|
||||||
hover = value;
|
hover = value;
|
||||||
}),
|
}),
|
||||||
onPressed: widget.onPressed,
|
onPressed: widget.onPressed,
|
||||||
child: Tooltip(
|
child: Tooltip(
|
||||||
message: translate(widget.tooltip),
|
message: translate(widget.tooltip),
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: Ink(
|
child: Ink(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(_ToolbarTheme.iconRadius),
|
borderRadius:
|
||||||
color: hover ? widget.hoverColor : widget.color,
|
BorderRadius.circular(_ToolbarTheme.iconRadius),
|
||||||
),
|
color: hover ? widget.hoverColor : widget.color,
|
||||||
child: icon)),
|
),
|
||||||
)
|
child: icon)),
|
||||||
),
|
)),
|
||||||
).marginSymmetric(
|
).marginSymmetric(
|
||||||
horizontal: widget.hMargin ?? _ToolbarTheme.buttonHMargin,
|
horizontal: widget.hMargin ?? _ToolbarTheme.buttonHMargin,
|
||||||
vertical: widget.vMargin ?? _ToolbarTheme.buttonVMargin);
|
vertical: widget.vMargin ?? _ToolbarTheme.buttonVMargin);
|
||||||
|
|||||||
@ -277,13 +277,13 @@ pub struct PeerConfig {
|
|||||||
pub keyboard_mode: String,
|
pub keyboard_mode: String,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
pub view_only: ViewOnly,
|
pub view_only: ViewOnly,
|
||||||
// Mouse wheel or touchpad scroll mode, default or reverse
|
// Mouse wheel or touchpad scroll mode
|
||||||
#[serde(
|
#[serde(
|
||||||
default = "PeerConfig::default_scroll_mode",
|
default = "PeerConfig::default_reverse_mouse_wheel",
|
||||||
deserialize_with = "PeerConfig::deserialize_scroll_mode",
|
deserialize_with = "PeerConfig::deserialize_reverse_mouse_wheel",
|
||||||
skip_serializing_if = "String::is_empty"
|
skip_serializing_if = "String::is_empty"
|
||||||
)]
|
)]
|
||||||
pub scroll_mode: String,
|
pub reverse_mouse_wheel: String,
|
||||||
|
|
||||||
#[serde(
|
#[serde(
|
||||||
default,
|
default,
|
||||||
@ -327,7 +327,7 @@ impl Default for PeerConfig {
|
|||||||
show_quality_monitor: Default::default(),
|
show_quality_monitor: Default::default(),
|
||||||
keyboard_mode: Default::default(),
|
keyboard_mode: Default::default(),
|
||||||
view_only: Default::default(),
|
view_only: Default::default(),
|
||||||
scroll_mode: Self::default_scroll_mode(),
|
reverse_mouse_wheel: Self::default_reverse_mouse_wheel(),
|
||||||
custom_resolutions: Default::default(),
|
custom_resolutions: Default::default(),
|
||||||
options: Self::default_options(),
|
options: Self::default_options(),
|
||||||
ui_flutter: Default::default(),
|
ui_flutter: Default::default(),
|
||||||
@ -1140,9 +1140,9 @@ impl PeerConfig {
|
|||||||
UserDefaultConfig::read().get("image_quality")
|
UserDefaultConfig::read().get("image_quality")
|
||||||
);
|
);
|
||||||
serde_field_string!(
|
serde_field_string!(
|
||||||
default_scroll_mode,
|
default_reverse_mouse_wheel,
|
||||||
deserialize_scroll_mode,
|
deserialize_reverse_mouse_wheel,
|
||||||
UserDefaultConfig::read().get("scroll_mode")
|
UserDefaultConfig::read().get("reverse_mouse_wheel")
|
||||||
);
|
);
|
||||||
|
|
||||||
fn default_custom_image_quality() -> Vec<i32> {
|
fn default_custom_image_quality() -> Vec<i32> {
|
||||||
@ -1488,7 +1488,6 @@ impl UserDefaultConfig {
|
|||||||
}
|
}
|
||||||
"custom_image_quality" => self.get_double_string(key, 50.0, 10.0, 0xFFF as f64),
|
"custom_image_quality" => self.get_double_string(key, 50.0, 10.0, 0xFFF as f64),
|
||||||
"custom-fps" => self.get_double_string(key, 30.0, 5.0, 120.0),
|
"custom-fps" => self.get_double_string(key, 30.0, 5.0, 120.0),
|
||||||
"scroll_mode" => self.get_string(key, "default", vec!["reverse"]),
|
|
||||||
_ => self
|
_ => self
|
||||||
.options
|
.options
|
||||||
.get(key)
|
.get(key)
|
||||||
@ -1498,7 +1497,11 @@ impl UserDefaultConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn set(&mut self, key: String, value: String) {
|
pub fn set(&mut self, key: String, value: String) {
|
||||||
self.options.insert(key, value);
|
if value.is_empty() {
|
||||||
|
self.options.remove(&key);
|
||||||
|
} else {
|
||||||
|
self.options.insert(key, value);
|
||||||
|
}
|
||||||
self.store();
|
self.store();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1195,14 +1195,14 @@ impl LoginConfigHandler {
|
|||||||
self.save_config(config);
|
self.save_config(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Save mouse scroll mode("default", "reverse") to the current config.
|
/// Save reverse mouse wheel ("", "Y") to the current config.
|
||||||
///
|
///
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
///
|
///
|
||||||
/// * `value` - The view style to be saved.
|
/// * `value` - The reverse mouse wheel ("", "Y").
|
||||||
pub fn save_scroll_mode(&mut self, value: String) {
|
pub fn save_reverse_mouse_wheel(&mut self, value: String) {
|
||||||
let mut config = self.load_config();
|
let mut config = self.load_config();
|
||||||
config.scroll_mode = value;
|
config.reverse_mouse_wheel = value;
|
||||||
self.save_config(config);
|
self.save_config(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -300,17 +300,17 @@ pub fn session_set_keyboard_mode(session_id: SessionID, value: String) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn session_get_scroll_mode(session_id: SessionID) -> Option<String> {
|
pub fn session_get_reverse_mouse_wheel(session_id: SessionID) -> Option<String> {
|
||||||
if let Some(session) = SESSIONS.read().unwrap().get(&session_id) {
|
if let Some(session) = SESSIONS.read().unwrap().get(&session_id) {
|
||||||
Some(session.get_scroll_mode())
|
Some(session.get_reverse_mouse_wheel())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn session_set_scroll_mode(session_id: SessionID, value: String) {
|
pub fn session_set_reverse_mouse_wheel(session_id: SessionID, value: String) {
|
||||||
if let Some(session) = SESSIONS.write().unwrap().get_mut(&session_id) {
|
if let Some(session) = SESSIONS.write().unwrap().get_mut(&session_id) {
|
||||||
session.save_scroll_mode(value);
|
session.save_reverse_mouse_wheel(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "HSV 色"),
|
("HSV Color", "HSV 色"),
|
||||||
("Installation Successful!", "安装成功!"),
|
("Installation Successful!", "安装成功!"),
|
||||||
("Installation failed!", "安装失败!"),
|
("Installation failed!", "安装失败!"),
|
||||||
("Input", "输入"),
|
("Reverse mouse wheel", "鼠标滚轮反向"),
|
||||||
("Default Scroll Mode", "默认滚动模式"),
|
|
||||||
("Default mode", "默认模式"),
|
|
||||||
("Reverse mode", "反向模式"),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "HSV-Farbe"),
|
("HSV Color", "HSV-Farbe"),
|
||||||
("Installation Successful!", "Installation erfolgreich!"),
|
("Installation Successful!", "Installation erfolgreich!"),
|
||||||
("Installation failed!", "Installation fehlgeschlagen!"),
|
("Installation failed!", "Installation fehlgeschlagen!"),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,5 +77,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("pull_ab_failed_tip", "Failed to refresh address book"),
|
("pull_ab_failed_tip", "Failed to refresh address book"),
|
||||||
("push_ab_failed_tip", "Failed to sync address book to server"),
|
("push_ab_failed_tip", "Failed to sync address book to server"),
|
||||||
("synced_peer_readded_tip", "The devices that were present in the recent sessions will be synchronized back to the address book."),
|
("synced_peer_readded_tip", "The devices that were present in the recent sessions will be synchronized back to the address book."),
|
||||||
|
("View Mode", "View mode"),
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "Color HSV"),
|
("HSV Color", "Color HSV"),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "Couleur TSL"),
|
("HSV Color", "Couleur TSL"),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "Warna HSV"),
|
("HSV Color", "Warna HSV"),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "Colore HSV"),
|
("HSV Color", "Colore HSV"),
|
||||||
("Installation Successful!", "Installazione completata"),
|
("Installation Successful!", "Installazione completata"),
|
||||||
("Installation failed!", "Installazione fallita"),
|
("Installation failed!", "Installazione fallita"),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "HSV Kleur"),
|
("HSV Color", "HSV Kleur"),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "Цвет HSV"),
|
("HSV Color", "Цвет HSV"),
|
||||||
("Installation Successful!", "Установка выполнена успешно!"),
|
("Installation Successful!", "Установка выполнена успешно!"),
|
||||||
("Installation failed!", "Установка не выполнена!"),
|
("Installation failed!", "Установка не выполнена!"),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "HSV Rengi"),
|
("HSV Color", "HSV Rengi"),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", "HSV 色"),
|
("HSV Color", "HSV 色"),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -543,9 +543,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
|||||||
("HSV Color", ""),
|
("HSV Color", ""),
|
||||||
("Installation Successful!", ""),
|
("Installation Successful!", ""),
|
||||||
("Installation failed!", ""),
|
("Installation failed!", ""),
|
||||||
("Input", ""),
|
("Reverse mouse wheel", ""),
|
||||||
("Default Scroll Mode", ""),
|
|
||||||
("Default mode", ""),
|
|
||||||
("Reverse mode", ""),
|
|
||||||
].iter().cloned().collect();
|
].iter().cloned().collect();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -175,12 +175,12 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
self.lc.write().unwrap().save_keyboard_mode(value);
|
self.lc.write().unwrap().save_keyboard_mode(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_scroll_mode(&self) -> String {
|
pub fn get_reverse_mouse_wheel(&self) -> String {
|
||||||
self.lc.read().unwrap().scroll_mode.clone()
|
self.lc.read().unwrap().reverse_mouse_wheel.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn save_scroll_mode(&mut self, value: String) {
|
pub fn save_reverse_mouse_wheel(&mut self, value: String) {
|
||||||
self.lc.write().unwrap().save_scroll_mode(value);
|
self.lc.write().unwrap().save_reverse_mouse_wheel(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn save_view_style(&mut self, value: String) {
|
pub fn save_view_style(&mut self, value: String) {
|
||||||
@ -765,7 +765,7 @@ impl<T: InvokeUiSession> Session<T> {
|
|||||||
#[inline]
|
#[inline]
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
fn is_scroll_reverse_mode(&self) -> bool {
|
fn is_scroll_reverse_mode(&self) -> bool {
|
||||||
self.lc.read().unwrap().scroll_mode.eq("reverse")
|
self.lc.read().unwrap().reverse_mouse_wheel.eq("Y")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user