Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dodo/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, a: app.Dodo, mode: str='', msg: Optional[dict]=None, parent:
self.mode = mode
self.msg = msg
self.message_view = QWebEngineView()
self.message_view.setZoomFactor(1.2)
self.message_view.setZoomFactor(settings.message_zoom)
self.layout().addWidget(self.message_view)
self.status = f'<i style="color:{settings.theme["fg"]}">draft</i>'
self.current_account = 0
Expand Down
11 changes: 11 additions & 0 deletions dodo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,17 @@
message_font_size = 12
"""The font size used for plaintext messages"""

message_zoom = 1.2
"""Zoom factor for the message and compose web views

QWebEngineView renders CSS ``pt`` sizes larger than QFont uses for the same
point value in native Qt widgets (QTreeView, etc.), particularly on macOS
Retina displays. This means the message body appears bigger than the thread
list and header panels even when the configured font sizes match. Adjust
this factor to compensate — values below 1.0 shrink the web view to better
match the surrounding Qt widgets.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

issue: most of this isn't relevant for documenting a config knob.

The user doesn't care about QTreeView vs QWebEngineView, they just want to know what will change when they turn this knob in a given direction — that would be the last sentence, except for web view being an implementation detail. You might want to mention instead that this is useful for HTML payloads since they don't necessarily take message_font_size into account.

"""

search_view_padding = 1
"""A bit of spacing around each line in the search panel"""

Expand Down
2 changes: 1 addition & 1 deletion dodo/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def __init__(self, a: app.Dodo, thread_id: str, search_query: str, parent: Optio
self.message_view = QWebEngineView(self)
page = MessagePage(self.app, self.message_profile, self.message_view)
self.message_view.setPage(page)
self.message_view.setZoomFactor(1.2)
self.message_view.setZoomFactor(settings.message_zoom)

self.layout_panel()

Expand Down