From 8eaf2a1afe64463d852a589d768b833010d319ec Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 1 Aug 2021 16:29:50 -0400 Subject: [PATCH] Allocate minority to OHLC chart since 2 fsps by default is likely --- piker/ui/_chart.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index ce6b7c5e..cb59a634 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -229,7 +229,10 @@ class GodWidget(QWidget): # XXX: since the pp config is a singleton widget we have to # also switch it over to the new chart's interal-layout self.linkedsplits.chart.qframe.hbox.removeWidget(self.pp_config) - linkedsplits.chart.qframe.hbox.addWidget(self.pp_config, alignment=Qt.AlignTop) + linkedsplits.chart.qframe.hbox.addWidget( + self.pp_config, + alignment=Qt.AlignTop + ) # chart is already in memory so just focus it if self.linkedsplits: @@ -316,7 +319,7 @@ class LinkedSplits(QWidget): def set_split_sizes( self, - prop: float = 0.375 # proportion allocated to consumer subcharts + prop: float = 0.625 # proportion allocated to consumer subcharts ) -> None: '''Set the proportion of space allocated for linked subcharts. @@ -427,9 +430,13 @@ class LinkedSplits(QWidget): self.xaxis.hide() self.xaxis = xaxis + # TODO: probably should formalize and call this something else? class LambdaQFrame(QFrame): - '''One-off ``QFrame`` which composes a layout - of a chart + sidepane ``FieldsForm`` (if provided). + '''One-off ``QFrame`` composite which pairs a chart + sidepane + ``FieldsForm`` (if provided). + + See composite widgets docs for deats: + https://doc.qt.io/qt-5/qwidget.html#composite-widgets ''' sidepane: FieldsForm @@ -1844,16 +1851,16 @@ async def _async_main( 'type': 'select', 'default_value': ['uniform'], }, - 'slots': { - 'key': '**slots**:', - 'type': 'edit', - 'default_value': 4, - }, 'dollar_size': { 'key': '**$size**:', 'type': 'edit', 'default_value': '5k', }, + 'slots': { + 'key': '**slots**:', + 'type': 'edit', + 'default_value': 4, + }, }, ) as pp_config, ):