mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
improve ui
This commit is contained in:
@@ -296,7 +296,7 @@ class _FilledTabBarState extends State<FilledTabBar> {
|
||||
padding: tabPadding,
|
||||
radius: tabRadius,
|
||||
);
|
||||
if (old != null) {
|
||||
if (old != null && old.offsets != null && old.itemHeight != null) {
|
||||
painter!.update(old.offsets!, old.itemHeight!);
|
||||
}
|
||||
}
|
||||
|
@@ -262,6 +262,8 @@ class ContentDialog extends StatelessWidget {
|
||||
insetPadding: context.width < 400
|
||||
? const EdgeInsets.symmetric(horizontal: 4)
|
||||
: const EdgeInsets.symmetric(horizontal: 16),
|
||||
elevation: 2,
|
||||
shadowColor: context.colorScheme.shadow,
|
||||
child: IntrinsicWidth(
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(
|
||||
|
@@ -127,15 +127,15 @@ class _NaviPaneState extends State<NaviPane>
|
||||
}
|
||||
if (target == 1) {
|
||||
StateController.find<NaviPaddingWidgetController>()
|
||||
.setWithPadding(true, true);
|
||||
.setWithPadding(true, true, true);
|
||||
controller.value = target;
|
||||
} else if (controller.value == 1 && target == 0) {
|
||||
StateController.findOrNull<NaviPaddingWidgetController>()
|
||||
?.setWithPadding(false, false);
|
||||
?.setWithPadding(false, false, false);
|
||||
controller.value = target;
|
||||
} else {
|
||||
StateController.findOrNull<NaviPaddingWidgetController>()
|
||||
?.setWithPadding(true, false);
|
||||
?.setWithPadding(true, false, false);
|
||||
controller.animateTo(target);
|
||||
}
|
||||
animationTarget = target;
|
||||
@@ -660,9 +660,13 @@ class NaviPaddingWidgetController extends StateController {
|
||||
|
||||
bool _withTopBarPadding = false;
|
||||
|
||||
void setWithPadding(bool withPadding, bool withAppbarPadding) {
|
||||
bool _withBottomBarPadding = false;
|
||||
|
||||
void setWithPadding(
|
||||
bool withPadding, bool withAppbarPadding, bool withBottomBarPadding) {
|
||||
_withPadding = withPadding;
|
||||
_withTopBarPadding = withAppbarPadding;
|
||||
_withBottomBarPadding = withBottomBarPadding;
|
||||
update();
|
||||
}
|
||||
}
|
||||
@@ -683,8 +687,10 @@ class NaviPaddingWidget extends StatelessWidget {
|
||||
(controller._withTopBarPadding
|
||||
? _NaviPaneState._kTopBarHeight
|
||||
: 0),
|
||||
bottom:
|
||||
_NaviPaneState._kBottomBarHeight + context.padding.bottom,
|
||||
bottom: context.padding.bottom +
|
||||
(controller._withBottomBarPadding
|
||||
? _NaviPaneState._kBottomBarHeight
|
||||
: 0),
|
||||
)
|
||||
: EdgeInsets.zero,
|
||||
child: child,
|
||||
|
@@ -55,7 +55,7 @@ class _SmoothScrollProviderState extends State<SmoothScrollProvider> {
|
||||
return widget.builder(
|
||||
context,
|
||||
_controller,
|
||||
const ClampingScrollPhysics(),
|
||||
const BouncingScrollPhysics(),
|
||||
);
|
||||
}
|
||||
return Listener(
|
||||
@@ -93,7 +93,7 @@ class _SmoothScrollProviderState extends State<SmoothScrollProvider> {
|
||||
_controller,
|
||||
_isMouseScroll
|
||||
? const NeverScrollableScrollPhysics()
|
||||
: const ClampingScrollPhysics(),
|
||||
: const BouncingScrollPhysics(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user