Onogork
(Richard)
May 29, 2024, 5:54am
#1
The ‘minWidth
’, and ‘minHeight
’ parameters for DockWidgetPluginGuiInfo.new()
are completely ignored by widgets when resizing.
Here is the script I wrote for testing, and reproducing:
local widget = plugin:CreateDockWidgetPluginGui(
"WidgetTest",
DockWidgetPluginGuiInfo.new( Enum.InitialDockState.Float, true, true, 500, 500, 500 --[[minWidth]], 500 --[[minHeight]] )
)
widget.Enabled = true
-- Create label.
local label = Instance.new("TextLabel", widget)
label.Size = UDim2.new(1,0,1,0)
-- + vec2(2, 24) for close button and widget borders.
label.Text = tostring(label.AbsoluteSize + Vector2.new(2, 24))
label.TextColor3 = Color3.fromRGB(255,255,255)
label.BackgroundTransparency = 1
label.TextSize = 24
-- Scale changed?
widget.Changed:Connect(function()
-- + vec2(2, 24) for close button and widget borders.
label.Text = tostring(label.AbsoluteSize + Vector2.new(2, 24))
end)
Expected behavior
Users should not be able to resize widgets smaller than the set minimum values.
1 Like
This was reported and has already received a response here:
This is correct. While the general idea of letting all plugins declare their minimum sizes sounds reasonable in theory, we found that it causes lots of complications when sharing borders with other widgets. We also had numerous requests like this one to be able to collapse docking areas smaller than the old minimum dimensions so we cranked them down to as small as the system will allow.
These are the challenges with a configurable workspace that merges numerous internal and external UI’s togeth…
Try to search for any pre-existing bug reports before creating one to avoid repetition.
Onogork
(Richard)
May 29, 2024, 9:36am
#3
Oh whoops, looks like there’s a couple of posts about this already.
These parameters should be removed from the function if they’re no longer used.
1 Like
I believe they’re working on accounting for the minimum sizes, but I do think the documentation should probably have a warning that the minimum sizes are currently non-functional.
1 Like