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

[Bug]: **Regression** KComboBox text is clipped; as height is incorrect. #1455

Closed
Smurf-IV opened this issue May 6, 2024 · 11 comments
Closed
Labels
bug Something isn't working regression Something was working in a previous release, but isn't working now.

Comments

@Smurf-IV
Copy link
Member

Smurf-IV commented May 6, 2024

Using April 2024 alpha:
image

Win 10 22H2 (Latest)

@Smurf-IV Smurf-IV added bug Something isn't working regression Something was working in a previous release, but isn't working now. labels May 6, 2024
@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 6, 2024

<PackageReference Include="Krypton.Toolkit.Canary" Version="80.22.11.325-beta" />:
image

@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 6, 2024

I'm confused, With that much clipping, surely someone would have mentioned it as a show stopper before now !!?

@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 6, 2024

It seems it's just the MessageBox Demo app (At the moment)

If I use the workaround mentioned here: #615
the Height is sorted, but the text is still clipped !!
image

@Smurf-IV
Copy link
Member Author

Smurf-IV commented May 6, 2024

This "Maybe" a clue.

  • If I force a font into the StateCommon -> ComboBox -> Content
    • Then the size in the designer and the UI will be correct.

So the clue might be the designer (and at runtime) is picking up a null or small font for the height of the text area,
But when the text is actually drawn using the the them font, it is obviously "clipping out" due to "Not enough height"

@giduac
Copy link
Contributor

giduac commented Jun 17, 2024

Hi @Wagnerp,

Please assign this one to me.
TY.

@PWagner1 PWagner1 added the under investigation This bug/issue is currently under investigation. label Jun 17, 2024
@PWagner1 PWagner1 added this to the Version 90 milestone Jun 17, 2024
@PWagner1
Copy link
Contributor

Hi @Wagnerp,

Please assign this one to me. TY.

Hi @giduac

Done, should this be for v85?

@giduac
Copy link
Contributor

giduac commented Jun 17, 2024

@Wagnerp
Not sure yet.

Testing this on alpha & the latest V80 release.
The results are slightly different. It's actually more prominent and/or better reproduceable in alpha atm.
Needs an extra hour of fiddling to have it all tested...

@giduac
Copy link
Contributor

giduac commented Jun 17, 2024

@Wagnerp,

V90 Fix (PR underway)
Itemheight is derived from Font.Height and in one accocasion (addresses in the code below) the ItemHeight = Font.Height -1
which causes the lower part of the text to become clipped.

// Working on Windows XP or earlier systems?
if (_osMajorVersion < 6)
{
	// Fudge by adding one to the font height, this gives the actual space used by the
	// combo box control to draw an individual item in the main part of the control
	ItemHeight = Font.Height + 1;
}
else
{
	// Vista performs differently depending of the use of themes...
	if (IsAppThemed)
	{
		// Fudge by subtracting 1, which ensure correct sizing of combo box main area
		//ItemHeight = Font.Height - 1;
		
		// #1455 - lower part of the text can become clipped with chars like g, y, p, etc.
		// when subtracting one from the font height. 
		ItemHeight = Font.Height;
	}
	else
	{
		// On under Vista without themes is the font height the actual height used
		// by the combo box for the space required for drawing the actual item
		ItemHeight = Font.Height;
	}
}

@giduac
Copy link
Contributor

giduac commented Jun 17, 2024

@Wagnerp & @Smurf-IV

In motion:

TestForm_bxeTPkJJij.mp4

@giduac
Copy link
Contributor

giduac commented Jun 19, 2024

Hi @Wagnerp,

Problem is fix.
Please close, ty.

@PWagner1 PWagner1 added fixed This issue has been fixed. and removed under investigation This bug/issue is currently under investigation. labels Jun 19, 2024
@Smurf-IV Smurf-IV reopened this Jun 22, 2024
@Smurf-IV Smurf-IV modified the milestones: Version 90, Version 85 Jun 22, 2024
@Smurf-IV Smurf-IV removed the fixed This issue has been fixed. label Jun 22, 2024
@Smurf-IV
Copy link
Member Author

If I remove the following from the App.manifest file, then it works (But looks pants)

  <!--<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>-->

@Krypton-Suite Krypton-Suite deleted a comment from giduac Jun 22, 2024
@Krypton-Suite Krypton-Suite deleted a comment from giduac Jun 22, 2024
@Smurf-IV Smurf-IV self-assigned this Jun 23, 2024
@Smurf-IV Smurf-IV added the under investigation This bug/issue is currently under investigation. label Jun 23, 2024
@Smurf-IV Smurf-IV removed their assignment Jun 29, 2024
@Smurf-IV Smurf-IV removed the under investigation This bug/issue is currently under investigation. label Jun 29, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from PWagner1 Aug 13, 2024
@Krypton-Suite Krypton-Suite deleted a comment from Smurf-IV Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Something was working in a previous release, but isn't working now.
Projects
None yet
Development

No branches or pull requests

3 participants