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

Scale right hand toolbar according to DPI settings #491

Merged
merged 1 commit into from
Jul 3, 2024
Merged
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
9 changes: 4 additions & 5 deletions mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@
ID_CONTEXT_MENU_ADD_ROT_BY_PACKAGE = wx.NewIdRef()
ID_CONTEXT_MENU_ADD_ROT_BY_NAME = wx.NewIdRef()


class KicadProvider:
"""KiCad implementation of the provider, see standalone_impl.py for the stub version."""

def get_pcbnew(self):
"""Get the pcbnew instance."""
return kicad_pcbnew


class JLCPCBTools(wx.Dialog):
"""JLCPCBTools main dialog."""

Expand Down Expand Up @@ -220,7 +222,7 @@ def __init__(self, parent, kicad_provider=KicadProvider()):
self,
wx.ID_ANY,
wx.DefaultPosition,
wx.Size(128, -1),
wx.Size(int(self.scale_factor * 128), -1),
wx.TB_VERTICAL | wx.TB_TEXT | wx.TB_NODIVIDER,
)

Expand Down Expand Up @@ -1130,7 +1132,4 @@ def __init__(self, event_destination):
def emit(self, record):
"""Marshal the event over to the main thread."""
msg = self.format(record)
wx.QueueEvent(self.event_destination, LogboxAppendEvent(
msg=f"{msg}\n"
)
)
wx.QueueEvent(self.event_destination, LogboxAppendEvent(msg=f"{msg}\n"))