Home » U++ Library support » U++ Core » DropList STDFONT size changing after Drawn on screen
Re: DropList STDFONT size changing after Drawn on screen [message #59807 is a reply to message #59805] |
Thu, 20 April 2023 18:19  |
devilsclaw
Messages: 72 Registered: August 2022
|
Member |
|
|
I guess it to do the fact the the returned font changes based on various variables before it shows on screen it returns StdFont() without anything passed to it
As a temp fix for droplist i always use StdFont(); now but it seems to me what is reported should be what is used to draw on screen
Font Ctrl::GetPreeditFont()
{
static int pheight = -1;
static Font pfont;
if(!focusCtrl)
return StdFont();
int height = max(focusCtrl->GetCaret().GetHeight(), DPI(7));
if(height != pheight) {
pheight = height;
while(pheight > 0) {
pfont = StdFont(height);
if(pfont.GetCy() < pheight)
break;
height--;
}
if(height == 0)
pfont = StdFont();
}
return pfont;
}
[Updated on: Thu, 20 April 2023 18:20] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri Jul 04 23:33:53 CEST 2025
Total time taken to generate the page: 0.03823 seconds
|