NeoAxis / NeoAxisEngine

A versatile real-time platform for making 3D, 2D games and apps.
https://www.neoaxis.com/
Other
175 stars 38 forks source link

dropDownList selectedText not showing( in Editor ) #14

Closed imdaddyjnj closed 3 years ago

imdaddyjnj commented 3 years ago

All of dropDownLists's selectedText not showing in Editor at NeoAxis version( 2020.7, 2020.6).

And I tried to fix problem like this It's work but a little bit not aligned other ui controls.

(at Sources\Engine\NeoAxis.Core\Editor\HierarchicalContainer\HCItemEnumDropDown.cs)

https://github.com/NeoAxis/NeoAxisEngine/blob/a1e65f17a39d2d8eb4c0538902487c4d0b435e4d/Sources/Engine/NeoAxis.Core/Editor/HierarchicalContainer/HCItemEnumDropDown.cs#L71

public override void UpdateControl()
{
    base.UpdateControl();

    bool readOnly = !CanEditValue();
    var control = ( HCGridDropDownButton /*IHCDropDownButton*/)CreatedControlInsidePropertyItemControl;
    control.Button.Enabled = !readOnly;

    //update width. Anchor for this control works bad in .NET Core
    control.Button.Width = control.Width - control.Button.Location.X;

    //[begin] my temporal fix
    if( control.Button.Height < control.Button.PreferredSize.Height )
    {
        control.Button.Height = control.Button.PreferredSize.Height;
    }
    //[end] my temporal fix

    ....
}

I hope it can help someone...

img_compare

IvanEfimov commented 3 years ago

Please tell what Windows version, font size in Display settings?

imdaddyjnj commented 3 years ago

Windows 10 (20H1), "Microsoft Sans serif 8pt" for dropDownList button control (vs2019 debugger)

IvanEfimov commented 3 years ago

Thanks, please check reuploaded build. It is must be fixed, although alignment can still not ideal. Also other small fixes are done. https://www.neoaxis.com/downloads/NeoAxisEngine-2020.7.1.exe https://www.neoaxis.com/downloads/NeoAxisEngine-2020.7.1.exe.torrent

imdaddyjnj commented 3 years ago

Thanks a lot. It fixed!

fixed_1 fixed_2

After (: https://github.com/NeoAxis/NeoAxisEngine/commit/ec1ac30c86f0fa3397835b834a0b21ca6efb2fdc)