From 3240303cbab414cdbd5fe89e360fa6e0510b1575 Mon Sep 17 00:00:00 2001 From: feos-tas Date: Tue, 19 Sep 2017 18:29:54 +0000 Subject: [PATCH] use piano roll font to set row height for bookmarks fix #805 --- trunk/src/drivers/win/taseditor/bookmarks.cpp | 2 ++ trunk/src/drivers/win/taseditor/piano_roll.cpp | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/trunk/src/drivers/win/taseditor/bookmarks.cpp b/trunk/src/drivers/win/taseditor/bookmarks.cpp index 084b8969..663219b2 100644 --- a/trunk/src/drivers/win/taseditor/bookmarks.cpp +++ b/trunk/src/drivers/win/taseditor/bookmarks.cpp @@ -73,6 +73,8 @@ void BOOKMARKS::init() hwndBranchesBitmap = GetDlgItem(taseditorWindow.hwndTASEditor, IDC_BRANCHES_BITMAP); 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 ListView_SetExtendedListViewStyleEx(hwndBookmarksList, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES, LVS_EX_DOUBLEBUFFER|LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES); // subclass the listview diff --git a/trunk/src/drivers/win/taseditor/piano_roll.cpp b/trunk/src/drivers/win/taseditor/piano_roll.cpp index 32d625ef..f0198fc2 100644 --- a/trunk/src/drivers/win/taseditor/piano_roll.cpp +++ b/trunk/src/drivers/win/taseditor/piano_roll.cpp @@ -121,13 +121,13 @@ void PIANO_ROLL::init() FW_NORMAL, FALSE, FALSE, FALSE, /*weight, italic, underline, strikeout*/ ANSI_CHARSET, OUT_DEVICE_PRECIS, CLIP_MASK, /*charset, precision, clipping*/ DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/ - "Arial"); /*font name*/ - hItemMeasurementFont = CreateFont(10, 5, /*Height,Width*/ + "Arial"); /*font name*/ + hItemMeasurementFont = CreateFont(10, 5, /*Height,Width*/ 0, 0, /*escapement,orientation*/ FW_BOLD, FALSE, FALSE, FALSE, /*weight, italic, underline, strikeout*/ ANSI_CHARSET, OUT_DEVICE_PRECIS, CLIP_MASK, /*charset, precision, clipping*/ DEFAULT_QUALITY, DEFAULT_PITCH, /*quality, and pitch*/ - "Courier New"); /*font name*/ + "Courier New"); /*font name*/ bgBrush = CreateSolidBrush(GetSysColor(COLOR_BTNFACE)); markerDragBoxBrushNormal = CreateSolidBrush(MARKED_FRAMENUM_COLOR); @@ -135,9 +135,8 @@ void PIANO_ROLL::init() 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); - // 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); // subclass the header