mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: the cursor will jump up when creating a new document on desktop. (#5269)
* fix: the cursor will jump up when creating a new document on desktop * fix: the titlbar flashes when switching to another page * fix: unit test * fix: default font family copy
This commit is contained in:
@ -89,7 +89,7 @@ class _DocumentCoverWidgetState extends State<DocumentCoverWidget> {
|
||||
bool get hasIcon => viewIcon.isNotEmpty;
|
||||
bool get hasCover =>
|
||||
coverType != CoverType.none ||
|
||||
cover?.type != PageStyleCoverImageType.none;
|
||||
(cover != null && cover?.type != PageStyleCoverImageType.none);
|
||||
|
||||
String viewIcon = '';
|
||||
PageStyleCover? cover;
|
||||
|
@ -18,7 +18,7 @@ enum OpenAIRequestType {
|
||||
case OpenAIRequestType.textCompletion:
|
||||
return Uri.parse('https://api.openai.com/v1/completions');
|
||||
case OpenAIRequestType.textEdit:
|
||||
return Uri.parse('https://api.openai.com/v1/v1/chat/completions');
|
||||
return Uri.parse('https://api.openai.com/v1/chat/completions');
|
||||
case OpenAIRequestType.imageGenerations:
|
||||
return Uri.parse('https://api.openai.com/v1/images/generations');
|
||||
}
|
||||
|
@ -163,6 +163,11 @@ class _FontButton extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return BlocBuilder<DocumentPageStyleBloc, DocumentPageStyleState>(
|
||||
builder: (context, state) {
|
||||
String fontFamily = state.fontFamily ?? builtInFontFamily();
|
||||
if (fontFamily == builtInFontFamily()) {
|
||||
fontFamily =
|
||||
LocaleKeys.settings_appearance_fontFamily_defaultFont.tr();
|
||||
}
|
||||
return GestureDetector(
|
||||
onTap: () => _showFontSelector(context),
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@ -177,7 +182,7 @@ class _FontButton extends StatelessWidget {
|
||||
const HSpace(16.0),
|
||||
FlowyText(LocaleKeys.titleBar_font.tr()),
|
||||
const Spacer(),
|
||||
FlowyText(state.fontFamily ?? builtInFontFamily()),
|
||||
FlowyText(fontFamily),
|
||||
const HSpace(6.0),
|
||||
const FlowySvg(FlowySvgs.m_page_style_arrow_right_s),
|
||||
const HSpace(12.0),
|
||||
|
Reference in New Issue
Block a user