Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rustdesk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李朝发
rustdesk
Commits
3101c4e1
Commit
3101c4e1
authored
Sep 20, 2022
by
rustdesk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix formatId, right panel button style, default windows size (windows,
Linux, no idea about Mac, need to check with xcode)
parent
13fe2164
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
33 deletions
+40
-33
common.dart
flutter/lib/common.dart
+4
-2
id_formatter.dart
flutter/lib/common/formatter/id_formatter.dart
+1
-0
connection_page.dart
flutter/lib/desktop/pages/connection_page.dart
+29
-24
desktop_home_page.dart
flutter/lib/desktop/pages/desktop_home_page.dart
+4
-5
my_application.cc
flutter/linux/my_application.cc
+1
-1
main.cpp
flutter/windows/runner/main.cpp
+1
-1
No files found.
flutter/lib/common.dart
View file @
3101c4e1
...
@@ -760,8 +760,9 @@ class PermissionManager {
...
@@ -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 {
...
@@ -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"
)
{
...
...
flutter/lib/common/formatter/id_formatter.dart
View file @
3101c4e1
...
@@ -33,6 +33,7 @@ class IDTextInputFormatter extends TextInputFormatter {
...
@@ -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
;
...
...
flutter/lib/desktop/pages/connection_page.dart
View file @
3101c4e1
...
@@ -215,7 +215,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
...
@@ -215,7 +215,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
onConnect
(
isFileTransfer:
true
);
onConnect
(
isFileTransfer:
true
);
},
},
child:
Container
(
child:
Container
(
height:
2
4
,
height:
2
7
,
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> {
...
@@ -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
),
)),
),
),
),
),
],
],
...
...
flutter/lib/desktop/pages/desktop_home_page.dart
View file @
3101c4e1
...
@@ -290,7 +290,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
...
@@ -290,7 +290,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
@override
@override
void
onTrayMenuItemClick
(
MenuItem
menuItem
)
{
void
onTrayMenuItemClick
(
MenuItem
menuItem
)
{
p
rint
(
'click
${menuItem.key}
'
);
debugP
rint
(
'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>
...
@@ -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
{
p
rint
(
debugP
rint
(
"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 {
...
@@ -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
;
}
}
...
...
flutter/linux/my_application.cc
View file @
3101c4e1
...
@@ -51,7 +51,7 @@ static void my_application_activate(GApplication* application) {
...
@@ -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
,
72
0
);
// <-- comment this line
gtk_window_set_default_size
(
window
,
800
,
60
0
);
// <-- 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
();
...
...
flutter/windows/runner/main.cpp
View file @
3101c4e1
...
@@ -52,7 +52,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
...
@@ -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
,
72
0
);
Win32Window
::
Size
size
(
800
,
60
0
);
if
(
!
window
.
CreateAndShow
(
L"flutter_hbb"
,
origin
,
size
))
if
(
!
window
.
CreateAndShow
(
L"flutter_hbb"
,
origin
,
size
))
{
{
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment