Skip to content

Commit

Permalink
fix: window backgroud color (rustdesk#8155)
Browse files Browse the repository at this point in the history
Signed-off-by: fufesou <[email protected]>
  • Loading branch information
fufesou authored May 27, 2024
1 parent 0442f70 commit 9ce62dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions flutter/lib/consts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const String kKeyReverseMouseWheel = "reverse_mouse_wheel";
const String kEnvPortableExecutable = "RUSTDESK_APPNAME";

const Color kColorWarn = Color.fromARGB(255, 245, 133, 59);
const Color kColorCanvas = Colors.black;

const int kMobileDefaultDisplayWidth = 720;
const int kMobileDefaultDisplayHeight = 1280;
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/desktop/pages/remote_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class _RemotePageState extends State<RemotePage>
return Stack(
children: [
Container(
color: Colors.black,
color: kColorCanvas,
child: RawKeyFocusScope(
focusNode: _rawKeyFocusNode,
onFocusChange: (bool imageFocused) {
Expand Down
7 changes: 6 additions & 1 deletion flutter/lib/desktop/widgets/tabbar_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class DesktopTab extends StatelessWidget {

List<Widget> _tabWidgets = [];
Widget _buildPageView() {
return _buildBlock(
final child = _buildBlock(
child: Obx(() => PageView(
controller: state.value.pageController,
physics: NeverScrollableScrollPhysics(),
Expand All @@ -358,6 +358,11 @@ class DesktopTab extends StatelessWidget {
return newList;
}
}())));
if (tabType == DesktopTabType.remoteScreen) {
return Container(color: kColorCanvas, child: child);
} else {
return child;
}
}

/// Check whether to show ListView
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/mobile/pages/remote_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class _RemotePageState extends State<RemotePage> {
initialEntries: [
OverlayEntry(builder: (context) {
return Container(
color: Colors.black,
color: kColorCanvas,
child: isWebDesktop
? getBodyForDesktopWithListener(keyboard)
: SafeArea(
Expand Down

0 comments on commit 9ce62dc

Please sign in to comment.