Skip to content

Commit

Permalink
More fluent combo box fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alesimula committed Jun 30, 2023
1 parent 5e9faa9 commit 08cc57d
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions lib/widget/fluent_combo_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -293,21 +293,13 @@ class _ComboboxMenuState<T> extends State<_ComboboxMenu<T>> {
child: DefaultTextStyle(
style: route.style,
child: ScrollConfiguration(
behavior: const _ComboboxScrollBehavior(),
behavior: const FluentScrollBehavior(),
child: DynMouseScroll(builder: (context, controller, physics) => PrimaryScrollController(
controller: widget.route.scrollController = controller,
child: LayoutBuilder(
builder:
(BuildContext context, BoxConstraints constraints) {
final double menuTotalHeight = widget.route.itemHeights
.reduce(
(double total, double height) => total + height);
final bool isScrollable =
_kListPadding.vertical + menuTotalHeight >
constraints.maxHeight;

builder: (BuildContext context, BoxConstraints constraints) {
return Scrollbar(
timeToFade: (isScrollable) ? const Duration(milliseconds: 600) : const Duration(days: 9007199254740991),
timeToFade: const Duration(milliseconds: 600),
controller: controller,
//sAlwaysShown: isScrollable,
child: ListView(
Expand Down

0 comments on commit 08cc57d

Please sign in to comment.