mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 22:02:24 -06:00
Add support High DPI
Выполнен переход на wxWidgets 3.2 для улучшения поддержки DPI. Также обновлена среда разработки до Microsoft Visual Studio 2022.
This commit is contained in:
parent
920d424767
commit
d07487eac9
13 changed files with 84 additions and 47 deletions
|
|
@ -41,9 +41,7 @@ ctlSQLGrid::ctlSQLGrid()
|
|||
{
|
||||
}
|
||||
|
||||
ctlSQLGrid::ctlSQLGrid(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size)
|
||||
: wxGrid(parent, id, pos, size, wxWANTS_CHARS | wxVSCROLL | wxHSCROLL)
|
||||
{
|
||||
void ctlSQLGrid::setresizedpi() {
|
||||
// Set cells font
|
||||
wxFont fntCells(settings->GetSQLFont());
|
||||
SetDefaultCellFont(fntCells);
|
||||
|
|
@ -53,8 +51,22 @@ ctlSQLGrid::ctlSQLGrid(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons
|
|||
SetLabelFont(fntLabel);
|
||||
SetColLabelAlignment(wxALIGN_LEFT, wxALIGN_CENTER);
|
||||
SetRowLabelSize(50);
|
||||
SetDefaultRowSize(fntCells.GetPointSize() * 2 + 2);
|
||||
SetColLabelSize(fntLabel.GetPointSize() * 4);
|
||||
|
||||
}
|
||||
|
||||
ctlSQLGrid::ctlSQLGrid(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size)
|
||||
: wxGrid(parent, id, pos, size, wxWANTS_CHARS | wxVSCROLL | wxHSCROLL)
|
||||
{
|
||||
|
||||
Bind(wxEVT_DPI_CHANGED, [this](wxDPIChangedEvent& event) {
|
||||
setresizedpi();
|
||||
event.Skip();
|
||||
});
|
||||
|
||||
|
||||
setresizedpi();
|
||||
//SetDefaultRowSize(fntCells.GetPointSize() * 2 + 2);
|
||||
//SetColLabelSize(fntLabel.GetPointSize() * 4);
|
||||
SetDefaultCellOverflow(false);
|
||||
//SetDefaultRenderer(new wxGridCellAutoWrapStringRenderer);
|
||||
SetDefaultRenderer(new CursorCellRenderer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue