add resize splitter to dicussion hub message/response section
This commit is contained in:
@@ -205,6 +205,7 @@ class App:
|
|||||||
self._nerv_alert = theme_fx.AlertPulsing()
|
self._nerv_alert = theme_fx.AlertPulsing()
|
||||||
self._nerv_flicker = theme_fx.StatusFlicker()
|
self._nerv_flicker = theme_fx.StatusFlicker()
|
||||||
self.ui_tool_filter_category = "All"
|
self.ui_tool_filter_category = "All"
|
||||||
|
self.ui_discussion_split_h = 300.0
|
||||||
|
|
||||||
def _handle_approve_tool(self, user_data=None) -> None:
|
def _handle_approve_tool(self, user_data=None) -> None:
|
||||||
"""UI-level wrapper for approving a pending tool execution ask."""
|
"""UI-level wrapper for approving a pending tool execution ask."""
|
||||||
@@ -534,11 +535,15 @@ class App:
|
|||||||
self.show_windows["Discussion Hub"] = bool(opened)
|
self.show_windows["Discussion Hub"] = bool(opened)
|
||||||
if exp:
|
if exp:
|
||||||
# Top part for the history
|
# Top part for the history
|
||||||
imgui.begin_child("HistoryChild", size=(0, -200))
|
imgui.begin_child("HistoryChild", size=(0, -self.ui_discussion_split_h))
|
||||||
if self.perf_profiling_enabled: self.perf_monitor.start_component("_render_discussion_panel")
|
if self.perf_profiling_enabled: self.perf_monitor.start_component("_render_discussion_panel")
|
||||||
self._render_discussion_panel()
|
self._render_discussion_panel()
|
||||||
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_discussion_panel")
|
if self.perf_profiling_enabled: self.perf_monitor.end_component("_render_discussion_panel")
|
||||||
imgui.end_child()
|
imgui.end_child()
|
||||||
|
# Splitter
|
||||||
|
imgui.button("###discussion_splitter", imgui.ImVec2(-1, 4))
|
||||||
|
if imgui.is_item_active():
|
||||||
|
self.ui_discussion_split_h = max(150.0, min(imgui.get_window_height() - 150.0, self.ui_discussion_split_h - imgui.get_io().mouse_delta.y))
|
||||||
# Bottom part with tabs for message and response
|
# Bottom part with tabs for message and response
|
||||||
# Detach controls
|
# Detach controls
|
||||||
imgui.push_style_var(imgui.StyleVar_.item_spacing, imgui.ImVec2(10, 4))
|
imgui.push_style_var(imgui.StyleVar_.item_spacing, imgui.ImVec2(10, 4))
|
||||||
|
|||||||
Reference in New Issue
Block a user