Merge pull request #5812 from 21pages/desktop_single_scroll

desktop only one scrollbar
This commit is contained in:
RustDesk 2023-09-25 21:33:01 +08:00 committed by GitHub
commit 4e93ffb924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 27 deletions

View File

@ -146,7 +146,7 @@ class _PeerTabPageState extends State<PeerTabPage>
], ],
)), )),
), ),
), ).paddingOnly(right: isDesktop ? 12 : 0),
_createPeersView(), _createPeersView(),
], ],
); );

View File

@ -33,9 +33,6 @@ class _ConnectionPageState extends State<ConnectionPage>
/// Controller for the id input bar. /// Controller for the id input bar.
final _idController = IDTextEditingController(); final _idController = IDTextEditingController();
/// Nested scroll controller
final _scrollController = ScrollController();
Timer? _updateTimer; Timer? _updateTimer;
final RxBool _idInputFocused = false.obs; final RxBool _idInputFocused = false.obs;
@ -121,14 +118,8 @@ class _ConnectionPageState extends State<ConnectionPage>
return Column( return Column(
children: [ children: [
Expanded( Expanded(
child: DesktopScrollWrapper( child: Column(
scrollController: _scrollController, children: [
child: CustomScrollView(
controller: _scrollController,
physics: DraggableNeverScrollableScrollPhysics(),
slivers: [
SliverList(
delegate: SliverChildListDelegate([
Row( Row(
children: [ children: [
Flexible(child: _buildRemoteIDTextField(context)), Flexible(child: _buildRemoteIDTextField(context)),
@ -136,15 +127,9 @@ class _ConnectionPageState extends State<ConnectionPage>
).marginOnly(top: 22), ).marginOnly(top: 22),
SizedBox(height: 12), SizedBox(height: 12),
Divider().paddingOnly(right: 12), Divider().paddingOnly(right: 12),
])), Expanded(child: PeerTabPage()),
SliverFillRemaining(
hasScrollBody: true,
child: PeerTabPage().paddingOnly(right: 12.0),
)
], ],
).paddingOnly(left: 12.0), ).paddingOnly(left: 12.0)),
),
),
const Divider(height: 1), const Divider(height: 1),
buildStatus() buildStatus()
], ],