fix formatId, right panel button style, default windows size (windows,
Linux, no idea about Mac, need to check with xcode)
This commit is contained in:
parent
13fe2164d4
commit
3101c4e119
@ -760,8 +760,9 @@ class PermissionManager {
|
|||||||
if (isDesktop) {
|
if (isDesktop) {
|
||||||
return Future.value(true);
|
return Future.value(true);
|
||||||
}
|
}
|
||||||
if (!permissions.contains(type))
|
if (!permissions.contains(type)) {
|
||||||
return Future.error("Wrong permission!$type");
|
return Future.error("Wrong permission!$type");
|
||||||
|
}
|
||||||
return gFFI.invokeMethod("check_permission", type);
|
return gFFI.invokeMethod("check_permission", type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -769,8 +770,9 @@ class PermissionManager {
|
|||||||
if (isDesktop) {
|
if (isDesktop) {
|
||||||
return Future.value(true);
|
return Future.value(true);
|
||||||
}
|
}
|
||||||
if (!permissions.contains(type))
|
if (!permissions.contains(type)) {
|
||||||
return Future.error("Wrong permission!$type");
|
return Future.error("Wrong permission!$type");
|
||||||
|
}
|
||||||
|
|
||||||
gFFI.invokeMethod("request_permission", type);
|
gFFI.invokeMethod("request_permission", type);
|
||||||
if (type == "ignore_battery_optimizations") {
|
if (type == "ignore_battery_optimizations") {
|
||||||
|
@ -33,6 +33,7 @@ class IDTextInputFormatter extends TextInputFormatter {
|
|||||||
|
|
||||||
String formatID(String id) {
|
String formatID(String id) {
|
||||||
String id2 = id.replaceAll(' ', '');
|
String id2 = id.replaceAll(' ', '');
|
||||||
|
if (int.tryParse(id2) == null) return id;
|
||||||
String newID = '';
|
String newID = '';
|
||||||
if (id2.length <= 3) {
|
if (id2.length <= 3) {
|
||||||
newID = id2;
|
newID = id2;
|
||||||
|
@ -215,7 +215,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
onConnect(isFileTransfer: true);
|
onConnect(isFileTransfer: true);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 24,
|
height: 27,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: ftPressed.value
|
color: ftPressed.value
|
||||||
@ -252,31 +252,36 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
|||||||
onTapCancel: () => connPressed.value = false,
|
onTapCancel: () => connPressed.value = false,
|
||||||
onHover: (value) => connHover.value = value,
|
onHover: (value) => connHover.value = value,
|
||||||
onTap: onConnect,
|
onTap: onConnect,
|
||||||
child: Container(
|
child: ConstrainedBox(
|
||||||
height: 24,
|
constraints: BoxConstraints(
|
||||||
decoration: BoxDecoration(
|
minWidth: 80.0,
|
||||||
color: connPressed.value
|
|
||||||
? MyTheme.accent
|
|
||||||
: MyTheme.button,
|
|
||||||
border: Border.all(
|
|
||||||
color: connPressed.value
|
|
||||||
? MyTheme.accent
|
|
||||||
: connHover.value
|
|
||||||
? MyTheme.hoverBorder
|
|
||||||
: MyTheme.button,
|
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.circular(5),
|
child: Container(
|
||||||
),
|
height: 27,
|
||||||
child: Center(
|
decoration: BoxDecoration(
|
||||||
child: Text(
|
color: connPressed.value
|
||||||
translate(
|
? MyTheme.accent
|
||||||
"Connect",
|
: MyTheme.button,
|
||||||
|
border: Border.all(
|
||||||
|
color: connPressed.value
|
||||||
|
? MyTheme.accent
|
||||||
|
: connHover.value
|
||||||
|
? MyTheme.hoverBorder
|
||||||
|
: MyTheme.button,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(5),
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
child: Center(
|
||||||
fontSize: 12, color: MyTheme.color(context).bg),
|
child: Text(
|
||||||
),
|
translate(
|
||||||
).marginSymmetric(horizontal: 12),
|
"Connect",
|
||||||
),
|
),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: MyTheme.color(context).bg),
|
||||||
|
),
|
||||||
|
).marginSymmetric(horizontal: 12),
|
||||||
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -290,7 +290,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onTrayMenuItemClick(MenuItem menuItem) {
|
void onTrayMenuItemClick(MenuItem menuItem) {
|
||||||
print('click ${menuItem.key}');
|
debugPrint('click ${menuItem.key}');
|
||||||
switch (menuItem.key) {
|
switch (menuItem.key) {
|
||||||
case "quit":
|
case "quit":
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -308,8 +308,8 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
|||||||
trayManager.addListener(this);
|
trayManager.addListener(this);
|
||||||
windowManager.addListener(this);
|
windowManager.addListener(this);
|
||||||
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
|
rustDeskWinManager.setMethodHandler((call, fromWindowId) async {
|
||||||
print(
|
debugPrint(
|
||||||
"call ${call.method} with args ${call.arguments} from window ${fromWindowId}");
|
"call ${call.method} with args ${call.arguments} from window $fromWindowId");
|
||||||
if (call.method == "main_window_on_top") {
|
if (call.method == "main_window_on_top") {
|
||||||
window_on_top(null);
|
window_on_top(null);
|
||||||
}
|
}
|
||||||
@ -373,8 +373,7 @@ Future<bool> loginDialog() async {
|
|||||||
debugPrint("$resp");
|
debugPrint("$resp");
|
||||||
completer.complete(true);
|
completer.complete(true);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// ignore: avoid_print
|
debugPrint(err.toString());
|
||||||
print(err.toString());
|
|
||||||
cancel();
|
cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ static void my_application_activate(GApplication* application) {
|
|||||||
|
|
||||||
// auto bdw = bitsdojo_window_from(window); // <--- add this line
|
// auto bdw = bitsdojo_window_from(window); // <--- add this line
|
||||||
// bdw->setCustomFrame(true); // <-- add this line
|
// bdw->setCustomFrame(true); // <-- add this line
|
||||||
gtk_window_set_default_size(window, 1280, 720); // <-- comment this line
|
gtk_window_set_default_size(window, 800, 600); // <-- comment this line
|
||||||
gtk_widget_show(GTK_WIDGET(window));
|
gtk_widget_show(GTK_WIDGET(window));
|
||||||
|
|
||||||
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
||||||
|
@ -52,7 +52,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||||||
|
|
||||||
FlutterWindow window(project);
|
FlutterWindow window(project);
|
||||||
Win32Window::Point origin(10, 10);
|
Win32Window::Point origin(10, 10);
|
||||||
Win32Window::Size size(1280, 720);
|
Win32Window::Size size(800, 600);
|
||||||
if (!window.CreateAndShow(L"flutter_hbb", origin, size))
|
if (!window.CreateAndShow(L"flutter_hbb", origin, size))
|
||||||
{
|
{
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user