mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-07 00:11:28 +03:00
backgroundcolor migration
This commit is contained in:
@@ -164,7 +164,7 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
width: 320 + 20 * 2,
|
||||
padding: const EdgeInsets.fromLTRB(20, 24, 20, 22),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(13)),
|
||||
),
|
||||
child: Ink(
|
||||
|
||||
@@ -71,7 +71,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
value: gFFI.serverModel,
|
||||
child: Container(
|
||||
width: 200,
|
||||
color: Theme.of(context).backgroundColor,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
child: DesktopScrollWrapper(
|
||||
scrollController: _leftPaneScrollController,
|
||||
child: SingleChildScrollView(
|
||||
@@ -185,7 +185,7 @@ class _DesktopHomePageState extends State<DesktopHomePage>
|
||||
radius: 15,
|
||||
backgroundColor: hover.value
|
||||
? Theme.of(context).scaffoldBackgroundColor
|
||||
: Theme.of(context).backgroundColor,
|
||||
: Theme.of(context).colorScheme.background,
|
||||
child: Icon(
|
||||
Icons.more_vert_outlined,
|
||||
size: 20,
|
||||
|
||||
@@ -108,7 +108,7 @@ class _DesktopSettingPageState extends State<DesktopSettingPage>
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
return Scaffold(
|
||||
backgroundColor: Theme.of(context).backgroundColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
body: Row(
|
||||
children: <Widget>[
|
||||
SizedBox(
|
||||
|
||||
@@ -65,7 +65,7 @@ class _DesktopTabPageState extends State<DesktopTabPage> {
|
||||
Widget build(BuildContext context) {
|
||||
final tabWidget = Container(
|
||||
child: Scaffold(
|
||||
backgroundColor: Theme.of(context).backgroundColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
body: DesktopTab(
|
||||
controller: tabController,
|
||||
tail: ActionIcon(
|
||||
|
||||
@@ -91,7 +91,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
Flexible(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
border: Border.all(width: 1, color: MyTheme.border)),
|
||||
child:
|
||||
widget.isRDP ? buildRdp(context) : buildTunnel(context),
|
||||
@@ -134,7 +134,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
|
||||
return Theme(
|
||||
data: Theme.of(context)
|
||||
.copyWith(backgroundColor: Theme.of(context).backgroundColor),
|
||||
.copyWith(backgroundColor: Theme.of(context).colorScheme.background),
|
||||
child: Obx(() => ListView.builder(
|
||||
controller: ScrollController(),
|
||||
itemCount: pfs.length + 2,
|
||||
@@ -169,7 +169,8 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
|
||||
return Container(
|
||||
height: _kRowHeight,
|
||||
decoration: BoxDecoration(color: Theme.of(context).backgroundColor),
|
||||
decoration:
|
||||
BoxDecoration(color: Theme.of(context).colorScheme.background),
|
||||
child: Row(children: [
|
||||
buildTunnelInputCell(context,
|
||||
controller: localPortController,
|
||||
@@ -229,7 +230,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
borderSide: BorderSide(color: MyTheme.color(context).border!)),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderSide: BorderSide(color: MyTheme.color(context).border!)),
|
||||
fillColor: Theme.of(context).backgroundColor,
|
||||
fillColor: Theme.of(context).colorScheme.background,
|
||||
contentPadding: const EdgeInsets.all(10),
|
||||
hintText: hint,
|
||||
hintStyle:
|
||||
@@ -251,7 +252,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
? MyTheme.currentThemeMode() == ThemeMode.dark
|
||||
? const Color(0xFF202020)
|
||||
: const Color(0xFFF4F5F6)
|
||||
: Theme.of(context).backgroundColor),
|
||||
: Theme.of(context).colorScheme.background),
|
||||
child: Row(children: [
|
||||
text(pf.localPort.toString()),
|
||||
const SizedBox(width: _kColumn1Width),
|
||||
@@ -293,7 +294,7 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
).marginOnly(left: _kTextLeftMargin));
|
||||
return Theme(
|
||||
data: Theme.of(context)
|
||||
.copyWith(backgroundColor: Theme.of(context).backgroundColor),
|
||||
.copyWith(backgroundColor: Theme.of(context).colorScheme.background),
|
||||
child: ListView.builder(
|
||||
controller: ScrollController(),
|
||||
itemCount: 2,
|
||||
@@ -312,8 +313,8 @@ class _PortForwardPageState extends State<PortForwardPage>
|
||||
} else {
|
||||
return Container(
|
||||
height: _kRowHeight,
|
||||
decoration:
|
||||
BoxDecoration(color: Theme.of(context).backgroundColor),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.background),
|
||||
child: Row(children: [
|
||||
Expanded(
|
||||
child: Align(
|
||||
|
||||
@@ -96,7 +96,7 @@ class _PortForwardTabPageState extends State<PortForwardTabPage> {
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: MyTheme.color(context).border!)),
|
||||
child: Scaffold(
|
||||
backgroundColor: Theme.of(context).backgroundColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
body: DesktopTab(
|
||||
controller: tabController,
|
||||
onWindowCloseButton: () async {
|
||||
|
||||
@@ -225,7 +225,7 @@ class _RemotePageState extends State<RemotePage>
|
||||
|
||||
Widget buildBody(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Theme.of(context).backgroundColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
|
||||
/// the Overlay key will be set with _blockableOverlayState in BlockableOverlay
|
||||
/// see override build() in [BlockableOverlay]
|
||||
|
||||
@@ -141,7 +141,7 @@ class _ConnectionTabPageState extends State<ConnectionTabPage> {
|
||||
width: stateGlobal.windowBorderWidth.value),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Theme.of(context).backgroundColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
body: DesktopTab(
|
||||
controller: tabController,
|
||||
onWindowCloseButton: handleWindowCloseButton,
|
||||
|
||||
@@ -49,10 +49,7 @@ class _DesktopServerPageState extends State<DesktopServerPage>
|
||||
|
||||
@override
|
||||
void onWindowClose() {
|
||||
Future.wait([
|
||||
gFFI.serverModel.closeAll(),
|
||||
gFFI.close()
|
||||
]).then((_) {
|
||||
Future.wait([gFFI.serverModel.closeAll(), gFFI.close()]).then((_) {
|
||||
if (Platform.isMacOS) {
|
||||
RdPlatformChannel.instance.terminate();
|
||||
} else {
|
||||
@@ -82,7 +79,7 @@ class _DesktopServerPageState extends State<DesktopServerPage>
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: MyTheme.color(context).border!)),
|
||||
child: Scaffold(
|
||||
backgroundColor: Theme.of(context).backgroundColor,
|
||||
backgroundColor: Theme.of(context).colorScheme.background,
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
@@ -189,7 +186,7 @@ class ConnectionManagerState extends State<ConnectionManager> {
|
||||
windowManager.startDragging();
|
||||
},
|
||||
child: Container(
|
||||
color: Theme.of(context).backgroundColor,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user