Allocate minority to OHLC chart since 2 fsps by default is likely

ordermodepps_backup
Tyler Goodlet 2021-08-01 16:29:50 -04:00
parent 4974579e73
commit d1f5e3f62a
1 changed files with 16 additions and 9 deletions

View File

@ -229,7 +229,10 @@ class GodWidget(QWidget):
# XXX: since the pp config is a singleton widget we have to # XXX: since the pp config is a singleton widget we have to
# also switch it over to the new chart's interal-layout # also switch it over to the new chart's interal-layout
self.linkedsplits.chart.qframe.hbox.removeWidget(self.pp_config) 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 # chart is already in memory so just focus it
if self.linkedsplits: if self.linkedsplits:
@ -316,7 +319,7 @@ class LinkedSplits(QWidget):
def set_split_sizes( def set_split_sizes(
self, self,
prop: float = 0.375 # proportion allocated to consumer subcharts prop: float = 0.625 # proportion allocated to consumer subcharts
) -> None: ) -> None:
'''Set the proportion of space allocated for linked subcharts. '''Set the proportion of space allocated for linked subcharts.
@ -427,9 +430,13 @@ class LinkedSplits(QWidget):
self.xaxis.hide() self.xaxis.hide()
self.xaxis = xaxis self.xaxis = xaxis
# TODO: probably should formalize and call this something else?
class LambdaQFrame(QFrame): class LambdaQFrame(QFrame):
'''One-off ``QFrame`` which composes a layout '''One-off ``QFrame`` composite which pairs a chart + sidepane
of a chart + sidepane ``FieldsForm`` (if provided). ``FieldsForm`` (if provided).
See composite widgets docs for deats:
https://doc.qt.io/qt-5/qwidget.html#composite-widgets
''' '''
sidepane: FieldsForm sidepane: FieldsForm
@ -1844,16 +1851,16 @@ async def _async_main(
'type': 'select', 'type': 'select',
'default_value': ['uniform'], 'default_value': ['uniform'],
}, },
'slots': {
'key': '**slots**:',
'type': 'edit',
'default_value': 4,
},
'dollar_size': { 'dollar_size': {
'key': '**$size**:', 'key': '**$size**:',
'type': 'edit', 'type': 'edit',
'default_value': '5k', 'default_value': '5k',
}, },
'slots': {
'key': '**slots**:',
'type': 'edit',
'default_value': 4,
},
}, },
) as pp_config, ) as pp_config,
): ):