mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-24 12:29:04 +08:00
do not show scroll options when scale adaptive
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
e8a836e449
commit
56ee947e2c
@ -751,31 +751,6 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
MenuEntryDivider<String>(),
|
||||
MenuEntryRadios<String>(
|
||||
text: translate('Scroll Style'),
|
||||
optionsGetter: () => [
|
||||
MenuEntryRadioOption(
|
||||
text: translate('ScrollAuto'),
|
||||
value: kRemoteScrollStyleAuto,
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
MenuEntryRadioOption(
|
||||
text: translate('Scrollbar'),
|
||||
value: kRemoteScrollStyleBar,
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
],
|
||||
curOptionGetter: () async =>
|
||||
// null means peer id is not found, which there's no need to care about
|
||||
await bind.sessionGetScrollStyle(id: widget.id) ?? '',
|
||||
optionSetter: (String oldValue, String newValue) async {
|
||||
await bind.sessionSetScrollStyle(id: widget.id, value: newValue);
|
||||
widget.ffi.canvasModel.updateScrollStyle();
|
||||
},
|
||||
padding: padding,
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
MenuEntryDivider<String>(),
|
||||
MenuEntryRadios<String>(
|
||||
text: translate('Image Quality'),
|
||||
optionsGetter: () => [
|
||||
@ -955,6 +930,36 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
MenuEntryDivider<String>(),
|
||||
];
|
||||
|
||||
if (widget.state.viewStyle.value == kRemoteViewStyleOriginal) {
|
||||
displayMenu.insert(
|
||||
2,
|
||||
MenuEntryRadios<String>(
|
||||
text: translate('Scroll Style'),
|
||||
optionsGetter: () => [
|
||||
MenuEntryRadioOption(
|
||||
text: translate('ScrollAuto'),
|
||||
value: kRemoteScrollStyleAuto,
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
MenuEntryRadioOption(
|
||||
text: translate('Scrollbar'),
|
||||
value: kRemoteScrollStyleBar,
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
],
|
||||
curOptionGetter: () async =>
|
||||
// null means peer id is not found, which there's no need to care about
|
||||
await bind.sessionGetScrollStyle(id: widget.id) ?? '',
|
||||
optionSetter: (String oldValue, String newValue) async {
|
||||
await bind.sessionSetScrollStyle(id: widget.id, value: newValue);
|
||||
widget.ffi.canvasModel.updateScrollStyle();
|
||||
},
|
||||
padding: padding,
|
||||
dismissOnClicked: true,
|
||||
));
|
||||
displayMenu.insert(3, MenuEntryDivider<String>());
|
||||
}
|
||||
|
||||
if (_isWindowCanBeAdjusted(remoteCount)) {
|
||||
displayMenu.insert(
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user