diff --git a/main.py b/main.py index 48269d038e4dd457862a615cac0fc3e860207ea9..acf96c5f7e7adef0ad25143fdfa64d2f8a544c41 100644 --- a/main.py +++ b/main.py @@ -123,6 +123,9 @@ svg_image_topic = 'place-b/model/svg/path' button_style_normal = {"marginRight": "15px", "padding": "2px", "height": "20px", "line-height": "0", "marginTop": "5px"} button_style_exit = {**button_style_normal, "backgroundColor": "red", "color": "white"} textarea_style_normal = {'width': '100%', 'height': '200px', 'resize': 'vertical'} +tab_height = '3vh' +tabs_style = {'line-height': tab_height} +tab_style = {'height': tab_height, 'padding': '0px'} app = dash.Dash(__name__, external_stylesheets=external_stylesheets) app.layout = html.Div([ @@ -238,7 +241,7 @@ app.layout = html.Div([ ], className="four columns"), ], className='row'), # dcc.Markdown("---"), - html.H2("Filtered MQTT Log"), + html.H3("Filtered MQTT Log"), dcc.Textarea( id='filtered-mqtt-log', value="", @@ -251,7 +254,7 @@ app.layout = html.Div([ value=[topic for topic in conversion_topics], labelStyle={'display': 'inline-block'} ), - html.H2("MQTT Log"), + html.H3("MQTT Log"), dcc.Textarea( id='mqtt-log', value="", @@ -290,7 +293,7 @@ app.layout = html.Div([ ), visdcc.Run_js(id='javascriptLog', run=""), html.Div(id='hidden-div', style={'display': 'none'}) - ]), # Tab "Buttons and Log" + ], style=tab_style, selected_style=tab_style), # Tab "Buttons and Log" dcc.Tab(label="SVG Model B", children=[ html.Div([ html.P("Name:"), @@ -300,8 +303,8 @@ app.layout = html.Div([ html.Img(id='model-b-svg-img', src="/static/{}".format(fixed_svg_filename)) ], style=dict(position='fixed', overflow='scroll', width='100%')), # html.Img(src="data:image/svg;base64,{}".format(base64.b64encode(open(fixed_svg_filename, 'rb').read()).decode())) - ]) # Tab "SVG Model B" - ]) # Tabs + ], style=tab_style, selected_style=tab_style) # Tab "SVG Model B" + ], style=tabs_style) # Tabs ]) # Div