diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-08 23:47:06 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-08 23:47:06 -0400 |
| commit | f24e177d99a395a3b4d6782f82258631548f633a (patch) | |
| tree | 16d3ee66fb572770cd2182e2ab8bd3bffa909a6b /redo/sizing_windows.c | |
| parent | 21dbda72e2e75d917216a5b4e734ccd73a0719bd (diff) | |
Mostly fixed Labels on Windows being offset slightly; need to finish the fix by making it not apply to standalone Labels and adding comments.
Diffstat (limited to 'redo/sizing_windows.c')
| -rw-r--r-- | redo/sizing_windows.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/redo/sizing_windows.c b/redo/sizing_windows.c index a2cd2cf..5f14b19 100644 --- a/redo/sizing_windows.c +++ b/redo/sizing_windows.c @@ -5,7 +5,7 @@ /* TODO figure out where these should go */ -void calculateBaseUnits(HWND hwnd, int *baseX, int *baseY) +void calculateBaseUnits(HWND hwnd, int *baseX, int *baseY, LONG *internalLeading) { HDC dc; HFONT prevFont; @@ -21,6 +21,7 @@ void calculateBaseUnits(HWND hwnd, int *baseX, int *baseY) xpanic("error getting text metrics for preferred size calculations", GetLastError()); *baseX = (int) tm.tmAveCharWidth; /* TODO not optimal; third reference below has better way */ *baseY = (int) tm.tmHeight; + *internalLeading = tm.tmInternalLeading; if (SelectObject(dc, prevFont) != controlFont) xpanic("error restoring previous font into device context after preferred size calculations", GetLastError()); if (ReleaseDC(hwnd, dc) == 0) |
