feat: mobile UI improvement (#4172)

* chore: use 1.0 as default textScaler

* feat: mobile editor ui improvement
This commit is contained in:
Lucas.Xu 2023-12-19 22:31:23 +08:00 committed by GitHub
parent 44e48712a6
commit e7bdce0997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 4 deletions

View File

@ -127,6 +127,9 @@ class EditorStyleCustomizer {
), ),
), ),
textSpanDecorator: customizeAttributeDecorator, textSpanDecorator: customizeAttributeDecorator,
mobileDragHandleBallSize: const Size.square(12.0),
mobileDragHandleWidth: 2.0,
magnifierSize: const Size(144, 96),
); );
} }

View File

@ -168,7 +168,14 @@ class _ApplicationWidgetState extends State<ApplicationWidget> {
}, },
child: BlocBuilder<AppearanceSettingsCubit, AppearanceSettingsState>( child: BlocBuilder<AppearanceSettingsCubit, AppearanceSettingsState>(
builder: (context, state) => MaterialApp.router( builder: (context, state) => MaterialApp.router(
builder: overlayManagerBuilder(), builder: (context, child) => MediaQuery(
// use the 1.0 as the textScaleFactor to avoid the text size
// affected by the system setting.
data: MediaQuery.of(context).copyWith(
textScaler: const TextScaler.linear(1),
),
child: overlayManagerBuilder()(context, child),
),
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
theme: state.lightTheme, theme: state.lightTheme,
darkTheme: state.darkTheme, darkTheme: state.darkTheme,

View File

@ -53,8 +53,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: e6b1336 ref: "82f3baf"
resolved-ref: e6b1336041734b2858b1704f32236b2435ff5a74 resolved-ref: "82f3baf3f121277c5e235faa04687a7fc383b37d"
url: "https://github.com/AppFlowy-IO/appflowy-editor.git" url: "https://github.com/AppFlowy-IO/appflowy-editor.git"
source: git source: git
version: "2.1.0" version: "2.1.0"

View File

@ -161,7 +161,7 @@ dependency_overrides:
appflowy_editor: appflowy_editor:
git: git:
url: https://github.com/AppFlowy-IO/appflowy-editor.git url: https://github.com/AppFlowy-IO/appflowy-editor.git
ref: "e6b1336" ref: "82f3baf"
# The "flutter_lints" package below contains a set of recommended lints to # The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is # encourage good coding practices. The lint set provided by the package is