improve ui zoom defaults
parent
a603f321b1
commit
cf97a70b2c
|
|
@ -102,12 +102,12 @@ class AggTrade(Struct, frozen=True):
|
||||||
a: int # Aggregate trade ID
|
a: int # Aggregate trade ID
|
||||||
p: float # Price
|
p: float # Price
|
||||||
q: float # Quantity with all the market trades
|
q: float # Quantity with all the market trades
|
||||||
nq: float # Normal quantity without the trades involving RPI orders
|
|
||||||
f: int # First trade ID
|
f: int # First trade ID
|
||||||
l: int # noqa Last trade ID
|
l: int # noqa Last trade ID
|
||||||
T: int # Trade time
|
T: int # Trade time
|
||||||
m: bool # Is the buyer the market maker?
|
m: bool # Is the buyer the market maker?
|
||||||
M: bool | None = None # Ignore
|
M: bool|None = None # Ignore
|
||||||
|
nq: float|None = None # Normal quantity without the trades involving RPI orders
|
||||||
|
|
||||||
|
|
||||||
async def stream_messages(
|
async def stream_messages(
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,7 @@ class CompleterView(QTreeView):
|
||||||
self.set_font_size(_font.px_size)
|
self.set_font_size(_font.px_size)
|
||||||
self.setIndentation(_font.px_size)
|
self.setIndentation(_font.px_size)
|
||||||
self.setFont(_font.font)
|
self.setFont(_font.font)
|
||||||
|
self.updateGeometry()
|
||||||
|
|
||||||
def resize_to_results(
|
def resize_to_results(
|
||||||
self,
|
self,
|
||||||
|
|
@ -657,6 +658,8 @@ class SearchWidget(QtWidgets.QWidget):
|
||||||
if hasattr(self.view, 'update_fonts'):
|
if hasattr(self.view, 'update_fonts'):
|
||||||
self.view.update_fonts()
|
self.view.update_fonts()
|
||||||
|
|
||||||
|
self.updateGeometry()
|
||||||
|
|
||||||
def focus(self) -> None:
|
def focus(self) -> None:
|
||||||
self.show()
|
self.show()
|
||||||
self.bar.focus()
|
self.bar.focus()
|
||||||
|
|
|
||||||
|
|
@ -95,12 +95,14 @@ class GlobalZoomEventFilter(QObject):
|
||||||
return True # consume event
|
return True # consume event
|
||||||
|
|
||||||
# Zoom out: Ctrl+Shift+Minus
|
# Zoom out: Ctrl+Shift+Minus
|
||||||
elif key == Qt.Key.Key_Minus:
|
# Note: On some keyboards Shift+Minus produces '_' (Underscore)
|
||||||
|
elif key in (Qt.Key.Key_Minus, Qt.Key.Key_Underscore):
|
||||||
self.main_window.zoom_out()
|
self.main_window.zoom_out()
|
||||||
return True # consume event
|
return True # consume event
|
||||||
|
|
||||||
# Reset zoom: Ctrl+Shift+0
|
# Reset zoom: Ctrl+Shift+0
|
||||||
elif key == Qt.Key.Key_0:
|
# Note: On some keyboards Shift+0 produces ')' (ParenRight)
|
||||||
|
elif key in (Qt.Key.Key_0, Qt.Key.Key_ParenRight):
|
||||||
self.main_window.reset_zoom()
|
self.main_window.reset_zoom()
|
||||||
return True # consume event
|
return True # consume event
|
||||||
|
|
||||||
|
|
@ -248,10 +250,10 @@ class MainWindow(QMainWindow):
|
||||||
|
|
||||||
# zoom level for UI scaling (1.0 = 100%, 1.5 = 150%, etc)
|
# zoom level for UI scaling (1.0 = 100%, 1.5 = 150%, etc)
|
||||||
# Change this value to set the default startup zoom level
|
# Change this value to set the default startup zoom level
|
||||||
self._zoom_level: float = 4.0 # Start at 200% zoom
|
self._zoom_level: float = 1.0 # Start at 100% (normal)
|
||||||
self._min_zoom: float = 0.5
|
self._min_zoom: float = 0.5
|
||||||
self._max_zoom: float = 10.0
|
self._max_zoom: float = 3.0 # Reduced from 10.0 to prevent extreme cropping
|
||||||
self._zoom_step: float = 1.0
|
self._zoom_step: float = 0.2 # 20% per keypress
|
||||||
|
|
||||||
# event filter for global zoom shortcuts
|
# event filter for global zoom shortcuts
|
||||||
self._zoom_filter: GlobalZoomEventFilter | None = None
|
self._zoom_filter: GlobalZoomEventFilter | None = None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue