mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 04:46:56 +00:00
[GH-ISSUE #2280] [FR] Add Options to scale app text #945
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#945
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AmanNegi on GitHub (Apr 17, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2280
Feature Information
Since I have been using
AppFlowythis is an issue I have been facing, i.e the text is too small and there's no option to scale it either. While, there is an option to scale the in document text there's no option to scale the complete app text altogether.Technical Approach
text.dartto centralize the use of text widgets in the application. However, it contains only three styles{regular, semibold, medium}which does not suffices the use cases through out the app.text.dartthroughout the project, the places where we use it we completely override the properties, like:Textwidget directly and provide thefontSize: doubleas hard coded value.Solution
appearance.dartwe define the font sizes and also save it to device. The settings set inappearance.dartshould be used globally throughout the application, to set the font size. Like:Impact
Users which like to scale the App Features excluding the Editing Area, will now be able to change it and view it according to their comfort.
Additional Context
No response
@AmanNegi commented on GitHub (Apr 17, 2023):
@annieappflowy Let me know if this seems valid, I would love to work on this task 😄
@annieappflowy commented on GitHub (Apr 17, 2023):
@LucasXu0 , please review
@LucasXu0 commented on GitHub (Apr 18, 2023):
@AmanNegi, would it look odd if we only scale the text and not the icon, resulting in the text being big but the icon remaining small? Is there any approach to scale the whole material app?
@Xazin commented on GitHub (Apr 18, 2023):
We can use
MediaQuery.of(context).textScaleFactorinsideFlowySvgitself.And if we wrap the application with a
MediaQuery, below MaterialApp I'd assume, we can do something like this:Then we just need to have hotkeys to up/down the uiScaleFactor and in the settings menu as well. We also need to have some constraints, eg.
scaleFactor > 0.5 && scaleFactor < 2.0or something.Edit: I'll have to make a POC to actually test the above, I'm not sure if the MediaQuery widget actually does affect
Textwidgets globally, if not then my solution is not that good.@AmanNegi commented on GitHub (Apr 19, 2023):
Rightly said @LucasXu0 the icons should also be scaled alongside text. Currently, the
FlowySvgis used in some places, we can simply define and use thefontScaleproperty to scale the icons as well. For example:FlowySvgitself as it resides in a different package and can not access theAppearanceSettingsCubit.@LucasXu0 commented on GitHub (Apr 19, 2023):
@AmanNegi, so, do you plan to refactor all the widget wrappers containing the
SVG widgetto have scalable sizes?@AmanNegi commented on GitHub (Apr 19, 2023):
Yes, as I can see the use of
SVGis not generalized in some places we are usingFlowySVGand in some places, we are using thesvgWidgetfunction. It would be nice to generalize these as well and provide the size according toscalewhile using theFlowySVG.So overall this issue will cover the following:
FlowyTextto have various text styles using theThemelike{bodySmall, bodyMedium, bodyLarge, ...}.FlowySVGfor icons, and ensuring that scale multiplier is used while setting size.@Twilightssuperb commented on GitHub (May 5, 2023):
What about
{bodyExtraSmall}? It could be useful and nice at older laptops with low screen resolution (<FullHD @ 15.6") and low PPI. At these devices even{boydSmall}looks big.@Xazin commented on GitHub (May 5, 2023):
Doesn't matter what the actual font sizes available are, because this whole feature allows users with devices that have either low or high resolution, to change the UI scale of the application itself. Meaning if a particular text is
bodySmall, and you choose to scale the whole application UI down, then you can go even lower in size.@annieappflowy commented on GitHub (May 22, 2024):
Supported cmd / ctrl +/- in the latest version (v0.5.8)