Merge pull request #1325 from Kingtous/flutter_desktop
feat: can resize window when without title bar
This commit is contained in:
commit
968cff967e
@ -72,7 +72,9 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return SubWindowDragToResizeArea(
|
||||||
|
windowId: windowId(),
|
||||||
|
child: Scaffold(
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
Obx(() => Visibility(
|
Obx(() => Visibility(
|
||||||
@ -101,6 +103,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
|||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import 'package:flutter_hbb/desktop/pages/desktop_home_page.dart';
|
|||||||
import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart';
|
import 'package:flutter_hbb/desktop/pages/desktop_setting_page.dart';
|
||||||
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
|
import 'package:flutter_hbb/desktop/widgets/tabbar_widget.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:window_manager/window_manager.dart';
|
||||||
|
|
||||||
class DesktopTabPage extends StatefulWidget {
|
class DesktopTabPage extends StatefulWidget {
|
||||||
const DesktopTabPage({Key? key}) : super(key: key);
|
const DesktopTabPage({Key? key}) : super(key: key);
|
||||||
@ -30,7 +31,8 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return DragToResizeArea(
|
||||||
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: MyTheme.color(context).border!)),
|
border: Border.all(color: MyTheme.color(context).border!)),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
@ -60,6 +62,7 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,9 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return SubWindowDragToResizeArea(
|
||||||
|
windowId: windowId(),
|
||||||
|
child: Scaffold(
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
DesktopTabBar(
|
DesktopTabBar(
|
||||||
@ -84,12 +86,14 @@ class _FileManagerTabPageState extends State<FileManagerTabPage> {
|
|||||||
children: tabs
|
children: tabs
|
||||||
.map((tab) => FileManagerPage(
|
.map((tab) => FileManagerPage(
|
||||||
key: ValueKey(tab.label),
|
key: ValueKey(tab.label),
|
||||||
id: tab.label)) //RemotePage(key: ValueKey(e), id: e))
|
id: tab
|
||||||
|
.label)) //RemotePage(key: ValueKey(e), id: e))
|
||||||
.toList()),
|
.toList()),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,8 +252,8 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "6e6b6f557f655e9c985007d754b6282a0e524932"
|
ref: e013c81d75320bbf28adddeaadf462264ee6039d
|
||||||
resolved-ref: "6e6b6f557f655e9c985007d754b6282a0e524932"
|
resolved-ref: e013c81d75320bbf28adddeaadf462264ee6039d
|
||||||
url: "https://github.com/Kingtous/rustdesk_desktop_multi_window"
|
url: "https://github.com/Kingtous/rustdesk_desktop_multi_window"
|
||||||
source: git
|
source: git
|
||||||
version: "0.1.0"
|
version: "0.1.0"
|
||||||
@ -1230,8 +1230,8 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "75a6c813babca461f359a586785d797f7806e390"
|
ref: f1d69e5d0531af947373ec26ae22808f08b1aac6
|
||||||
resolved-ref: "75a6c813babca461f359a586785d797f7806e390"
|
resolved-ref: f1d69e5d0531af947373ec26ae22808f08b1aac6
|
||||||
url: "https://github.com/Kingtous/rustdesk_window_manager"
|
url: "https://github.com/Kingtous/rustdesk_window_manager"
|
||||||
source: git
|
source: git
|
||||||
version: "0.2.5"
|
version: "0.2.5"
|
||||||
|
@ -61,12 +61,11 @@ dependencies:
|
|||||||
window_manager:
|
window_manager:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_window_manager
|
url: https://github.com/Kingtous/rustdesk_window_manager
|
||||||
ref: 75a6c813babca461f359a586785d797f7806e390
|
ref: f1d69e5d0531af947373ec26ae22808f08b1aac6
|
||||||
desktop_multi_window:
|
desktop_multi_window:
|
||||||
# path: ../../rustdesk_desktop_multi_window
|
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
url: https://github.com/Kingtous/rustdesk_desktop_multi_window
|
||||||
ref: 6e6b6f557f655e9c985007d754b6282a0e524932
|
ref: e013c81d75320bbf28adddeaadf462264ee6039d
|
||||||
freezed_annotation: ^2.0.3
|
freezed_annotation: ^2.0.3
|
||||||
tray_manager:
|
tray_manager:
|
||||||
git:
|
git:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user