fix(gui): ensure minimum section height of 100px for Files & Media sections
This commit is contained in:
+2
-2
@@ -876,11 +876,11 @@ class App:
|
|||||||
if opened:
|
if opened:
|
||||||
if exp:
|
if exp:
|
||||||
avail = imgui.get_content_region_avail().y
|
avail = imgui.get_content_region_avail().y
|
||||||
# Determine how many sections will render
|
|
||||||
files_hdr = imgui.collapsing_header("Files")
|
files_hdr = imgui.collapsing_header("Files")
|
||||||
shots_hdr = imgui.collapsing_header("Screenshots")
|
shots_hdr = imgui.collapsing_header("Screenshots")
|
||||||
num_open = (1 if files_hdr else 0) + (1 if shots_hdr else 0)
|
num_open = (1 if files_hdr else 0) + (1 if shots_hdr else 0)
|
||||||
section_h = avail / max(num_open, 1)
|
section_h = avail / max(num_open, 1) if num_open > 0 else avail
|
||||||
|
section_h = max(section_h, 100)
|
||||||
# BEGIN Files section
|
# BEGIN Files section
|
||||||
if files_hdr:
|
if files_hdr:
|
||||||
self._render_files_panel(section_h - 80)
|
self._render_files_panel(section_h - 80)
|
||||||
|
|||||||
Reference in New Issue
Block a user