mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: some list icons don't align with the paragraph (#5439)
This commit is contained in:
parent
526de2eb5c
commit
a1395cb54a
@ -26,7 +26,7 @@ CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
|
||||
CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
|
||||
CARGO_MAKE_CRATE_NAME = "dart-ffi"
|
||||
LIB_NAME = "dart_ffi"
|
||||
APPFLOWY_VERSION = "0.5.8"
|
||||
APPFLOWY_VERSION = "0.5.9"
|
||||
FLUTTER_DESKTOP_FEATURES = "dart"
|
||||
PRODUCT_NAME = "AppFlowy"
|
||||
MACOSX_DEPLOYMENT_TARGET = "11.0"
|
||||
|
@ -55,9 +55,8 @@ Map<String, BlockComponentBuilder> getEditorBuilderMap({
|
||||
configuration: configuration.copyWith(
|
||||
placeholderText: (_) => LocaleKeys.blockPlaceholders_todoList.tr(),
|
||||
),
|
||||
iconBuilder: PlatformExtension.isMobile
|
||||
? (_, node, onCheck) => TodoListIcon(node: node, onCheck: onCheck)
|
||||
: null,
|
||||
iconBuilder: (_, node, onCheck) =>
|
||||
TodoListIcon(node: node, onCheck: onCheck),
|
||||
toggleChildrenTriggers: [
|
||||
LogicalKeyboardKey.shift,
|
||||
LogicalKeyboardKey.shiftLeft,
|
||||
@ -68,18 +67,14 @@ Map<String, BlockComponentBuilder> getEditorBuilderMap({
|
||||
configuration: configuration.copyWith(
|
||||
placeholderText: (_) => LocaleKeys.blockPlaceholders_bulletList.tr(),
|
||||
),
|
||||
iconBuilder: PlatformExtension.isMobile
|
||||
? (_, node) => BulletedListIcon(node: node)
|
||||
: null,
|
||||
iconBuilder: (_, node) => BulletedListIcon(node: node),
|
||||
),
|
||||
NumberedListBlockKeys.type: NumberedListBlockComponentBuilder(
|
||||
configuration: configuration.copyWith(
|
||||
placeholderText: (_) => LocaleKeys.blockPlaceholders_numberList.tr(),
|
||||
),
|
||||
iconBuilder: PlatformExtension.isMobile
|
||||
? (_, node, textDirection) =>
|
||||
NumberedListIcon(node: node, textDirection: textDirection)
|
||||
: null,
|
||||
iconBuilder: (_, node, textDirection) =>
|
||||
NumberedListIcon(node: node, textDirection: textDirection),
|
||||
),
|
||||
QuoteBlockKeys.type: QuoteBlockComponentBuilder(
|
||||
configuration: configuration.copyWith(
|
||||
@ -169,7 +164,10 @@ Map<String, BlockComponentBuilder> getEditorBuilderMap({
|
||||
),
|
||||
),
|
||||
CalloutBlockKeys.type: CalloutBlockComponentBuilder(
|
||||
configuration: configuration,
|
||||
configuration: configuration.copyWith(
|
||||
textStyle: (_) => styleCustomizer.calloutBlockStyleBuilder(),
|
||||
placeholderTextStyle: (_) => styleCustomizer.calloutBlockStyleBuilder(),
|
||||
),
|
||||
defaultColor: calloutBGColor,
|
||||
),
|
||||
DividerBlockKeys.type: DividerBlockComponentBuilder(
|
||||
|
@ -37,7 +37,9 @@ class BulletedListIcon extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final iconPadding = context.read<DocumentPageStyleBloc>().state.iconPadding;
|
||||
final iconPadding = PlatformExtension.isMobile
|
||||
? context.read<DocumentPageStyleBloc>().state.iconPadding
|
||||
: 0.0;
|
||||
return Container(
|
||||
constraints: const BoxConstraints(
|
||||
minWidth: 22,
|
||||
|
@ -17,7 +17,9 @@ class TodoListIcon extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final iconPadding = context.read<DocumentPageStyleBloc>().state.iconPadding;
|
||||
final iconPadding = PlatformExtension.isMobile
|
||||
? context.read<DocumentPageStyleBloc>().state.iconPadding
|
||||
: 0.0;
|
||||
final checked = node.attributes[TodoListBlockKeys.checked] ?? false;
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:appflowy/core/helpers/url_launcher.dart';
|
||||
import 'package:appflowy/mobile/application/page_style/document_page_style_bloc.dart';
|
||||
import 'package:appflowy/plugins/document/application/document_appearance_cubit.dart';
|
||||
@ -60,6 +58,9 @@ class EditorStyleCustomizer {
|
||||
DefaultAppearanceSettings.getDefaultSelectionColor(context),
|
||||
defaultTextDirection: appearance.defaultTextDirection,
|
||||
textStyleConfiguration: TextStyleConfiguration(
|
||||
lineHeight: 1.2,
|
||||
applyHeightToFirstAscent: true,
|
||||
applyHeightToLastDescent: true,
|
||||
text: baseTextStyle(fontFamily).copyWith(
|
||||
fontSize: fontSize,
|
||||
color: afThemeExtension.onBackground,
|
||||
@ -80,7 +81,7 @@ class EditorStyleCustomizer {
|
||||
),
|
||||
code: GoogleFonts.robotoMono(
|
||||
textStyle: baseTextStyle(fontFamily).copyWith(
|
||||
fontSize: fontSize - 2,
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: Colors.red,
|
||||
backgroundColor: theme.colorScheme.inverseSurface.withOpacity(0.8),
|
||||
@ -105,7 +106,6 @@ class EditorStyleCustomizer {
|
||||
final textScaleFactor =
|
||||
context.read<AppearanceSettingsCubit>().state.textScaleFactor;
|
||||
final baseTextStyle = this.baseTextStyle(fontFamily);
|
||||
final codeFontSize = max(0.0, fontSize - 2);
|
||||
return EditorStyle.mobile(
|
||||
padding: padding,
|
||||
defaultTextDirection: defaultTextDirection,
|
||||
@ -127,7 +127,7 @@ class EditorStyleCustomizer {
|
||||
),
|
||||
code: GoogleFonts.robotoMono(
|
||||
textStyle: baseTextStyle.copyWith(
|
||||
fontSize: codeFontSize,
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.normal,
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.red,
|
||||
@ -183,6 +183,14 @@ class EditorStyleCustomizer {
|
||||
);
|
||||
}
|
||||
|
||||
TextStyle calloutBlockStyleBuilder() {
|
||||
final fontSize = context.read<DocumentAppearanceCubit>().state.fontSize;
|
||||
return baseTextStyle(null).copyWith(
|
||||
fontSize: fontSize,
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
TextStyle outlineBlockPlaceholderStyleBuilder() {
|
||||
final fontSize = context.read<DocumentAppearanceCubit>().state.fontSize;
|
||||
return TextStyle(
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:appflowy/generated/flowy_svgs.g.dart';
|
||||
import 'package:appflowy/generated/locale_keys.g.dart';
|
||||
import 'package:appflowy/startup/startup.dart';
|
||||
@ -242,6 +244,7 @@ class _WorkspaceInfo extends StatelessWidget {
|
||||
rightIcon: const HSpace(32.0),
|
||||
text: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// workspace name
|
||||
FlowyText.medium(
|
||||
@ -250,6 +253,7 @@ class _WorkspaceInfo extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
withTooltip: true,
|
||||
),
|
||||
if (Platform.isMacOS) const VSpace(2.0),
|
||||
// workspace members count
|
||||
FlowyText.regular(
|
||||
state.isLoading
|
||||
|
@ -19,6 +19,7 @@ const _darkShader3 = Color(0xFF363D49);
|
||||
const _darkShader5 = Color(0xFFBBC3CD);
|
||||
const _darkShader6 = Color(0xFFF2F2F2);
|
||||
const _darkMain1 = Color(0x19FFFFFF);
|
||||
const _darkMain2 = Color(0xFF00BCF0);
|
||||
const _darkInput = Color(0xFF282E3A);
|
||||
|
||||
class DefaultColorScheme extends FlowyColorScheme {
|
||||
@ -103,7 +104,7 @@ class DefaultColorScheme extends FlowyColorScheme {
|
||||
tint7: const Color(0x5900BD2A),
|
||||
tint8: const Color(0x80008890),
|
||||
tint9: const Color(0x4d0029FF),
|
||||
main1: _darkMain1,
|
||||
main1: _darkMain2,
|
||||
main2: const Color(0xFF00B7EA),
|
||||
shadow: const Color(0xFF0F131C),
|
||||
sidebarBg: const Color(0xFF232B38),
|
||||
@ -114,7 +115,7 @@ class DefaultColorScheme extends FlowyColorScheme {
|
||||
secondaryText: _darkShader5,
|
||||
input: _darkInput,
|
||||
hint: const Color(0xFF59647a),
|
||||
primary: _darkMain1,
|
||||
primary: _darkMain2,
|
||||
onPrimary: _darkShader1,
|
||||
hoverBG1: _darkMain1,
|
||||
hoverBG2: _darkMain1,
|
||||
|
@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 0.5.8
|
||||
version: 0.5.9
|
||||
|
||||
environment:
|
||||
flutter: ">=3.22.0"
|
||||
|
Loading…
Reference in New Issue
Block a user