Closed hyarion closed 10 years ago
Thanks a lot, Benjamin! Could you try playing with the hacked value used for 'baseunitX' in CDialog::MapDialogRect in common/cqtmfc.cpp. Maybe a value different than 6 works for OSX? It also looks like 'baseunitY' might need some OSX tweaking -- the sample window, frame editor window, and instrument list all extend too far in the Y direction, proportionally by about the same amount. I put a qDebug in that function to show me what the values of QFontMetrics::averageCharWidth() and QFontMetrics::height() is for Windows, then adjusted the one that was 'wrong' in Linux. It's not perfect but it does get a lot closer to the Windows look.
For what it's worth the spin buttons appear to not have properly found their buddies, which means that their geometries don't overlap, which likely means that the X and Y units used in that function need to be adjusted. What happens if you click on the up or down arrow next to the Frames edit box?
Alternatively, now that I think about it, the three windows that appear to be messed up are all positioned with MoveWindow() which uses the SX() and SY() macros which use the MulDiv function with some DPI values. Perhaps it is the DPI values that need adjusting for OSX? The default DPI seems to work properly for Windows/Linux.
With regard to painting, I will look into keeping track of update regions as the MFC painting system does -- if the Qt painting system doesn't do this already. For what it's worth, though, the MFC code calls Invalidate() most often which causes an erase which, I think, means the update region becomes the whole window.
On Wed, Apr 23, 2014 at 6:07 AM, Benjamin Nauck notifications@github.comwrote:
osx version: 10.9.2 qt version: 4.8.5
There's still a lot of issues with the ui but loading and playing a tune works.
[image: screenshot of famitracker running on osx]https://cloud.githubusercontent.com/assets/349748/2776623/1f70f5a2-cad7-11e3-953d-c6108aca59de.png
You can merge this Pull Request by running
git pull https://github.com/hyarion/nesicide osx-famitracker-fix
Or view, comment on, or merge it at:
https://github.com/christopherpow/nesicide/pull/14 Commit Summary
- adds missing header include
- fixes m_nThreadID on osx
- fixes ASSERT macros on osx
File Changes
- M common/cqtmfc.cpphttps://github.com/christopherpow/nesicide/pull/14/files#diff-0(4)
- M common/cqtmfc.hhttps://github.com/christopherpow/nesicide/pull/14/files#diff-1(10)
- M libs/famitracker/cqtmfc_famitracker.cpphttps://github.com/christopherpow/nesicide/pull/14/files#diff-2(1)
Patch Links:
- https://github.com/christopherpow/nesicide/pull/14.patch
- https://github.com/christopherpow/nesicide/pull/14.diff
— Reply to this email directly or view it on GitHubhttps://github.com/christopherpow/nesicide/pull/14 .
Sure thing, but I think that doesn't belong in this pull-request and it might take a while to get it right so merging this pull request might be a good idea to do first :)
Will do.
On Thu, Apr 24, 2014 at 3:48 AM, Benjamin Nauck notifications@github.comwrote:
Sure thing, but I think that doesn't belong in this pull-request and it might take a while to get it right so merging this pull request might be a good idea to do first :)
— Reply to this email directly or view it on GitHubhttps://github.com/christopherpow/nesicide/pull/14#issuecomment-41257157 .
osx version: 10.9.2 qt version: 4.8.5
There's still a lot of issues with the ui but loading and playing a tune works.![screenshot of famitracker running on osx](https://cloud.githubusercontent.com/assets/349748/2776623/1f70f5a2-cad7-11e3-953d-c6108aca59de.png)