mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-01 18:43:22 +00:00
fix(desktop): resize sidebar menu regression (#6897)
This commit is contained in:
parent
7c24b6feb0
commit
0cf3ade332
@ -86,7 +86,7 @@ class HomeSettingBloc extends Bloc<HomeSettingEvent, HomeSettingState> {
|
||||
},
|
||||
editPanelResized: (_EditPanelResized e) {
|
||||
final newPosition =
|
||||
(e.offset + state.resizeStart).clamp(-50, 200).toDouble();
|
||||
(state.resizeStart + e.offset).clamp(0, 200).toDouble();
|
||||
if (state.resizeOffset != newPosition) {
|
||||
emit(state.copyWith(resizeOffset: newPosition));
|
||||
}
|
||||
|
||||
@ -14,10 +14,11 @@ class HomeLayout {
|
||||
HomeLayout(BuildContext context) {
|
||||
final homeSetting = context.read<HomeSettingBloc>().state;
|
||||
showEditPanel = homeSetting.panelContext != null;
|
||||
menuWidth = Sizes.sideBarWidth;
|
||||
menuWidth += homeSetting.resizeOffset;
|
||||
|
||||
menuWidth = max(menuWidth, HomeSizes.minimumSidebarWidth);
|
||||
menuWidth = max(
|
||||
HomeSizes.minimumSidebarWidth + homeSetting.resizeOffset,
|
||||
HomeSizes.minimumSidebarWidth,
|
||||
);
|
||||
|
||||
final screenWidthPx = context.widthPx;
|
||||
context
|
||||
|
||||
@ -57,8 +57,6 @@ class Sizes {
|
||||
static double get hit => 40 * hitScale;
|
||||
|
||||
static double get iconMed => 20;
|
||||
|
||||
static double get sideBarWidth => 250 * hitScale;
|
||||
}
|
||||
|
||||
class Corners {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user