From: Sean P. <sp...@ad...> - 2005-04-01 04:56:05
|
I'm not sure this helps much if at all - The "fudge" factors still need to be applied for the most part to the outset. I think GetThemeMetric is most likely what GetBestControlRect calls so I doubt it saves you much. My recommendation would be to stop trying to share so much of the code, each widget is going to have to do some calculations and fundging - the hard coded values need to be made external, but otherwise just do the best you can. Go for a simple solution - not a clever one. Sean On Mar 31, 2005, at 11:13 AM, Foster T. Brereton wrote: > My idea is to remove GetBestControlRect because of its inherent > bugginess, and replace it with a metric system similar to what I'm > envisioning Ralph is using on Windows. It'll use calls to > GetThemeMetric to calculate minimal sizes for controls, and then the > best_bounds calls will add the size/baseline of the text. > > This should remove the fudge system entirely, or at least minimize it > and systematize it so it's not so horrendous. > > Blessings, > Foster > > On Mar 31, 2005, at 11:06a, David Catmull wrote: > >> On Mar 31, 2005, at 10:29 AM, Ralph Thomas wrote: >>> So, is the problem that you can't get widget metrics from >>> GetThemeMetric for small controls? >> >> Hm, I should do that instead of hard-coding 17 and 14. I forgot about >> theme metrics. The problem is that GetBestControlRect doesn't >> properly account for a control being set to small or mini. >> >> -- >> David Catmull >> unc...@un... >> http://www.uncommonplace.com/ > > -- > Foster T. Brereton <}}}>< Romans 3:21-26 > A d o b e S o f t w a r e T e c h n o l o g y L a b > "What 99 percent of programmers need to know is not how to build > components but how to use them." -- Alexander Stepanov > > > > ------------------------------------------------------- > This SF.net email is sponsored by Demarc: > A global provider of Threat Management Solutions. > Download our HomeAdmin security software for free today! > http://www.demarc.com/Info/Sentarus/hamr30 > _______________________________________________ > Adobe-source-devel mailing list > Ado...@li... > https://lists.sourceforge.net/lists/listinfo/adobe-source-devel |