mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-20 16:35:47 +08:00
Change default settings
This commit is contained in:
@@ -40,7 +40,7 @@ class AppPreferences(context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inner class Gesture {
|
inner class Gesture {
|
||||||
val style; get() = prefs.getString("gesture_style", "touchscreen")!!
|
val style; get() = prefs.getString("gesture_style", "touchpad")!!
|
||||||
val tap1 = "left-click" //Preference UI was removed
|
val tap1 = "left-click" //Preference UI was removed
|
||||||
val tap2; get() = prefs.getString("gesture_tap2", "open-keyboard")!!
|
val tap2; get() = prefs.getString("gesture_tap2", "open-keyboard")!!
|
||||||
val doubleTap; get() = prefs.getString("gesture_double_tap", "double-click")!!
|
val doubleTap; get() = prefs.getString("gesture_double_tap", "double-click")!!
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
app:title="@string/pref_gesture">
|
app:title="@string/pref_gesture">
|
||||||
|
|
||||||
<com.gaurav.avnc.ui.prefs.ListPreferenceEx
|
<com.gaurav.avnc.ui.prefs.ListPreferenceEx
|
||||||
app:defaultValue="touchscreen"
|
app:defaultValue="touchpad"
|
||||||
app:entries="@array/gesture_style_entries"
|
app:entries="@array/gesture_style_entries"
|
||||||
app:entryValues="@array/gesture_style_values"
|
app:entryValues="@array/gesture_style_values"
|
||||||
app:key="gesture_style"
|
app:key="gesture_style"
|
||||||
|
|||||||
@@ -313,9 +313,15 @@ class _SettingPageState extends State<SettingPage> {
|
|||||||
}), body: Padding(padding: const EdgeInsets.all(12), child: Column(children: [
|
}), body: Padding(padding: const EdgeInsets.all(12), child: Column(children: [
|
||||||
SizedBox.fromSize(size: const Size.square(16)),
|
SizedBox.fromSize(size: const Size.square(16)),
|
||||||
const Text("""AVNC可以带来获得更好的操控体验;
|
const Text("""AVNC可以带来获得更好的操控体验;
|
||||||
如触摸板触控,双击弹出键盘,自动剪切板,画中画模式等等。这是一个实验性功能。"""),
|
如触摸板触控,双指单击弹出键盘,自动剪切板,画中画模式等等。这是一个实验性功能。"""),
|
||||||
SizedBox.fromSize(size: const Size.square(16)),
|
SizedBox.fromSize(size: const Size.square(16)),
|
||||||
Wrap(alignment: WrapAlignment.center, spacing: 4.0, runSpacing: 4.0, children: [
|
Wrap(alignment: WrapAlignment.center, spacing: 4.0, runSpacing: 4.0, children: [
|
||||||
|
OutlinedButton(style: D.commandButtonStyle, child: const Text("AVNC设置"), onPressed: () async {
|
||||||
|
await D.avncChannel.invokeMethod("launchPrefsPage", {});
|
||||||
|
}),
|
||||||
|
OutlinedButton(style: D.commandButtonStyle, child: const Text("关于AVNC"), onPressed: () async {
|
||||||
|
await D.avncChannel.invokeMethod("launchAboutPage", {});
|
||||||
|
}),
|
||||||
OutlinedButton(style: D.commandButtonStyle, child: const Text("AVNC启动时分辨率设置"), onPressed: () async {
|
OutlinedButton(style: D.commandButtonStyle, child: const Text("AVNC启动时分辨率设置"), onPressed: () async {
|
||||||
String w = "1440";
|
String w = "1440";
|
||||||
String h = "720";
|
String h = "720";
|
||||||
@@ -353,12 +359,6 @@ sed -i -E "s@^(VNC_RESOLUTION)=.*@\\1=${w}x${h}@" \$(command -v startvnc)""");
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
OutlinedButton(style: D.commandButtonStyle, child: const Text("AVNC设置"), onPressed: () async {
|
|
||||||
await D.avncChannel.invokeMethod("launchPrefsPage", {});
|
|
||||||
}),
|
|
||||||
OutlinedButton(style: D.commandButtonStyle, child: const Text("关于AVNC"), onPressed: () async {
|
|
||||||
await D.avncChannel.invokeMethod("launchAboutPage", {});
|
|
||||||
}),
|
|
||||||
]),
|
]),
|
||||||
SizedBox.fromSize(size: const Size.square(8)),
|
SizedBox.fromSize(size: const Size.square(8)),
|
||||||
SwitchListTile(title: const Text("默认使用AVNC"), subtitle: const Text("下次启动时生效"), value: Util.getGlobal("useAvnc") as bool, onChanged:(value) {
|
SwitchListTile(title: const Text("默认使用AVNC"), subtitle: const Text("下次启动时生效"), value: Util.getGlobal("useAvnc") as bool, onChanged:(value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user