use piano roll font to set row height for bookmarks

fix #805
This commit is contained in:
feos-tas 2017-09-19 18:29:54 +00:00
parent b187ceb413
commit 3240303cba
2 changed files with 6 additions and 5 deletions

View File

@ -73,6 +73,8 @@ void BOOKMARKS::init()
hwndBranchesBitmap = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_BRANCHES_BITMAP); hwndBranchesBitmap = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_BRANCHES_BITMAP);
hwndBookmarks = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_BOOKMARKS_BOX); hwndBookmarks = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_BOOKMARKS_BOX);
// set a font which is overridden elsewhere and so really only used to calculate the row size
SendMessage(hwndBookmarksList, WM_SETFONT, (WPARAM)pianoRoll.hItemMeasurementFont, 0);
// prepare bookmarks listview // prepare bookmarks listview
ListView_SetExtendedListViewStyleEx(hwndBookmarksList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); ListView_SetExtendedListViewStyleEx(hwndBookmarksList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
// subclass the listview // subclass the listview

View File

@ -121,13 +121,13 @@ void PIANO_ROLL::init()
FW_NORMAL, FALSE, FALSE, FALSE, /*weight, italic, underline, strikeout*/ FW_NORMAL, FALSE, FALSE, FALSE, /*weight, italic, underline, strikeout*/
ANSI_CHARSET, OUT_DEVICE_PRECIS, CLIP_MASK, /*charset, precision, clipping*/ ANSI_CHARSET, OUT_DEVICE_PRECIS, CLIP_MASK, /*charset, precision, clipping*/
DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/ DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/
"Arial"); /*font name*/ "Arial"); /*font name*/
hItemMeasurementFont = CreateFont(10, 5, /*Height,Width*/ hItemMeasurementFont = CreateFont(10, 5, /*Height,Width*/
0, 0, /*escapement,orientation*/ 0, 0, /*escapement,orientation*/
FW_BOLD, FALSE, FALSE, FALSE, /*weight, italic, underline, strikeout*/ FW_BOLD, FALSE, FALSE, FALSE, /*weight, italic, underline, strikeout*/
ANSI_CHARSET, OUT_DEVICE_PRECIS, CLIP_MASK, /*charset, precision, clipping*/ ANSI_CHARSET, OUT_DEVICE_PRECIS, CLIP_MASK, /*charset, precision, clipping*/
DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/ DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/
"Courier New"); /*font name*/ "Courier New"); /*font name*/
bgBrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE)); bgBrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
markerDragBoxBrushNormal = CreateSolidBrush(MARKED_FRAMENUM_COLOR); markerDragBoxBrushNormal = CreateSolidBrush(MARKED_FRAMENUM_COLOR);
@ -135,9 +135,8 @@ void PIANO_ROLL::init()
hwndList = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_LIST1); hwndList = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_LIST1);
// set a font which is overridden elsewhere (right?) and so really only used to calculate the row size // set a font which is overridden elsewhere and so really only used to calculate the row size
SendMessage(hwndList, WM_SETFONT, (WPARAM)hItemMeasurementFont, 0); SendMessage(hwndList, WM_SETFONT, (WPARAM)hItemMeasurementFont, 0);
// prepare the main listview // prepare the main listview
ListView_SetExtendedListViewStyleEx(hwndList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); ListView_SetExtendedListViewStyleEx(hwndList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES);
// subclass the header // subclass the header