mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-23 15:40:45 -06:00
Further nice-ification of the runtime UI.
This commit is contained in:
parent
f1f09242ed
commit
39e822e846
@ -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);
|
||||
|
@ -97,7 +97,7 @@ void TabWindow::enableDisableToolButton(const int &index)
|
||||
toolBtnPtr = dynamic_cast<QToolButton*>(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);
|
||||
|
@ -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;
|
||||
|
BIN
runtime/back.png
Normal file
BIN
runtime/back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 448 B |
BIN
runtime/close.png
Normal file
BIN
runtime/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 587 B |
BIN
runtime/forward.png
Normal file
BIN
runtime/forward.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 445 B |
@ -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!
|
||||
|
BIN
runtime/pgAdmin4.ico
Normal file
BIN
runtime/pgAdmin4.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
@ -42,3 +42,6 @@ QMAKE_INFO_PLIST = Info.plist
|
||||
|
||||
cache()
|
||||
|
||||
RESOURCES += \
|
||||
pgadmin4.qrc
|
||||
|
||||
|
8
runtime/pgAdmin4.qrc
Normal file
8
runtime/pgAdmin4.qrc
Normal file
@ -0,0 +1,8 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>pgAdmin4.ico</file>
|
||||
<file>back.png</file>
|
||||
<file>forward.png</file>
|
||||
<file>close.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in New Issue
Block a user