[BUG_FIXED] Fix list column width and item height
This commit fixes 2 issues: 1. In Ascii Insert Panel the columns are too narrow under a high resolution. 2. In function list panel and project panel, the item heights are squeezed under a high resolution.
This commit is contained in:
parent
5464e62067
commit
61842a6759
@ -77,15 +77,15 @@ void ListView::init(HINSTANCE hInst, HWND parent)
|
|||||||
generic_string hexStr = pNativeSpeaker->getAttrNameStr(TEXT("Hex"), "AsciiInsertion", "ColumnHex");
|
generic_string hexStr = pNativeSpeaker->getAttrNameStr(TEXT("Hex"), "AsciiInsertion", "ColumnHex");
|
||||||
generic_string charStr = pNativeSpeaker->getAttrNameStr(TEXT("Character"), "AsciiInsertion", "ColumnChar");
|
generic_string charStr = pNativeSpeaker->getAttrNameStr(TEXT("Character"), "AsciiInsertion", "ColumnChar");
|
||||||
|
|
||||||
lvColumn.cx = 45;
|
lvColumn.cx = NppParameters::getInstance()->_dpiManager.scaleX(45);
|
||||||
lvColumn.pszText = (TCHAR *)valStr.c_str();
|
lvColumn.pszText = (TCHAR *)valStr.c_str();
|
||||||
ListView_InsertColumn(_hSelf, 0, &lvColumn);
|
ListView_InsertColumn(_hSelf, 0, &lvColumn);
|
||||||
|
|
||||||
lvColumn.cx = 45;
|
lvColumn.cx = NppParameters::getInstance()->_dpiManager.scaleY(45);;
|
||||||
lvColumn.pszText = (TCHAR *)hexStr.c_str();
|
lvColumn.pszText = (TCHAR *)hexStr.c_str();
|
||||||
ListView_InsertColumn(_hSelf, 1, &lvColumn);
|
ListView_InsertColumn(_hSelf, 1, &lvColumn);
|
||||||
|
|
||||||
lvColumn.cx = 70;
|
lvColumn.cx = NppParameters::getInstance()->_dpiManager.scaleY(70);;
|
||||||
lvColumn.pszText = (TCHAR *)charStr.c_str();
|
lvColumn.pszText = (TCHAR *)charStr.c_str();
|
||||||
ListView_InsertColumn(_hSelf, 2, &lvColumn);
|
ListView_InsertColumn(_hSelf, 2, &lvColumn);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "TreeView.h"
|
#include "TreeView.h"
|
||||||
|
#include "Parameters.h"
|
||||||
|
|
||||||
#define CY_ITEMHEIGHT 18
|
#define CY_ITEMHEIGHT 18
|
||||||
|
|
||||||
@ -47,7 +48,8 @@ void TreeView::init(HINSTANCE hInst, HWND parent, int treeViewID)
|
|||||||
_hInst,
|
_hInst,
|
||||||
(LPVOID)0);
|
(LPVOID)0);
|
||||||
|
|
||||||
TreeView_SetItemHeight(_hSelf, CY_ITEMHEIGHT);
|
int itemHeight = NppParameters::getInstance()->_dpiManager.scaleY(CY_ITEMHEIGHT);
|
||||||
|
TreeView_SetItemHeight(_hSelf, itemHeight);
|
||||||
|
|
||||||
::SetWindowLongPtr(_hSelf, GWLP_USERDATA, (LONG_PTR)this);
|
::SetWindowLongPtr(_hSelf, GWLP_USERDATA, (LONG_PTR)this);
|
||||||
_defaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_hSelf, GWLP_WNDPROC, (LONG_PTR)staticProc));
|
_defaultProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(_hSelf, GWLP_WNDPROC, (LONG_PTR)staticProc));
|
||||||
|
Loading…
Reference in New Issue
Block a user