mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-04 20:21:35 +08:00
Merge pull request #4815 from dignow/refact/login_close_inkwell
replace close button to inkwell
This commit is contained in:
commit
a33c94a377
@ -506,31 +506,17 @@ Future<bool?> loginDialog() async {
|
||||
Text(
|
||||
translate('Login'),
|
||||
).marginOnly(top: MyTheme.dialogPadding),
|
||||
TextButton(
|
||||
style: ButtonStyle(
|
||||
overlayColor: MaterialStateProperty.resolveWith<Color?>(
|
||||
(Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.hovered)) {
|
||||
return Colors.red;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(
|
||||
EdgeInsets.all(5)),
|
||||
minimumSize: MaterialStateProperty.all(
|
||||
Size(0, 0),
|
||||
),
|
||||
shape: MaterialStateProperty.all(RoundedRectangleBorder(
|
||||
side: BorderSide.none,
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)))),
|
||||
),
|
||||
InkWell(
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
size: 22,
|
||||
color: Colors.black54,
|
||||
color: MyTheme.currentThemeMode() == ThemeMode.dark
|
||||
? Colors.white70
|
||||
: Colors.black54,
|
||||
),
|
||||
onPressed: onDialogCancel,
|
||||
onTap: onDialogCancel,
|
||||
hoverColor: Colors.red,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
).marginOnly(top: 5, right: 5),
|
||||
],
|
||||
);
|
||||
|
@ -310,7 +310,7 @@ pub struct TransferSerde {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn get_online_statue() -> i64 {
|
||||
pub fn get_online_state() -> i64 {
|
||||
*ONLINE.lock().unwrap().values().max().unwrap_or(&0)
|
||||
}
|
||||
|
||||
|
@ -685,7 +685,7 @@ pub fn main_get_connect_status() -> String {
|
||||
}
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
{
|
||||
let mut state = hbb_common::config::get_online_statue();
|
||||
let mut state = hbb_common::config::get_online_state();
|
||||
if state > 0 {
|
||||
state = 1;
|
||||
}
|
||||
|
@ -347,7 +347,7 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
}
|
||||
}
|
||||
Data::OnlineStatus(_) => {
|
||||
let x = config::get_online_statue();
|
||||
let x = config::get_online_state();
|
||||
let confirmed = Config::get_key_confirmed();
|
||||
allow_err!(stream.send(&Data::OnlineStatus(Some((x, confirmed)))).await);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user