Browse Source

cherry-picked e3932cb374 : Fix losing font in autocomplete result

km74
roytam1 4 years ago
parent
commit
4aaeff8d6e
  1. 6
      k-meleon/urlbar.cpp
  2. 4
      k-meleon/urlbar.h

6
k-meleon/urlbar.cpp

@ -146,6 +146,11 @@ int CACListBox::OnCreate(LPCREATESTRUCT lpCreateStruct)
return -1;
m_edit = (CEdit*)lpCreateStruct->lpCreateParams;
LOGFONT lf;
m_edit->GetFont()->GetLogFont(&lf);
m_font.CreateFontIndirect(&lf);
SetFont(&m_font);
return 0;
}
@ -346,7 +351,6 @@ void CUrlBarEdit::PreSubclassWindow()
return;
}
m_list->SetFont(GetFont());
m_list->ShowWindow(SW_HIDE);
}

4
k-meleon/urlbar.h

@ -45,6 +45,7 @@ public:
protected:
CEdit *m_edit;
CFont m_font;
int m_ignoreMousemove;
static void CALLBACK ACCallback(_AutoCompleteResult* result, int count, void* self) {
((CACListBox*)self)->OnResult(result, count);
@ -56,7 +57,7 @@ class CUrlBarEdit : public CEdit
protected:
CString m_ACStr;
CACListBox* m_list;
public:
CUrlBarEdit();
~CUrlBarEdit();
@ -114,6 +115,7 @@ public:
int Create(DWORD style, RECT &rect, CWnd *parentWnd, UINT id) {
int ret = CComboBoxEx::Create(style | CBS_AUTOHSCROLL, rect, parentWnd, id);
SetExtendedStyle(/*CBES_EX_PATHWORDBREAKPROC|*/CBES_EX_CASESENSITIVE, CBES_EX_PATHWORDBREAKPROC|CBES_EX_CASESENSITIVE);
COMBOBOXEXITEM ci;
ci.mask = CBEIF_IMAGE;
ci.iItem = -1;

Loading…
Cancel
Save