feat, multi flutter ui sessions, change settings to 'Display'

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow 2023-10-08 22:32:48 +08:00
parent 013d307bcd
commit 2f2a7d1f89
38 changed files with 97 additions and 97 deletions

View File

@ -600,7 +600,7 @@ abstract class BasePeerCard extends StatelessWidget {
await _openNewConnInAction(id, 'Open in New Tab', kOptionOpenInTabs);
_openInWindowsAction(String id) async => await _openNewConnInAction(
id, 'Open in New Window', kOptionOpenInWindows);
id, 'Open in new window', kOptionOpenInWindows);
_openNewConnInOptAction(String id) async =>
mainGetLocalBoolOptionSync(kOptionOpenNewConnInTabs)

View File

@ -269,7 +269,6 @@ class _GeneralState extends State<_General> {
service(),
theme(),
hwcodec(),
chooseDisplay(),
audio(context),
record(context),
_Card(title: 'Language', children: [language()]),
@ -378,29 +377,6 @@ class _GeneralState extends State<_General> {
);
}
Widget chooseDisplay() {
if (!useTextureRender) return const Offstage();
var current = getChooseDisplayBehavior();
onChanged(String value) {
bind.mainSetOption(key: kKeyChooseDisplayBehavior, value: value);
setState(() {});
}
return _Card(title: 'Choose Display Behavior', children: [
_Radio<String>(context,
value: kChooseDisplayBehaviorSwitch,
groupValue: current,
label: 'Switch Display',
onChanged: onChanged),
_Radio<String>(context,
value: kChooseDisplayBehaviorOpen,
groupValue: current,
label: 'Open in New Window',
onChanged: onChanged),
]);
}
Widget audio(BuildContext context) {
String getDefault() {
if (Platform.isWindows) return translate('System Sound');
@ -1148,6 +1124,7 @@ class _DisplayState extends State<_Display> {
controller: scrollController,
physics: DraggableNeverScrollableScrollPhysics(),
children: [
chooseDisplay(context),
viewStyle(context),
scrollStyle(context),
imageQuality(context),
@ -1156,6 +1133,29 @@ class _DisplayState extends State<_Display> {
]).marginOnly(bottom: _kListViewBottomMargin));
}
Widget chooseDisplay(BuildContext context) {
if (!useTextureRender) return const Offstage();
var current = getChooseDisplayBehavior();
onChanged(String value) {
bind.mainSetOption(key: kKeyChooseDisplayBehavior, value: value);
setState(() {});
}
return _Card(title: 'Choose Display Behavior', children: [
_Radio<String>(context,
value: kChooseDisplayBehaviorSwitch,
groupValue: current,
label: 'Switch display',
onChanged: onChanged),
_Radio<String>(context,
value: kChooseDisplayBehaviorOpen,
groupValue: current,
label: 'Open in new window',
onChanged: onChanged),
]);
}
Widget viewStyle(BuildContext context) {
final key = 'view_style';
onChanged(String value) async {

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", "没有显示器。"),
("elevated_switch_display_msg", "切换到主显示器,因为提权后,不支持多显示器画面。"),
("Choose Display Behavior", "选择显示器的行为"),
("Switch Display", "切换显示器"),
("Open in New Window", "在新的窗口中打开"),
("Switch display", "切换显示器"),
("Open in new window", "在新的窗口中打开"),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -564,7 +564,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}

View File

@ -563,7 +563,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("No displays", ""),
("elevated_switch_display_msg", ""),
("Choose Display Behavior", ""),
("Switch Display", ""),
("Open in New Window", ""),
("Switch display", ""),
("Open in new window", ""),
].iter().cloned().collect();
}