diff --git a/runtime/BrowserWindow.cpp b/runtime/BrowserWindow.cpp index 4d0aea38b..3d9ba3487 100644 --- a/runtime/BrowserWindow.cpp +++ b/runtime/BrowserWindow.cpp @@ -362,19 +362,22 @@ void BrowserWindow::urlLinkClicked(const QUrl &name) m_toolBtnBack = new QToolButton(m_widget); m_toolBtnBack->setFixedHeight(PGA_BTN_SIZE); m_toolBtnBack->setFixedWidth(PGA_BTN_SIZE); - m_toolBtnBack->setText(PGA_BTN_BACK); + m_toolBtnBack->setIcon(QIcon(":/back.png")); + m_toolBtnBack->setToolTip(tr("Go back")); m_toolBtnBack->setDisabled(true); m_toolBtnForward = new QToolButton(m_widget); m_toolBtnForward->setFixedHeight(PGA_BTN_SIZE); m_toolBtnForward->setFixedWidth(PGA_BTN_SIZE); - m_toolBtnForward->setText(PGA_BTN_FORWARD); + m_toolBtnForward->setIcon(QIcon(":/forward.png")); + m_toolBtnForward->setToolTip(tr("Go forward")); m_toolBtnForward->setDisabled(true); QPushButton *m_btnClose = new QPushButton(m_widget); - m_btnClose->setText(PGA_BTN_CLOSE); m_btnClose->setFixedHeight(PGA_BTN_SIZE); m_btnClose->setFixedWidth(PGA_BTN_SIZE); + m_btnClose->setIcon(QIcon(":/close.png")); + m_btnClose->setToolTip(tr("Close tab")); m_horizontalLayout = new QHBoxLayout(m_widget); m_horizontalLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); diff --git a/runtime/TabWindow.cpp b/runtime/TabWindow.cpp index 85c21356d..7b554d43f 100644 --- a/runtime/TabWindow.cpp +++ b/runtime/TabWindow.cpp @@ -97,7 +97,7 @@ void TabWindow::enableDisableToolButton(const int &index) toolBtnPtr = dynamic_cast(widgetPtr); if (webviewPtr != NULL && toolBtnPtr != NULL) { - if (!QString::compare(toolBtnPtr->text(), PGA_BTN_BACK, Qt::CaseInsensitive)) + if (!QString::compare(toolBtnPtr->toolTip(), tr("Go back"), Qt::CaseInsensitive)) { if (webviewPtr->page()->history()->canGoBack()) toolBtnPtr->setDisabled(false); @@ -105,7 +105,7 @@ void TabWindow::enableDisableToolButton(const int &index) toolBtnPtr->setDisabled(true); } - if (!QString::compare(toolBtnPtr->text(), PGA_BTN_FORWARD, Qt::CaseInsensitive)) + if (!QString::compare(toolBtnPtr->toolTip(), tr("Go forward"), Qt::CaseInsensitive)) { if (webviewPtr->page()->history()->canGoForward()) toolBtnPtr->setDisabled(false); diff --git a/runtime/TabWindow.h b/runtime/TabWindow.h index 3af6eb420..c41e0d313 100644 --- a/runtime/TabWindow.h +++ b/runtime/TabWindow.h @@ -15,17 +15,6 @@ #include "pgAdmin4.h" #include "WebViewWindow.h" -// Define button characters -#ifdef _WIN32 -const QString PGA_BTN_FORWARD = QString(">"); -const QString PGA_BTN_BACK = QString("<"); -const QString PGA_BTN_CLOSE = QString("x"); -#else -const QString PGA_BTN_FORWARD = QString("\u2192"); -const QString PGA_BTN_BACK = QString("\u2190"); -const QString PGA_BTN_CLOSE = QString("\u2715"); -#endif - // Define button sizes #ifdef _WIN32 const int PGA_BTN_SIZE = 18; diff --git a/runtime/back.png b/runtime/back.png new file mode 100644 index 000000000..6c1551d14 Binary files /dev/null and b/runtime/back.png differ diff --git a/runtime/close.png b/runtime/close.png new file mode 100644 index 000000000..dc5124f84 Binary files /dev/null and b/runtime/close.png differ diff --git a/runtime/forward.png b/runtime/forward.png new file mode 100644 index 000000000..815a5e1d7 Binary files /dev/null and b/runtime/forward.png differ diff --git a/runtime/pgAdmin4.cpp b/runtime/pgAdmin4.cpp index 75918478b..906bd31ac 100644 --- a/runtime/pgAdmin4.cpp +++ b/runtime/pgAdmin4.cpp @@ -133,6 +133,7 @@ int main(int argc, char * argv[]) // Create & show the main window BrowserWindow browserWindow(appServerUrl); browserWindow.setWindowTitle(PGA_APP_NAME); + browserWindow.setWindowIcon(QIcon(":/pgAdmin4.ico")); browserWindow.show(); // Go! diff --git a/runtime/pgAdmin4.ico b/runtime/pgAdmin4.ico new file mode 100644 index 000000000..3fcebafdc Binary files /dev/null and b/runtime/pgAdmin4.ico differ diff --git a/runtime/pgAdmin4.pro b/runtime/pgAdmin4.pro index 1848f4e76..a33a3a84c 100644 --- a/runtime/pgAdmin4.pro +++ b/runtime/pgAdmin4.pro @@ -42,3 +42,6 @@ QMAKE_INFO_PLIST = Info.plist cache() +RESOURCES += \ + pgadmin4.qrc + diff --git a/runtime/pgAdmin4.qrc b/runtime/pgAdmin4.qrc new file mode 100644 index 000000000..8bb4586d9 --- /dev/null +++ b/runtime/pgAdmin4.qrc @@ -0,0 +1,8 @@ + + + pgAdmin4.ico + back.png + forward.png + close.png + +