Skip to content

WIP: Improving view mode and rendering #2566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

harshad1
Copy link
Collaborator

@harshad1 harshad1 commented Apr 20, 2025

  • Can now set view mode font size in view mode
  • Much faster todo text highlighting
  • Getting AppSettings with a proper context where ever possible (using applicationContext will cause theme to resolve incorrectly)
  • Moved case change to an action
  • Properly close the keyboard when changing to file browser

}

@Override
public void onFsViewerNeutralButtonPressed(File currentFolder) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Select folder

@gsantner gsantner added this to the Markor v2.15 milestone May 9, 2025
@@ -76,6 +76,8 @@ public class DocumentEditAndViewFragment extends MarkorBaseFragment implements F
public static final String SAVESTATE_DOCUMENT = "DOCUMENT";
public static final String START_PREVIEW = "START_PREVIEW";

public static float VIEW_FONT_SCALE = 100f / 15.7f;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Do you see that scale still fitting quite good?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. But I do all my testing just my own primary device - a pixel 7 pro

}

@Override
public void generateSpans() {

super.generateSpans();
// Single span for the whole text - highly performant
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single span for the whole file.

Much faster! Much less highlighting jank!

@harshad1 harshad1 changed the title WIP: Improving view mode options WIP: Improving view mode and rendering May 25, 2025
@@ -30,15 +30,15 @@ public static ApplicationObject get() {
return _app;
}

public static AppSettings settings() {
public static AppSettings backupSettings() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making it clear that these settings are to be used as a last resort

@Override
public AppSettings init(final Context context) {
super.init(context);
public static AppSettings get(final Context context) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the new way of getting context

It falls back to try to do what is most correct

@@ -63,19 +66,9 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
}
}

protected void onPreCreate(@Nullable Bundle savedInstanceState) {
Copy link
Collaborator Author

@harshad1 harshad1 May 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just moved to onCreate()

Children ought to call super.onCreate() first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants