mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 23:19:02 +08:00
fix sciter more bitrate, change max bitrate to 2000%
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
63bf4b5fa8
commit
fa420c4825
@ -947,7 +947,9 @@ showSetOSPassword(
|
|||||||
Function()? closeCallback,
|
Function()? closeCallback,
|
||||||
) async {
|
) async {
|
||||||
final controller = TextEditingController();
|
final controller = TextEditingController();
|
||||||
osPassword ??= await bind.sessionGetOption(sessionId: sessionId, arg: 'os-password') ?? '';
|
osPassword ??=
|
||||||
|
await bind.sessionGetOption(sessionId: sessionId, arg: 'os-password') ??
|
||||||
|
'';
|
||||||
var autoLogin =
|
var autoLogin =
|
||||||
await bind.sessionGetOption(sessionId: sessionId, arg: 'auto-login') !=
|
await bind.sessionGetOption(sessionId: sessionId, arg: 'auto-login') !=
|
||||||
'';
|
'';
|
||||||
@ -957,6 +959,7 @@ showSetOSPassword(
|
|||||||
close();
|
close();
|
||||||
if (closeCallback != null) closeCallback();
|
if (closeCallback != null) closeCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
submit() {
|
submit() {
|
||||||
var text = controller.text.trim();
|
var text = controller.text.trim();
|
||||||
bind.sessionPeerOption(
|
bind.sessionPeerOption(
|
||||||
@ -1221,7 +1224,7 @@ customImageQualityDialog(SessionID sessionId, String id, FFI ffi) async {
|
|||||||
quality != null && quality.isNotEmpty ? quality[0].toDouble() : 50.0;
|
quality != null && quality.isNotEmpty ? quality[0].toDouble() : 50.0;
|
||||||
const qualityMinValue = 10.0;
|
const qualityMinValue = 10.0;
|
||||||
const qualityMoreThresholdValue = 100.0;
|
const qualityMoreThresholdValue = 100.0;
|
||||||
const qualityMaxValue = 4000.0;
|
const qualityMaxValue = 2000.0;
|
||||||
if (qualityInitValue < qualityMinValue) {
|
if (qualityInitValue < qualityMinValue) {
|
||||||
qualityInitValue = qualityMinValue;
|
qualityInitValue = qualityMinValue;
|
||||||
}
|
}
|
||||||
@ -1269,22 +1272,23 @@ customImageQualityDialog(SessionID sessionId, String id, FFI ffi) async {
|
|||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Checkbox(
|
Checkbox(
|
||||||
value: moreQualityChecked.value,
|
value: moreQualityChecked.value,
|
||||||
onChanged: (bool? value) {
|
onChanged: (bool? value) {
|
||||||
moreQualityChecked.value = value!;
|
moreQualityChecked.value = value!;
|
||||||
if (!value &&
|
if (!value &&
|
||||||
qualitySliderValue.value > qualityMoreThresholdValue) {
|
qualitySliderValue.value >
|
||||||
qualitySliderValue.value = qualityMoreThresholdValue;
|
qualityMoreThresholdValue) {
|
||||||
debouncerQuality.value = qualityMoreThresholdValue;
|
qualitySliderValue.value = qualityMoreThresholdValue;
|
||||||
}
|
debouncerQuality.value = qualityMoreThresholdValue;
|
||||||
},
|
}
|
||||||
).marginOnly(right: 5),
|
},
|
||||||
Expanded(
|
).marginOnly(right: 5),
|
||||||
child: Text(translate('More')),
|
Expanded(
|
||||||
)
|
child: Text(translate('More')),
|
||||||
],
|
)
|
||||||
|
],
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
|
@ -425,14 +425,19 @@ function handle_custom_image_quality() {
|
|||||||
var tmp = handler.get_custom_image_quality();
|
var tmp = handler.get_custom_image_quality();
|
||||||
var bitrate = (tmp[0] || 50);
|
var bitrate = (tmp[0] || 50);
|
||||||
var extendedBitrate = bitrate > 100;
|
var extendedBitrate = bitrate > 100;
|
||||||
var maxRate = extendedBitrate ? 4000 : 100;
|
var maxRate = extendedBitrate ? 2000 : 100;
|
||||||
msgbox("custom-image-quality", "Custom Image Quality", "<div .form> \
|
msgbox("custom-image-quality", "Custom Image Quality", "<div .form> \
|
||||||
<div><input #bitrate-slider type=\"hslider\" style=\"width: 50%\" name=\"bitrate\" max=\"" + maxRate + "\" min=\"10\" value=\"" + bitrate + "\"/ buddy=\"bitrate-buddy\"><b #bitrate-buddy>x</b>% Bitrate <button|checkbox #extended-slider .custom-event " + (extendedBitrate ? "checked" : "") + ">More</button></div> \
|
<div><input #bitrate-slider type=\"hslider\" style=\"width: 50%\" name=\"bitrate\" max=\"" + maxRate + "\" min=\"10\" value=\"" + bitrate + "\"/ buddy=\"bitrate-buddy\"><b #bitrate-buddy>x</b>% Bitrate <button|checkbox #extended-slider .custom-event " + (extendedBitrate ? "checked" : "") + ">More</button></div> \
|
||||||
</div>", "", function(res=null) {
|
</div>", "", function(res=null) {
|
||||||
if (!res) return;
|
if (!res) return;
|
||||||
if (res.id === "extended-slider") {
|
if (res.id === "extended-slider") {
|
||||||
var slider = res.parent.$(#bitrate-slider)
|
var slider = res.parent.$(#bitrate-slider)
|
||||||
slider.slider.max = res.checked ? 4000 : 100;
|
slider.slider.max = res.checked ? 2000 : 100;
|
||||||
|
if (slider.value > slider.slider.max) {
|
||||||
|
slider.value = slider.slider.max;
|
||||||
|
}
|
||||||
|
var buddy = res.parent.$(#bitrate-buddy);
|
||||||
|
buddy.value = slider.value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!res.bitrate) return;
|
if (!res.bitrate) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user