Add support High DPI

Выполнен переход на wxWidgets 3.2 для улучшения поддержки DPI.
Также обновлена среда разработки до Microsoft Visual Studio 2022.
This commit is contained in:
lsv 2023-06-25 18:36:16 +05:00
parent 920d424767
commit d07487eac9
13 changed files with 84 additions and 47 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
pgAdmin3.aps
Debug/*
x64/Debug_(3.0)/*
Release/*

View file

@ -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);

View file

@ -2262,7 +2262,7 @@ propertyFactory::propertyFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuTool
else
context = false;
if (toolbar)
toolbar->AddTool(id, wxEmptyString, *properties_png_bmp, _("Display/edit the properties of the selected object."), wxITEM_NORMAL);
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(properties_png_bmp, "properties.svg", wxSize(32, 32)), _("Display/edit the properties of the selected object."), wxITEM_NORMAL);
}
@ -2285,7 +2285,7 @@ bool propertyFactory::CheckEnable(pgObject *obj)
createFactory::createFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : actionFactory(list)
{
mnu->Append(id, _("&Create..."), _("Create a new object of the same type as the selected object."));
toolbar->AddTool(id, wxEmptyString, *create_png_bmp, _("Create a new object of the same type as the selected object."), wxITEM_NORMAL);
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(create_png_bmp, "create.svg", wxSize(32, 32)), _("Create a new object of the same type as the selected object."), wxITEM_NORMAL);
}
@ -2308,7 +2308,7 @@ bool createFactory::CheckEnable(pgObject *obj)
dropFactory::dropFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : contextActionFactory(list)
{
mnu->Append(id, _("&Delete/Drop...\tDel"), _("Delete/Drop the selected object."));
toolbar->AddTool(id, wxEmptyString, *drop_png_bmp, _("Drop the currently selected object."), wxITEM_NORMAL);
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(drop_png_bmp, "drop.svg", wxSize(32, 32)), _("Drop the currently selected object."), wxITEM_NORMAL);
}
@ -2352,7 +2352,7 @@ refreshFactory::refreshFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolba
else
context = false;
if (toolbar)
toolbar->AddTool(id, wxEmptyString, *refresh_png_bmp, _("Refresh the selected object."), wxITEM_NORMAL);
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(refresh_png_bmp,"refresh.svg",wxSize(32,32)), _("Refresh the selected object."), wxITEM_NORMAL);
}

View file

@ -3343,7 +3343,7 @@ wxWindow *editGridFactoryBase::ViewData(frmMain *form, pgObject *obj, bool filte
editGridFactory::editGridFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : editGridFactoryBase(list)
{
mnu->Append(id, _("View &All Rows\tCtrl-D"), _("View the data in the selected object."));
toolbar->AddTool(id, _("View All Rows\tCtrl-D"), *viewdata_png_bmp, _("View the data in the selected object."), wxITEM_NORMAL);
toolbar->AddTool(id, _("View All Rows\tCtrl-D"), *GetBundleSVG(viewdata_png_bmp, "viewdata.svg", wxSize(32, 32)), _("View the data in the selected object."), wxITEM_NORMAL);
context = false;
}
@ -3358,7 +3358,7 @@ wxWindow *editGridFactory::StartDialog(frmMain *form, pgObject *obj)
editGridFilteredFactory::editGridFilteredFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : editGridFactoryBase(list)
{
mnu->Append(id, _("View F&iltered Rows...\tCtrl-G"), _("Apply a filter and view the data in the selected object."));
toolbar->AddTool(id, _("View Filtered Rows\tCtrl-G"), *viewfiltereddata_png_bmp, _("Apply a filter and view the data in the selected object."), wxITEM_NORMAL);
toolbar->AddTool(id, _("View Filtered Rows\tCtrl-G"), *GetBundleSVG(viewfiltereddata_png_bmp, "viewfiltereddata.svg", wxSize(32, 32)) , _("Apply a filter and view the data in the selected object."), wxITEM_NORMAL);
context = false;
}

View file

@ -213,7 +213,7 @@ frmMain::frmMain(const wxString &title)
pgaFactory::RegisterMenu(this, wxCommandEventHandler(frmMain::OnNew));
menuFactories->RegisterMenu(this, wxCommandEventHandler(frmMain::OnAction));
menuFactories->CheckMenu(0, menuBar, toolBar);
wxSize toolw = toolBar->GetBestSize();
// Kickstart wxAUI
manager.AddPane(browser, wxAuiPaneInfo().Name(wxT("objectBrowser")).Caption(_("Object browser")).Left().MinSize(wxSize(100, 200)).BestSize(wxSize(200, 450)));
manager.AddPane(listViews, wxAuiPaneInfo().Name(wxT("listViews")).Caption(_("Info pane")).Center().CaptionVisible(false).CloseButton(false).MinSize(wxSize(200, 100)).BestSize(wxSize(400, 200)));
@ -230,6 +230,7 @@ frmMain::frmMain(const wxString &title)
manager.GetPane(wxT("listViews")).Caption(_("Info pane"));
manager.GetPane(wxT("sqlPane")).Caption(_("SQL pane"));
manager.GetPane(wxT("toolBar")).Caption(_("Tool bar"));
manager.GetPane(wxT("toolBar")).BestSize(toolw);
// Sync the View menu options
viewMenu->Check(MNU_SQLPANE, manager.GetPane(wxT("sqlPane")).IsShown());
@ -287,7 +288,16 @@ frmMain::~frmMain()
#endif
}
wxBitmapBundle* GetBundleSVG(wxBitmap* std, wxString name, wxSize sz) {
wxBitmapBundle *b;
if (wxFile::Exists(loadPath + sepPath +"svg" + sepPath + name)) {
b = new wxBitmapBundle(wxBitmapBundle::FromSVGFile(loadPath + sepPath + "svg" + sepPath + name, sz));
}
else {
b=new wxBitmapBundle(*std);
}
return b;
}
void frmMain::CreateMenus()
{
@ -313,7 +323,7 @@ void frmMain::CreateMenus()
newContextMenu = new wxMenu();
toolBar = new ctlMenuToolbar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER );
toolBar->SetToolBitmapSize(wxSize(32, 32));
//toolBar->SetToolBitmapSize(wxSize(32, 32));
menuFactories = new menuFactoryList();
// Load plugins - must do this after creating the menus and the factories
@ -1482,7 +1492,7 @@ pgsqlHelpFactory::pgsqlHelpFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuTo
if (toolbar)
{
if (bigIcon)
toolbar->AddTool(id, wxEmptyString, *help2_png_bmp, _("Display help on SQL commands."));
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(help2_png_bmp, "help2.svg", wxSize(32, 32)), _("Display help on SQL commands."));
else
toolbar->AddTool(id, wxEmptyString, *help_png_bmp, _("Display help on SQL commands."));
}

View file

@ -295,7 +295,7 @@ void frmMaintenance::Go()
maintenanceFactory::maintenanceFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : contextActionFactory(list)
{
mnu->Append(id, _("&Maintenance..."), _("Maintain the current database or table."));
toolbar->AddTool(id, wxEmptyString, *vacuum_png_bmp, _("Maintain the current database or table."), wxITEM_NORMAL);
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(vacuum_png_bmp, "vacuum.svg", wxSize(32, 32)), _("Maintain the current database or table."), wxITEM_NORMAL);
}

View file

@ -287,7 +287,9 @@ void frmQuery::seticon()
int g = (rgb >> 8) & 255;
int r = rgb & 255;
if (r == 255 && g == 255 && b == 255) {
//SetBitmapBundle()
SetIcon(*sql_32_png_ico);
}
else {
@ -333,7 +335,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
manager.SetManagedWindow(this);
manager.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_TRANSPARENT_DRAG);
SetMinSize(wxSize(450, 300));
SetMinSize(FromDIP(wxSize(450, 300)));
//seticon();
SetFont(settings->GetSystemFont());
menuBar = new wxMenuBar();
@ -579,44 +581,44 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
toolBar = new ctlMenuToolbar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER);
toolBar->SetToolBitmapSize(wxSize(22, 22));
//toolBar->SetToolBitmapSize(wxSize(22, 22));
toolBar->AddTool(MNU_NEWSQLTAB, wxEmptyString, *file_new_png_bmp, _("New SQL tab"), wxITEM_NORMAL);
toolBar->AddTool(MNU_OPEN, wxEmptyString, *file_open_png_bmp, _("Open file"), wxITEM_NORMAL);
toolBar->AddTool(MNU_SAVE, wxEmptyString, *file_save_png_bmp, _("Save file"), wxITEM_NORMAL);
toolBar->AddTool(MNU_NEWSQLTAB, wxEmptyString, *GetBundleSVG(file_new_png_bmp, "file_new.svg", wxSize(16, 16)), _("New SQL tab"), wxITEM_NORMAL);
toolBar->AddTool(MNU_OPEN, wxEmptyString, *GetBundleSVG(file_open_png_bmp, "file_open.svg", wxSize(16, 16)) , _("Open file"), wxITEM_NORMAL);
toolBar->AddTool(MNU_SAVE, wxEmptyString, *GetBundleSVG(file_save_png_bmp, "file_save.svg", wxSize(16, 16)) , _("Save file"), wxITEM_NORMAL);
toolBar->AddSeparator();
toolBar->AddTool(MNU_CUT, wxEmptyString, *clip_cut_png_bmp, _("Cut selected text to clipboard"), wxITEM_NORMAL);
toolBar->AddTool(MNU_COPY, wxEmptyString, *clip_copy_png_bmp, _("Copy selected text to clipboard"), wxITEM_NORMAL);
toolBar->AddTool(MNU_PASTE, wxEmptyString, *clip_paste_png_bmp, _("Paste selected text from clipboard"), wxITEM_NORMAL);
toolBar->AddTool(MNU_CLEAR, wxEmptyString, *edit_clear_png_bmp, _("Clear edit window"), wxITEM_NORMAL);
toolBar->AddTool(MNU_CUT, wxEmptyString, *GetBundleSVG(clip_cut_png_bmp, "clip_cut.svg", wxSize(16, 16)) , _("Cut selected text to clipboard"), wxITEM_NORMAL);
toolBar->AddTool(MNU_COPY, wxEmptyString, *GetBundleSVG(clip_copy_png_bmp, "clip_copy.svg", wxSize(16, 16)), _("Copy selected text to clipboard"), wxITEM_NORMAL);
toolBar->AddTool(MNU_PASTE, wxEmptyString, *GetBundleSVG(clip_paste_png_bmp, "clip_paste.svg", wxSize(16, 16)), _("Paste selected text from clipboard"), wxITEM_NORMAL);
toolBar->AddTool(MNU_CLEAR, wxEmptyString, *GetBundleSVG(edit_clear_png_bmp, "edit_clear.svg", wxSize(16, 16)), _("Clear edit window"), wxITEM_NORMAL);
toolBar->AddSeparator();
toolBar->AddTool(MNU_UNDO, wxEmptyString, *edit_undo_png_bmp, _("Undo last action"), wxITEM_NORMAL);
toolBar->AddTool(MNU_REDO, wxEmptyString, *edit_redo_png_bmp, _("Redo last action"), wxITEM_NORMAL);
toolBar->AddTool(MNU_UNDO, wxEmptyString, *GetBundleSVG(edit_undo_png_bmp, "edit_undo.svg", wxSize(16, 16)), _("Undo last action"), wxITEM_NORMAL);
toolBar->AddTool(MNU_REDO, wxEmptyString, *GetBundleSVG(edit_redo_png_bmp, "edit_redo.svg", wxSize(16, 16)), _("Redo last action"), wxITEM_NORMAL);
toolBar->AddSeparator();
toolBar->AddTool(MNU_FIND, wxEmptyString, *edit_find_png_bmp, _("Find and replace text"), wxITEM_NORMAL);
toolBar->AddTool(MNU_FIND, wxEmptyString, *GetBundleSVG(edit_find_png_bmp, "edit_find.svg", wxSize(16, 16)), _("Find and replace text"), wxITEM_NORMAL);
toolBar->AddSeparator();
toolBar->AddTool(MNU_EXECUTE, wxEmptyString, *query_execute_png_bmp, _("Execute query"), wxITEM_NORMAL);
toolBar->AddTool(MNU_EXECPGS, wxEmptyString, *query_pgscript_png_bmp, _("Execute pgScript"), wxITEM_NORMAL);
toolBar->AddTool(MNU_EXECFILE, wxEmptyString, *query_execfile_png_bmp, _("Execute query, write result to file"), wxITEM_NORMAL);
toolBar->AddTool(MNU_EXPLAIN, wxEmptyString, *query_explain_png_bmp, _("Explain query"), wxITEM_NORMAL);
toolBar->AddTool(MNU_CANCEL, wxEmptyString, *query_cancel_png_bmp, _("Cancel query"), wxITEM_NORMAL);
toolBar->AddTool(MNU_EXECUTE, wxEmptyString, *GetBundleSVG(query_execute_png_bmp, "query_execute.svg", wxSize(16, 16)), _("Execute query"), wxITEM_NORMAL);
toolBar->AddTool(MNU_EXECPGS, wxEmptyString, *GetBundleSVG(query_pgscript_png_bmp, "query_pgscript.svg", wxSize(16, 16)), _("Execute pgScript"), wxITEM_NORMAL);
toolBar->AddTool(MNU_EXECFILE, wxEmptyString, *GetBundleSVG(query_execfile_png_bmp, "query_execfile.svg", wxSize(16, 16)), _("Execute query, write result to file"), wxITEM_NORMAL);
toolBar->AddTool(MNU_EXPLAIN, wxEmptyString, *GetBundleSVG(query_explain_png_bmp, "query_explain.svg", wxSize(16, 16)), _("Explain query"), wxITEM_NORMAL);
toolBar->AddTool(MNU_CANCEL, wxEmptyString, *GetBundleSVG(query_cancel_png_bmp, "query_cancel.svg", wxSize(16, 16)), _("Cancel query"), wxITEM_NORMAL);
toolBar->AddSeparator();
toolBar->AddTool(MNU_DOCOMMIT, wxEmptyString, *query_commit_png_bmp, _("Commit"), wxITEM_NORMAL);
toolBar->AddTool(MNU_DOROLLBACK, wxEmptyString, *query_rollback_png_bmp, _("Rollback"), wxITEM_NORMAL);
toolBar->AddTool(MNU_DOCOMMIT, wxEmptyString, *GetBundleSVG(query_commit_png_bmp, "query_commit.svg", wxSize(16, 16)), _("Commit"), wxITEM_NORMAL);
toolBar->AddTool(MNU_DOROLLBACK, wxEmptyString, *GetBundleSVG(query_rollback_png_bmp, "query_rollback.svg", wxSize(16, 16)), _("Rollback"), wxITEM_NORMAL);
toolBar->AddSeparator();
toolBar->AddTool(MNU_HELP, wxEmptyString, *help_png_bmp, _("Display help on SQL commands."), wxITEM_NORMAL);
toolBar->AddTool(MNU_HELP, wxEmptyString, *GetBundleSVG(help_png_bmp, "help.svg", wxSize(16, 16)), _("Display help on SQL commands."), wxITEM_NORMAL);
toolBar->Realize();
wxSize toolw = toolBar->GetBestSize();
// Add the database selection bar
cbConnection = new wxBitmapComboBox(this, CTRLID_CONNECTION, wxEmptyString, wxDefaultPosition, wxSize(-1, -1), wxArrayString(), wxCB_READONLY | wxCB_DROPDOWN);
cbConnection->Append(conn->GetName(), CreateBitmap(GetServerColour(conn)), (void *)conn);
cbConnection->Append(_("<new connection>"), wxNullBitmap, (void *) NULL);
//CTL_BUTTONTRANSACTION
btnModeTransaction = new wxButton(this, CTL_BUTTONTRANSACTION, "A",wxDefaultPosition,wxSize(-1, -1),wxMINIMIZE_BOX);
btnModeTransaction->SetMaxSize(wxSize(24,24));
//btnModeTransaction->SetMaxSize(wxSize(24,24));
// btnModeTransaction->Enable(true);
wxFont stdFont = settings->GetSystemFont();
wxFont boldFont = stdFont;
@ -725,11 +727,11 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
// Now, the scratchpad
scratchPad = new wxTextCtrl(this, CTL_SCRATCHPAD, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxHSCROLL);
wxSize w1 = cbConnection->GetBestSize();
// Kickstart wxAUI
manager.AddPane(toolBar, wxAuiPaneInfo().Name(wxT("toolBar")).Caption(_("Tool bar")).ToolbarPane().Top().LeftDockable(false).RightDockable(false));
manager.AddPane(cbConnection, wxAuiPaneInfo().Name(wxT("databaseBar")).Caption(_("Connection bar")).ToolbarPane().Top().LeftDockable(false).RightDockable(false));
manager.AddPane(btnModeTransaction, wxAuiPaneInfo().Name(wxT("ModeTransaction")).Caption(_("Mode transaction")).ToolbarPane().Top().LeftDockable(false).RightDockable(false));
manager.AddPane(btnModeTransaction, wxAuiPaneInfo().Name(wxT("ModeTransaction")).Caption(_("Mode transaction")).ToolbarPane().Top().LeftDockable(false).RightDockable(false).Left().LeftDockable(true));
manager.AddPane(outputPane, wxAuiPaneInfo().Name(wxT("outputPane")).Caption(_("Output pane")).Bottom().MinSize(wxSize(200, 100)).BestSize(wxSize(550, 300)));
manager.AddPane(scratchPad, wxAuiPaneInfo().Name(wxT("scratchPad")).Caption(_("Scratch pad")).Right().MinSize(wxSize(100, 100)).BestSize(wxSize(250, 200)));
@ -742,11 +744,17 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
outputPaneInfo = manager.SavePerspective();
// and reset the captions for the current language
manager.GetPane(wxT("toolBar")).Caption(_("Tool bar"));
manager.GetPane(wxT("databaseBar")).BestSize(w1);
manager.GetPane(wxT("toolBar")).BestSize(toolw);
manager.GetPane(wxT("databaseBar")).Caption(_("Connection bar"));
//manager.GetPane(wxT("ModeTransaction")).Caption(_("Mode transaction"));
if (!manager.GetPane(wxT("ModeTransaction")).IsShown()) {
manager.GetPane(wxT("ModeTransaction")).MaxSize(wxSize(22, 22));
manager.GetPane(wxT("ModeTransaction")).BestSize(wxSize(22, 22));
//manager.GetPane(wxT("ModeTransaction")).MaxSize(wxSize(22, 22));
//manager.GetPane(wxT("ModeTransaction")).BestSize(wxSize(22, 22));
wxSize sz=btnModeTransaction->GetSize();
int m= std::max(sz.GetWidth(), sz.GetHeight());
manager.GetPane(wxT("ModeTransaction")).BestSize(wxSize(m, m));
manager.GetPane(wxT("ModeTransaction")).MaxSize(wxSize(m, m));
manager.GetPane(wxT("ModeTransaction")).Show(true);
}
@ -4851,7 +4859,8 @@ bool queryToolDataFactory::CheckEnable(pgObject *obj)
queryToolFactory::queryToolFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : queryToolBaseFactory(list)
{
mnu->Append(id, _("&Query tool\tCtrl-E"), _("Execute arbitrary SQL queries."));
toolbar->AddTool(id, wxEmptyString, *sql_32_png_bmp, _("Execute arbitrary SQL queries."), wxITEM_NORMAL);
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(sql_32_png_bmp, "sql_32.svg", wxSize(32, 32)), _("Execute arbitrary SQL queries."), wxITEM_NORMAL);
//toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(sql_32_png_bmp, "plugins.svg", wxSize(32, 32)), _("Execute arbitrary SQL queries."), wxITEM_NORMAL);
}
@ -4868,7 +4877,7 @@ queryToolSqlFactory::queryToolSqlFactory(menuFactoryList *list, wxMenu *mnu, ctl
{
mnu->Append(id, _("CREATE Script"), _("Start Query tool with CREATE script."));
if (toolbar)
toolbar->AddTool(id, wxEmptyString, *sql_32_png_bmp, _("Start query tool with CREATE script."), wxITEM_NORMAL);
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(sql_32_png_bmp, "sql_32.svg", wxSize(32, 32)), _("Start query tool with CREATE script."), wxITEM_NORMAL);
}

View file

@ -386,6 +386,7 @@ frmStatus::frmStatus(frmMain *form, const wxString &_title, pgConn *conn) : pgFr
AddXactPane();
AddQuerystatePane();
AddLogPane();
wxSize toolw = toolBar->GetBestSize();
manager.AddPane(toolBar, wxAuiPaneInfo().Name(wxT("toolBar")).Caption(_("Tool bar")).ToolbarPane().Top().LeftDockable(false).RightDockable(false));
@ -400,6 +401,7 @@ frmStatus::frmStatus(frmMain *form, const wxString &_title, pgConn *conn) : pgFr
manager.GetPane(wxT("Transactions")).Caption(_("Prepared Transactions"));
manager.GetPane(wxT("Logfile")).Caption(_("Logfile"));
manager.GetPane(wxT("Querystate")).Caption(_("QueryState"));
manager.GetPane(wxT("toolBar")).BestSize(toolw);
// Tell the manager to "commit" all the changes just made
manager.Update();

View file

@ -439,7 +439,7 @@ pluginButtonMenuFactory::pluginButtonMenuFactory(menuFactoryList *list, wxMenu *
if (toolbar)
{
toolbar->AddTool(id, wxEmptyString, *plugins_png_bmp, _("Execute the last used plugin."));
toolbar->AddTool(id, wxEmptyString, *GetBundleSVG(plugins_png_bmp, "plugins.svg", wxSize(32, 32)), _("Execute the last used plugin."));
pulldownButton = toolbar->AddMenuPulldownTool(MNU_PLUGINBUTTONLIST, wxT("Execute Plugin"), wxT("Select a plugin."), popupmenu);
}
}

View file

@ -69,6 +69,7 @@ public:
DECLARE_EVENT_TABLE()
private:
void setresizedpi();
void OnCopy(wxCommandEvent &event);
void OnMouseWheel(wxMouseEvent &event);
void OnGridColSize(wxGridSizeEvent &event);

View file

@ -48,7 +48,7 @@
#include "config.h"
#undef VERSION
#endif
extern wxBitmapBundle* GetBundleSVG(wxBitmap* std, wxString name, wxSize sz);
// Check the wxWidgets config
#if !wxCHECK_VERSION(2, 8, 0)
#error wxWidgets 2.8.0 or higher is required to compile this version of pgAdmin.

View file

@ -12,6 +12,8 @@
#if defined(_WIN32_WCE)
#undef _WIN32_WCE
#endif
#define wxUSE_DPI_AWARE_MANIFEST 2
#define wxUSE_RC_MANIFEST 1
#include <wx/msw/wx.rc>
#include <winver.h>

View file

@ -1920,7 +1920,7 @@ static pgaCollectionFactory cf(&serverFactory, __("Servers"), servers_png_img);
addServerFactory::addServerFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar) : actionFactory(list)
{
mnu->Append(id, _("&Add Server..."), _("Add a connection to a server."));
toolbar->AddTool(id, _("Add Server"), *connect_png_bmp, _("Add a connection to a server."), wxITEM_NORMAL);
toolbar->AddTool(id, _("Add Server"), *GetBundleSVG(connect_png_bmp, "connect.svg", wxSize(32, 32)), _("Add a connection to a server."), wxITEM_NORMAL);
}