mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-11-12 08:27:58 +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) {
|
editPanelResized: (_EditPanelResized e) {
|
||||||
final newPosition =
|
final newPosition =
|
||||||
(e.offset + state.resizeStart).clamp(-50, 200).toDouble();
|
(state.resizeStart + e.offset).clamp(0, 200).toDouble();
|
||||||
if (state.resizeOffset != newPosition) {
|
if (state.resizeOffset != newPosition) {
|
||||||
emit(state.copyWith(resizeOffset: newPosition));
|
emit(state.copyWith(resizeOffset: newPosition));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,10 +14,11 @@ class HomeLayout {
|
|||||||
HomeLayout(BuildContext context) {
|
HomeLayout(BuildContext context) {
|
||||||
final homeSetting = context.read<HomeSettingBloc>().state;
|
final homeSetting = context.read<HomeSettingBloc>().state;
|
||||||
showEditPanel = homeSetting.panelContext != null;
|
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;
|
final screenWidthPx = context.widthPx;
|
||||||
context
|
context
|
||||||
|
|||||||
@ -57,8 +57,6 @@ class Sizes {
|
|||||||
static double get hit => 40 * hitScale;
|
static double get hit => 40 * hitScale;
|
||||||
|
|
||||||
static double get iconMed => 20;
|
static double get iconMed => 20;
|
||||||
|
|
||||||
static double get sideBarWidth => 250 * hitScale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Corners {
|
class Corners {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user