diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-01 23:35:55 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-01 23:35:55 +0300 |
commit | 89bd2caae0243f580f921e16c6da532bf65c85c0 (patch) | |
tree | 1c02b91c5a9220c5ed3d5b4506302e1430a10e2f | |
parent | 36001ddef7c7485f254b58f2e77ae7a95f967d4c (diff) |
proper column sizing
-rw-r--r-- | src/mir_app/src/pluginopts.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 973a5094e5..7663268de2 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -293,7 +293,7 @@ public: m_plugList.InsertColumn(1, &col);
col.pszText = TranslateT("Name");
- col.cx = 180;//max = 220;
+ col.cx = 180;
m_plugList.InsertColumn(2, &col);
col.pszText = TranslateT("Version");
@@ -308,17 +308,16 @@ public: enumPlugins(dialogListPlugins, (WPARAM)m_hwnd, (LPARAM)m_plugList.GetHwnd());
// sort out the headers
- m_plugList.SetColumnWidth(1, LVSCW_AUTOSIZE); // dll name
- int w = m_plugList.GetColumnWidth(1);
- if (w > 110) {
- m_plugList.SetColumnWidth(1, w = 110);
- }
-
- int max = w < 110 ? 189 + 110 - w : 189;
- m_plugList.SetColumnWidth(3, LVSCW_AUTOSIZE); // short name
- w = m_plugList.GetColumnWidth(2);
+ m_plugList.SetColumnWidth(0, LVSCW_AUTOSIZE); // dll name
+ int w = m_plugList.GetColumnWidth(0);
+ if (w > 180)
+ m_plugList.SetColumnWidth(0, w = 180);
+
+ int max = w < 180 ? 189 + 180 - w : 189;
+ m_plugList.SetColumnWidth(2, LVSCW_AUTOSIZE); // short name
+ w = m_plugList.GetColumnWidth(1);
if (w > max)
- m_plugList.SetColumnWidth(2, max);
+ m_plugList.SetColumnWidth(1, max);
m_plugList.SortItems(SortPlugins, (LPARAM)m_hwnd);
return true;
|