Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Make all controls follow MinHeight of 30 (Apart from Min Trackbar :-) #1636

Merged
merged 3 commits into from
Jul 16, 2024

Conversation

Smurf-IV
Copy link
Member

@Smurf-IV Smurf-IV commented Jul 14, 2024

#615

Something has "Gone wrong" ??

image

Not sure why these nullables are being reported now ?

@Smurf-IV Smurf-IV requested a review from PWagner1 July 14, 2024 12:05
@Smurf-IV Smurf-IV marked this pull request as ready for review July 14, 2024 12:07
@Smurf-IV
Copy link
Member Author

Not sure why these nullables are being reported now ?

This is due to the change in the editorConfig I suspect it was masking a lot of warnings !!

@PWagner1 PWagner1 merged commit d8843a2 into alpha Jul 16, 2024
@Ahmed-Abdelhameed
Copy link
Contributor

Ahmed-Abdelhameed commented Jul 16, 2024

Hi @Smurf-IV & @Wagnerp :)

FYI: This change completely messed up KMessageBox and KInputBox as well as other visual forms due to KBorderEdge's (new) min height.

Restoring the original min height for that specific control would likely fix this particular issue. That said, I also noticed other issues with KComboBox, KNumericUpDown and I'm 99% sure that this change will cause many other unexpected side effects and should be reverted.

I read the linked issue and I don't agree with the author. Certain controls in WinForms (like ComboBox, NumericUpDown, etc.) have always had their height managed internally. Many controls (including ComboBox, Label, etc.) have a default height that is different from, say, TextBox. and I don't think we should try to change that for the sake of the alignment argument. The WinForms designer has alignment tools (read: Format menu) to help with that. Personally, I have shortcuts like Ctrl+Shift+A, Ctrl+Shift+M and Ctrl+Shift+A, Ctrl+Shift+C mapped to 'Align Middles' and 'Align Centers', which allows me to align controls pretty quickly.

TL;DR: No need to try and unify the sizing of all controls to make control alignment (arguably) marginally easier as this will cause many other problems.

@giduac
Copy link
Contributor

giduac commented Jul 17, 2024

@Smurf-IV, @Wagnerp, @Ahmed-Abdelhameed & @MattH-Work,

Ahmed's statement about WinForms controls NOT having a standard height is correct., The image below shows most of them and all are aligned to the same top value. Also when using TestForm you can see that most forms are off now. I think this doesn't go down well with developers as a lot of interfaces have to reformatted.....

I'm too, in favour of reverting this change

image

@PWagner1
Copy link
Contributor

Hi @Ahmed-Abdelhameed & @giduac

I don't think the changes made to editorconfig should not be reverted, as prior to this it was hiding 7000+ nullable warnings. Plus the toolkit has non-standard WinForms features, i.e. ButtonSpecs which need to be considered.

cc. @Smurf-IV

@Ahmed-Abdelhameed
Copy link
Contributor

Hi @Wagnerp

Agreed. I was mainly talking about the changes to Min Height.

Plus the toolkit has non-standard WinForms features, i.e. ButtonSpecs which need to be considered.

I realize that. I wasn't suggesting that everything should be exactly the same as in the original WinForms controls. I was just asserting that control alignment shouldn't be the deciding factor when it comes to the sizing of controls (in my opinion, at least).

@MattH-Work
Copy link

image

From the above image, we can see that the original WinForms default heights are close to consistent ( combo box being the outlier in the 'box' category )

The krypton default heights are a little more of a mixed bag, but even though it's only a pixel here and a pixel there, it can still be a little jarring when they controls are aligned

The lower strip shows my preferred 25 height ( set via Minimum Size control )
image

The drop-down on the Date Picker stretches but the Combo Box does not, should it not be the same?
NumberUpDown & Combo Box maintain the drop-down height with a constant gap
I would like them all to stretch, but would accept them being fixed height, but consistent through all control types
image
( I also note that text does not consistently place itself, some are centres some are positioned at the top of the control )

To my mind, the way Date Pickers behave seems correct, stretch & centre
image

Check Box, Radio Button & Labels seem to follow their own rules. The top two rows ( Winforms & Krypton ) are aligned by tops, the 3rd row ( default height ) are all aligned by middle
We can see that Winforms is just wrong on all 3, whereas Krypton at least align with each other, however, accepting the control itself is shorter ( Check Box's are only 13 pixels high ) vs the box height of 20, 22, 25 etc
Is there a way to make the top of the Check Box's etc align with the top of the Combo Box ''correctly''
( see below, top row current result, bottom row 'expected, but still 'off' as the square & cirlce are aligned, but the text is not !! )
image

So to wrap it up, give us a consistent default height, but still allow it to be altered ( reduced & increased ) via Minimum & Maximum height setting in the designer, which would then give correct 'alignment' results

Whatever happens, we still love you!
We appreciate all the work done on these Krypton controls and I have noticed the increase in updates recently with the onboarding of new Devs, thankyou

@giduac
Copy link
Contributor

giduac commented Jul 19, 2024

@MattH-Work

My 1.5 cents on this.

  • If you go for a fixed initial height existing interfaces need to be reformatted, imo that's undesired.
  • Making all controls sizeable would be a great plus.
  • If a proof of concept is done minimum / maximum size and corresponding font heights can be explored and tested.

As for the onboarding. We still have plenty of work so if you like to tuck in....you're welcome.... :)

@MattH-Work
Copy link

As for the onboarding. We still have plenty of work so if you like to tuck in....you're welcome.... :)

Unfortunately, I am a VB hobbyist, my understanding of C, C#, C++ etc only goes so far as the third letter of the alphabet!
I have 'rolled' my own Krypton based controls ( multi column combobox is my current pride and joy ) but they are far from production ready, even embarrassing compared to the work of you 'professionals" !

image

@giduac
Copy link
Contributor

giduac commented Jul 19, 2024

As for the onboarding. We still have plenty of work so if you like to tuck in....you're welcome.... :)

Unfortunately, I am a VB hobbyist, my understanding of C, C#, C++ etc only goes so far as the third letter of the alphabet! I have 'rolled' my own Krypton based controls ( multi column combobox is my current pride and joy ) but they are far from production ready, even embarrassing compared to the work of you 'professionals" !

image

There's always time to start. C# as a language isn't particularly difficult and since you do VB you already have knowledge of the .NET framework/api.

If you do java(script) or php for example, the control structures and formatting are pretty much the same.

If you don't try then you'll never know... ;)

@PWagner1
Copy link
Contributor

Hi @giduac & @MattH-Work

If you do java(script) or php for example, the control structures and formatting are pretty much the same.

I've started to learn how to use TypeScript over the last 24 hours (for work) and it's surprisingly easy to learn. Now I know where C# has inherited the null ideas from!

@Smurf-IV
Copy link
Member Author

Smurf-IV commented Jul 20, 2024

Locking this, as these conversations should be in the bug not the merge request ;-)

@Krypton-Suite Krypton-Suite locked as too heated and limited conversation to collaborators Jul 20, 2024
@PWagner1
Copy link
Contributor

Locking this, as these conversations should be the bug not the merge request ;-)

I agree

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants