Merge pull request #1797 from Kingtous/master
fix: windows cm popup issue & close button color & multi window
This commit is contained in:
commit
90172c4f09
@ -171,6 +171,7 @@ class DesktopTabController {
|
|||||||
|
|
||||||
class TabThemeConf {
|
class TabThemeConf {
|
||||||
double iconSize;
|
double iconSize;
|
||||||
|
|
||||||
TabThemeConf({required this.iconSize});
|
TabThemeConf({required this.iconSize});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +200,7 @@ class DesktopTab extends StatelessWidget {
|
|||||||
final Color? unSelectedTabBackgroundColor;
|
final Color? unSelectedTabBackgroundColor;
|
||||||
|
|
||||||
final DesktopTabController controller;
|
final DesktopTabController controller;
|
||||||
|
|
||||||
Rx<DesktopTabState> get state => controller.state;
|
Rx<DesktopTabState> get state => controller.state;
|
||||||
final isMaximized = false.obs;
|
final isMaximized = false.obs;
|
||||||
final _scrollDebounce = Debouncer(delay: Duration(milliseconds: 50));
|
final _scrollDebounce = Debouncer(delay: Duration(milliseconds: 50));
|
||||||
@ -606,7 +608,8 @@ Future<bool> closeConfirmDialog() async {
|
|||||||
setState(() => confirm = v);
|
setState(() => confirm = v);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
]), // confirm checkbox
|
]),
|
||||||
|
// confirm checkbox
|
||||||
actions: [
|
actions: [
|
||||||
TextButton(onPressed: close, child: Text(translate("Cancel"))),
|
TextButton(onPressed: close, child: Text(translate("Cancel"))),
|
||||||
ElevatedButton(onPressed: submit, child: Text(translate("OK"))),
|
ElevatedButton(onPressed: submit, child: Text(translate("OK"))),
|
||||||
@ -864,13 +867,14 @@ class _CloseButton extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActionIcon extends StatelessWidget {
|
class ActionIcon extends StatefulWidget {
|
||||||
final String? message;
|
final String? message;
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
final Function() onTap;
|
final Function() onTap;
|
||||||
final bool isClose;
|
final bool isClose;
|
||||||
final double iconSize;
|
final double iconSize;
|
||||||
final double boxSize;
|
final double boxSize;
|
||||||
|
|
||||||
const ActionIcon(
|
const ActionIcon(
|
||||||
{Key? key,
|
{Key? key,
|
||||||
this.message,
|
this.message,
|
||||||
@ -881,31 +885,45 @@ class ActionIcon extends StatelessWidget {
|
|||||||
this.boxSize = _kTabBarHeight - 1})
|
this.boxSize = _kTabBarHeight - 1})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ActionIcon> createState() => _ActionIconState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ActionIconState extends State<ActionIcon> {
|
||||||
|
var hover = false.obs;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
hover.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
RxBool hover = false.obs;
|
return Tooltip(
|
||||||
return Obx(() => Tooltip(
|
message: widget.message != null ? translate(widget.message!) : "",
|
||||||
message: message != null ? translate(message!) : "",
|
|
||||||
waitDuration: const Duration(seconds: 1),
|
waitDuration: const Duration(seconds: 1),
|
||||||
child: InkWell(
|
child: Obx(
|
||||||
hoverColor: isClose
|
() => InkWell(
|
||||||
|
hoverColor: widget.isClose
|
||||||
? const Color.fromARGB(255, 196, 43, 28)
|
? const Color.fromARGB(255, 196, 43, 28)
|
||||||
: MyTheme.tabbar(context).hoverColor,
|
: MyTheme.tabbar(context).hoverColor,
|
||||||
onHover: (value) => hover.value = value,
|
onHover: (value) => hover.value = value,
|
||||||
onTap: onTap,
|
onTap: widget.onTap,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: boxSize,
|
height: widget.boxSize,
|
||||||
width: boxSize,
|
width: widget.boxSize,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
icon,
|
widget.icon,
|
||||||
color: hover.value && isClose
|
color: hover.value && widget.isClose
|
||||||
? Colors.white
|
? Colors.white
|
||||||
: MyTheme.tabbar(context).unSelectedIconColor,
|
: MyTheme.tabbar(context).unSelectedIconColor,
|
||||||
size: iconSize,
|
size: widget.iconSize,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ dependencies:
|
|||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
ref: 541f05f766c3f72984ff40b70dd3c7d061f2ce61
|
ref: cbc172f02cf3ac136c7503015037e9867e594150
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
tray_manager:
|
tray_manager:
|
||||||
git:
|
git:
|
||||||
|
@ -48,6 +48,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||||||
free_c_args(c_args, args_len);
|
free_c_args(c_args, args_len);
|
||||||
|
|
||||||
// uni links dispatch
|
// uni links dispatch
|
||||||
|
// only do uni links when dispatch a rustdesk links
|
||||||
|
if (!rust_args.empty() && rust_args.front().compare("rustdesk://") == 0) {
|
||||||
HWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"rustdesk");
|
HWND hwnd = ::FindWindow(L"FLUTTER_RUNNER_WIN32_WINDOW", L"rustdesk");
|
||||||
if (hwnd != NULL) {
|
if (hwnd != NULL) {
|
||||||
DispatchToUniLinksDesktop(hwnd);
|
DispatchToUniLinksDesktop(hwnd);
|
||||||
@ -56,7 +58,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||||||
::SetForegroundWindow(hwnd);
|
::SetForegroundWindow(hwnd);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Attach to console when present (e.g., 'flutter run') or create a
|
// Attach to console when present (e.g., 'flutter run') or create a
|
||||||
// new console when running with a debugger.
|
// new console when running with a debugger.
|
||||||
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent())
|
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user