diff --git a/piker/brokers/binance/feed.py b/piker/brokers/binance/feed.py index 79e5cbeb..15f791c3 100644 --- a/piker/brokers/binance/feed.py +++ b/piker/brokers/binance/feed.py @@ -102,12 +102,12 @@ class AggTrade(Struct, frozen=True): a: int # Aggregate trade ID p: float # Price q: float # Quantity with all the market trades - nq: float # Normal quantity without the trades involving RPI orders f: int # First trade ID l: int # noqa Last trade ID T: int # Trade time 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( diff --git a/piker/ui/_search.py b/piker/ui/_search.py index b1b3e270..7ca2537f 100644 --- a/piker/ui/_search.py +++ b/piker/ui/_search.py @@ -179,6 +179,8 @@ class CompleterView(QTreeView): self.set_font_size(_font.px_size) self.setIndentation(_font.px_size) self.setFont(_font.font) + # tell Qt our size hint changed so it recalculates layout + self.updateGeometry() def resize_to_results( self, @@ -657,6 +659,9 @@ class SearchWidget(QtWidgets.QWidget): if hasattr(self.view, 'update_fonts'): self.view.update_fonts() + # tell Qt our size hint changed so it recalculates layout + self.updateGeometry() + def focus(self) -> None: self.show() self.bar.focus() diff --git a/piker/ui/_window.py b/piker/ui/_window.py index 47777c30..d0a8d2f4 100644 --- a/piker/ui/_window.py +++ b/piker/ui/_window.py @@ -95,12 +95,14 @@ class GlobalZoomEventFilter(QObject): return True # consume event # 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() return True # consume event # 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() return True # consume event @@ -248,10 +250,10 @@ class MainWindow(QMainWindow): # zoom level for UI scaling (1.0 = 100%, 1.5 = 150%, etc) # 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._max_zoom: float = 10.0 - self._zoom_step: float = 1.0 + self._max_zoom: float = 3.0 # Reduced from 10.0 to prevent extreme cropping + self._zoom_step: float = 0.2 # 20% per keypress # event filter for global zoom shortcuts self._zoom_filter: GlobalZoomEventFilter | None = None