Skip to content

Commit

Permalink
Scale right hand toolbar according to DPI settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Elias Bonauer committed Jul 3, 2024
1 parent a70c548 commit 0e107dc
Showing 1 changed file with 4 additions and 5 deletions.
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"))

0 comments on commit 0e107dc

Please sign in to comment.