Skip to content
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

workaround for bug #565 #911

Closed
wants to merge 2 commits into from
Closed

Conversation

NightMachinery
Copy link
Contributor

This PR solves the two issues in [BUG] Bigger font sizes make menu text go off screen · Issue #565 · ahrm/sioyek.

  1. The scrollbar hiding the shortcuts.
  2. The height of the menu rows not adjusting to big font sizes:
image

The final result looks like this:
image

@ahrm
Copy link
Owner

ahrm commented Jan 14, 2024

Thanks :). I need to test these PRs on multiple operating systems before accepting them so it might take a while because currently I am a little busy.

@NightMachinery
Copy link
Contributor Author

Thanks, take your time. I do have more PRs lined up. :D
Something I noticed when editing the code; there is a pdf_viewer/pdf_view_opengl_widget.{cpp,h}. Is that file still used somewhere? Or is it just legacy stuff? There is a lot of code repeated between that file and main_widget.{h,cpp}, I think.

@ahrm
Copy link
Owner

ahrm commented Jan 15, 2024

Yes, it is absolutely used, it is the main view of the application. I don't think a lot of code is duplicated between those (can you provide an example). Maybe the thing you are referring is that there are many functions with similar names. But these functions in main_widget usually just simply call the corresponding functions in pdf_view_opengl_widget.

@NightMachinery
Copy link
Contributor Author

Yes, it is absolutely used, it is the main view of the application. I don't think a lot of code is duplicated between those (can you provide an example). Maybe the thing you are referring is that there are many functions with similar names. But these functions in main_widget usually just simply call the corresponding functions in pdf_view_opengl_widget.

For example, PdfViewOpenGLWidget::wheelEvent and MainWidget::wheelEvent. I have been editing MainWidget::wheelEvent to make it use a separate zoom inc factor, and so that shift+scrolling for horizontal scrolling works even when the horizontal lock is active. And my modifications work. I haven't touched the code in PdfViewOpenGLWidget::wheelEvent though, which made me think the code there never runs.

@ahrm
Copy link
Owner

ahrm commented Jan 15, 2024

The wheelEvent in pdf_view_opengl_widget handles the helper window case (the window that displays the portals, because it does not have a MainWidget to handle the wheelEvent). I agree that this may be not the cleanest way to implement this but the different wheelEvents both do serve a purpose.

@NightMachinery
Copy link
Contributor Author

Closing this as it's useless on dev (QT 6).

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

Successfully merging this pull request may close these issues.

2 participants