Skip to content

Commit

Permalink
Merge pull request #1042 from reupen/filter-prefs-fields-font-bug
Browse files Browse the repository at this point in the history
Fix Filter field list in preferences not showing text on second access
  • Loading branch information
reupen authored Dec 21, 2024
2 parents df6ebd7 + ef902aa commit cf58ebb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
[#1030](https://github.com/reupen/columns_ui/pull/1030),
[#1031](https://github.com/reupen/columns_ui/pull/1031),
[#1037](https://github.com/reupen/columns_ui/pull/1037),
[#1039](https://github.com/reupen/columns_ui/pull/1039)]
[#1039](https://github.com/reupen/columns_ui/pull/1039),
[#1042](https://github.com/reupen/columns_ui/pull/1042)]

This includes colour font support on Windows 8.1 and newer (allowing the use
of, for example, colour emojis).
Expand Down
3 changes: 1 addition & 2 deletions foo_ui_columns/config_columns_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,11 @@ INT_PTR TabColumns::on_message(HWND wnd, UINT msg, WPARAM wp, LPARAM lp)
switch (msg) {
case WM_INITDIALOG: {
m_wnd = wnd;
// if (g_main_window && !cfg_nohscroll ) playlist_view::g_save_columns();
m_columns_list_view.create(wnd, {7, 30, 79, 215}, true);

LOGFONT font{};
GetObject(GetWindowFont(wnd), sizeof(font), &font);
m_columns_list_view.set_font_from_log_font(font);
m_columns_list_view.create(wnd, {7, 30, 79, 215}, true);

m_columns.set_entries_copy(g_columns, true);

Expand Down
3 changes: 3 additions & 0 deletions foo_ui_columns/config_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ static class TabFilterFields : public PreferencesTab {
switch (msg) {
case WM_INITDIALOG: {
{
LOGFONT font{};
GetObject(GetWindowFont(wnd), sizeof(font), &font);
m_field_list.set_font_from_log_font(font);
HWND wnd_fields = m_field_list.create(wnd, uih::WindowPosition(7, 30, 313, 213), true);
SetWindowPos(wnd_fields, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
ShowWindow(wnd_fields, SW_SHOWNORMAL);
Expand Down
4 changes: 2 additions & 2 deletions foo_ui_columns/foo_ui_columns.rc
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ BEGIN
END

IDD_PREFS_FILTER_FIELDS DIALOGEX 0, 0, 327, 271
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
STYLE DS_SETFONT | DS_CONTROL | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x0
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Fields",IDC_TITLE1,7,4,313,16
PUSHBUTTON "New",IDC_NEW,7,250,50,14
Expand Down
2 changes: 1 addition & 1 deletion ui_helpers

0 comments on commit cf58ebb

Please sign in to comment.