Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12c0ea2c authored by Candice Lo's avatar Candice Lo
Browse files

Provides text preview whenever the seekbar progress changes

When the font scale is modified by the icon buttons, we also like to show
the preview of text first to avoid the feeling of lag for users to wait
for the system font size change.

Bug: 279525588
Test: manually - attach the video to the bug
Change-Id: I8da85eb9b264f331c4347a87e2107d52872f4274
parent c2261f46
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -107,13 +107,13 @@ class FontScalingDialog(
                var isTrackingTouch = false

                override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
                    // Always provide preview configuration for text first when there is a change
                    // in the seekbar progress.
                    createTextPreview(progress)

                    if (!isTrackingTouch) {
                        // The seekbar progress is changed by icon buttons
                        changeFontSize(progress, CHANGE_BY_BUTTON_DELAY_MS)
                    } else {
                        // Provide preview configuration for text instead of changing the system
                        // font scale before users release their finger from the seekbar.
                        createTextPreview(progress)
                    }
                }