fixes
This commit is contained in:
@@ -12,7 +12,7 @@ class BackgroundShader:
|
|||||||
self.ctx: Optional[nvg.Context] = None
|
self.ctx: Optional[nvg.Context] = None
|
||||||
|
|
||||||
def render(self, width: float, height: float):
|
def render(self, width: float, height: float):
|
||||||
if not self.enabled:
|
if not self.enabled or width <= 0 or height <= 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
# In imgui-bundle, hello_imgui handles the background.
|
# In imgui-bundle, hello_imgui handles the background.
|
||||||
|
|||||||
@@ -387,8 +387,10 @@ class App:
|
|||||||
curr_x = imgui.get_cursor_pos_x()
|
curr_x = imgui.get_cursor_pos_x()
|
||||||
drag_w = right_x - curr_x
|
drag_w = right_x - curr_x
|
||||||
if drag_w > 0:
|
if drag_w > 0:
|
||||||
imgui.invisible_button("##drag_area", (drag_w, 0))
|
# Use a small positive height to satisfy IM_ASSERT(size_arg.y != 0.0f)
|
||||||
if imgui.is_item_hovered() and imgui.is_mouse_clicked(0):
|
# The menu bar naturally constrains the hit box height anyway.
|
||||||
|
imgui.invisible_button("##drag_area", (drag_w, 20.0))
|
||||||
|
if imgui.is_item_active() and imgui.is_mouse_dragging(0):
|
||||||
win32gui.ReleaseCapture()
|
win32gui.ReleaseCapture()
|
||||||
win32gui.SendMessage(hwnd, win32con.WM_NCLBUTTONDOWN, win32con.HTCAPTION, 0)
|
win32gui.SendMessage(hwnd, win32con.WM_NCLBUTTONDOWN, win32con.HTCAPTION, 0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user