Merge pull request #2329 from fufesou/refact_remote_menu
do not show scroll options when scale adaptive
This commit is contained in:
commit
65d77caecb
@ -751,31 +751,6 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
dismissOnClicked: true,
|
dismissOnClicked: true,
|
||||||
),
|
),
|
||||||
MenuEntryDivider<String>(),
|
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>(
|
MenuEntryRadios<String>(
|
||||||
text: translate('Image Quality'),
|
text: translate('Image Quality'),
|
||||||
optionsGetter: () => [
|
optionsGetter: () => [
|
||||||
@ -955,6 +930,36 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
MenuEntryDivider<String>(),
|
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)) {
|
if (_isWindowCanBeAdjusted(remoteCount)) {
|
||||||
displayMenu.insert(
|
displayMenu.insert(
|
||||||
0,
|
0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user