mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Move col_with_margins utility to helper.py
This commit is contained in:
@@ -118,6 +118,17 @@ def prop_with_search(layout, data, prop_name, **kwargs):
|
|||||||
op.prop_name = prop_name
|
op.prop_name = prop_name
|
||||||
|
|
||||||
|
|
||||||
|
def col_with_margins(layout, margin_left=0.025, margin_right=None):
|
||||||
|
margin_right = margin_left if margin_right is None else margin_right
|
||||||
|
split = layout.split(factor=margin_left, align=True)
|
||||||
|
cols = [split.column() for _ in range(2)]
|
||||||
|
cols[0].label(text="")
|
||||||
|
subsplit = cols[-1].split(factor=(1. - margin_right), align=True)
|
||||||
|
subcol = subsplit.column()
|
||||||
|
subsplit.column().label(text="")
|
||||||
|
return subcol
|
||||||
|
|
||||||
|
|
||||||
class IfcHeaderExtractor:
|
class IfcHeaderExtractor:
|
||||||
def __init__(self, filepath: str):
|
def __init__(self, filepath: str):
|
||||||
self.filepath = filepath
|
self.filepath = filepath
|
||||||
|
|||||||
Reference in New Issue
Block a user