mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-10 19:03:30 +00:00
Constraint of only min or max window size #1139
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#1139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've got a tweak to
ApplySizeFullWithConstraintthat allows you to constrain only the minimum, or only the maximum size of a window. This is useful where I want to useImGuiWindowFlags_AlwaysAutoResize, but with a minimum so that the title bar text is visible, and the window is at least a reasonable size. Eg:SetNextWindowSizeConstraints(ImVec2(100.0f, -1.0f), ImVec2(-1.0f, -1.0f));Is there a better way I could do this?
Hello,
You could achieve it through the callback (meh!), I think your patch would make sense to apply tho. Will look into it. Thanks!
Omar
Has anyone found a solution for setting the max window size? I saw that ImGui has a min var(ImGuiStyleVar_WindowMinSize) but I didn't see a max, please enlighten me.
Nevermind, I found a function after a bit of documentation spelunking. My solution was using SetNextWindowSizeConstraints.