Support for menu-based zooming on non-touch screens#478
Open
amusergrieve wants to merge 1 commit intoGrapheneOS:mainfrom
Open
Support for menu-based zooming on non-touch screens#478amusergrieve wants to merge 1 commit intoGrapheneOS:mainfrom
amusergrieve wants to merge 1 commit intoGrapheneOS:mainfrom
Conversation
fbe15bf to
99736fc
Compare
ggtlvkma356
reviewed
Mar 13, 2026
There was a problem hiding this comment.
Better use Material Icons like the rest.
ggtlvkma356
reviewed
Mar 13, 2026
| import kotlin.math.ln | ||
| import kotlin.math.pow | ||
|
|
||
| class SetZoomFragment( |
There was a problem hiding this comment.
Fragments need to have a default constructor.
ggtlvkma356
reviewed
Mar 13, 2026
| import android.content.DialogInterface | ||
| import android.os.Bundle | ||
| import android.view.Gravity | ||
| import android.widget.FrameLayout |
ggtlvkma356
reviewed
Mar 13, 2026
| private val mZoomLevelText: TextView by lazy { TextView(requireActivity()) } | ||
|
|
||
| private var mZoomFocusX: Float = 0.0f | ||
| public fun setZoomFocusX(value: Float) {mZoomFocusX = value} |
There was a problem hiding this comment.
Shall use Kotlin properties which have getters and setters.
ggtlvkma356
reviewed
Mar 13, 2026
|
|
||
| override fun onSaveInstanceState(outState: Bundle) { | ||
| outState.putInt(STATE_SEEKBAR_CUR, mSeekBar.progress) | ||
| outState.putInt(STATE_SEEKBAR_MIN, mSeekBar.min) |
There was a problem hiding this comment.
mSeekBar.min is aways 0 and mSeekBar.max is always SEEKBAR_RESOLUTION.
ggtlvkma356
reviewed
Mar 13, 2026
| } | ||
|
|
||
| private void zoom(float scaleFactor, float focusX, float focusY, boolean end) { | ||
| public void onZoomPage(float scaleFactor, float focusX, float focusY, boolean end) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using this on desktop mode has been painful for the eyes, because there is no zooming. This PR adds a menu item that allows zooming with a slider.