ui: diverse improvements before release

* hide build file content
* use small buttons in all windows
* new design for start screen
* fixed design for enter license ui
* added spacing to summary
* brighter icons in wizzard
* added template icon for graph
* smoothing for graph icons
* switched error icon to dot
* fixed error message tooltip immediatly disappearing
* menu item for opening documentation
This commit is contained in:
Eberhard Graether
2016-02-22 20:07:26 +01:00
parent e5eb7f2f12
commit 95b4ea4a6c
31 changed files with 60 additions and 35 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

+4
View File
@@ -1,3 +1,7 @@
QLabel {
font-size: 12pt;
}
#licenseField { #licenseField {
font-family: "<setting:font_name>"; font-family: "<setting:font_name>";
font-size: 12pt; font-size: 12pt;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

+4 -4
View File
@@ -65,11 +65,11 @@ QLineEdit:disabled {
#windowButton { #windowButton {
background: white; background: white;
border: 1px solid lightgray; border: 1px solid lightgray;
border-radius: 10px; border-radius: 8px;
color: black; color: black;
font-size: 17pt; padding: 3px 5px 2px;
height: 30px; font-size: 14pt;
width: 140px; min-width: 5em;
} }
#windowButton:hover { #windowButton:hover {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

+7 -4
View File
@@ -1,13 +1,16 @@
#projectButton { #projectButton {
background: white; background: white;
border: 1px solid lightgray; border: 1px solid lightgray;
border-radius: 10px; border-radius: 8px;
font-size: 17pt; color: black;
padding: 3px 5px 2px;
font-size: 14pt;
min-width: 6em;
} }
#projectButton:hover { #projectButton:hover {
background: #2D3F85;
color: white; color: white;
background: #2D3F85;
} }
#recentButton { #recentButton {
@@ -18,7 +21,7 @@
} }
#recentButton:hover { #recentButton:hover {
background-color: rgba(45, 63, 133, 70); background-color: #CFD2E0;
border-radius: 10px; border-radius: 10px;
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

-11
View File
@@ -15,7 +15,6 @@
#include "qt/utility/utilityQt.h" #include "qt/utility/utilityQt.h"
#include "qt/view/QtViewFactory.h" #include "qt/view/QtViewFactory.h"
#include "qt/window/QtMainWindow.h" #include "qt/window/QtMainWindow.h"
#include "qt/window/QtSplashScreen.h"
#include "version.h" #include "version.h"
#include "settings/ProjectSettings.h" #include "settings/ProjectSettings.h"
@@ -49,11 +48,6 @@ int main(int argc, char *argv[])
QPixmap whitePixmap(500, 500); QPixmap whitePixmap(500, 500);
whitePixmap.fill(Qt::white); whitePixmap.fill(Qt::white);
QtSplashScreen* splash = new QtSplashScreen(whitePixmap, Qt::WindowStaysOnTopHint);
splash->setMessage("Loading UI");
splash->setVersion(version.toDisplayString().c_str());
splash->exec(qtApp);
init(); init();
QtCommandLineParser commandLineParser; QtCommandLineParser commandLineParser;
@@ -74,11 +68,6 @@ int main(int argc, char *argv[])
checker.setApp(app.get()); checker.setApp(app.get());
if (splash)
{
delete splash;
}
commandLineParser.parseCommandline(); commandLineParser.parseCommandline();
return qtApp.exec(); return qtApp.exec();
+2 -2
View File
@@ -496,10 +496,10 @@ void QtCodeArea::mouseMoveEvent(QMouseEvent* event)
} }
} }
QToolTip::hideText();
if (!same) if (!same)
{ {
QToolTip::hideText();
setHoveredAnnotations(annotations); setHoveredAnnotations(annotations);
const std::vector<std::string>& errorMessages = m_fileWidget->getErrorMessages(); const std::vector<std::string>& errorMessages = m_fileWidget->getErrorMessages();
+3 -2
View File
@@ -26,11 +26,12 @@ QtStatusBar::QtStatusBar()
m_errorButton.hide(); m_errorButton.hide();
m_errorButton.setFlat(true); m_errorButton.setFlat(true);
m_errorButton.setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
m_errorButton.setStyleSheet("QPushButton { color: #D00000; margin-right: 0; spacing: none; }"); m_errorButton.setStyleSheet("QPushButton { color: #D00000; margin-right: 0; spacing: none; }");
m_errorButton.setIcon(utility::colorizePixmap( m_errorButton.setIcon(utility::colorizePixmap(
QPixmap((ResourcePaths::getGuiPath() + "statusbar_view/octagon.png").c_str()), QPixmap((ResourcePaths::getGuiPath() + "statusbar_view/dot.png").c_str()),
"#D00000" "#D00000"
).scaledToHeight(10)); ).scaledToHeight(12));
addPermanentWidget(&m_errorButton); addPermanentWidget(&m_errorButton);
connect(&m_errorButton, SIGNAL(clicked()), this, SLOT(showErrors())); connect(&m_errorButton, SIGNAL(clicked()), this, SLOT(showErrors()));
+1 -1
View File
@@ -89,7 +89,7 @@ void QtGraphView::initView()
QGraphicsView* view = new QtGraphicsView(widget); QGraphicsView* view = new QtGraphicsView(widget);
view->setScene(scene); view->setScene(scene);
view->setDragMode(QGraphicsView::ScrollHandDrag); view->setDragMode(QGraphicsView::ScrollHandDrag);
view->setRenderHints(QPainter::Antialiasing); view->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
view->viewport()->setCursor(Qt::ArrowCursor); view->viewport()->setCursor(Qt::ArrowCursor);
@@ -33,6 +33,9 @@ QtGraphNodeAccess::QtGraphNodeAccess(TokenComponentAccess::AccessType accessType
case TokenComponentAccess::ACCESS_PRIVATE: case TokenComponentAccess::ACCESS_PRIVATE:
fileName = "private"; fileName = "private";
break; break;
case TokenComponentAccess::ACCESS_TEMPLATE:
fileName = "template";
break;
default: default:
break; break;
} }
@@ -44,6 +47,7 @@ QtGraphNodeAccess::QtGraphNodeAccess(TokenComponentAccess::AccessType accessType
pixmap.scaleToHeight(m_accessIconSize); pixmap.scaleToHeight(m_accessIconSize);
m_accessIcon = new QGraphicsPixmapItem(pixmap.pixmap(), this); m_accessIcon = new QGraphicsPixmapItem(pixmap.pixmap(), this);
m_accessIcon->setTransformationMode(Qt::SmoothTransformation);
} }
} }
@@ -23,6 +23,7 @@ QtGraphNodeExpandToggle::QtGraphNodeExpandToggle(bool expanded, int invisibleSub
const int iconHeight = 4; const int iconHeight = 4;
m_icon = new QGraphicsPixmapItem(this); m_icon = new QGraphicsPixmapItem(this);
m_icon->setTransformationMode(Qt::SmoothTransformation);
QtDeviceScaledPixmap pixmap((ResourcePaths::getGuiPath() + "graph_view/images/arrow.png").c_str()); QtDeviceScaledPixmap pixmap((ResourcePaths::getGuiPath() + "graph_view/images/arrow.png").c_str());
pixmap.scaleToHeight(iconHeight); pixmap.scaleToHeight(iconHeight);
+2 -2
View File
@@ -72,7 +72,7 @@ void QtLicense::setup()
layout->setContentsMargins(25, 100, 25, 30); layout->setContentsMargins(25, 100, 25, 30);
QVBoxLayout* subLayout = new QVBoxLayout(); QVBoxLayout* subLayout = new QVBoxLayout();
subLayout->setContentsMargins(250, 0, 0, 0); subLayout->setContentsMargins(200, 0, 0, 0);
QLabel* licenseName = new QLabel(this); QLabel* licenseName = new QLabel(this);
licenseName->setText(QString::fromLatin1("Enter Licence")); licenseName->setText(QString::fromLatin1("Enter Licence"));
@@ -114,7 +114,7 @@ void QtLicense::setup()
QLabel* linkLabel = new QLabel(this); QLabel* linkLabel = new QLabel(this);
linkLabel->setObjectName("linkLabel"); linkLabel->setObjectName("linkLabel");
linkLabel->setText("<a href=\"http://coati.io/buy-license\">Don't have a license key yet?</a>"); linkLabel->setText("<a href=\"https://coati.io/buy-license\">Don't have a license key yet?</a>");
linkLabel->setOpenExternalLinks(true); linkLabel->setOpenExternalLinks(true);
linkLabel->setGeometry(275, 300, 300, 50); linkLabel->setGeometry(275, 300, 300, 50);
subLayout->addWidget(linkLabel); subLayout->addWidget(linkLabel);
+7
View File
@@ -2,6 +2,7 @@
#include <QApplication> #include <QApplication>
#include <QFileDialog> #include <QFileDialog>
#include <QDesktopServices>
#include <QDockWidget> #include <QDockWidget>
#include <QMenuBar> #include <QMenuBar>
#include <QMessageBox> #include <QMessageBox>
@@ -308,6 +309,11 @@ void QtMainWindow::openSettings()
wizzard->showPreferences(); wizzard->showPreferences();
} }
void QtMainWindow::showDocumentation()
{
QDesktopServices::openUrl(QUrl("https://coati.io/documentation/"));
}
QtSettingsWindow* QtMainWindow::showLicenses() QtSettingsWindow* QtMainWindow::showLicenses()
{ {
QtAboutLicense* licenseWindow = new QtAboutLicense(this); QtAboutLicense* licenseWindow = new QtAboutLicense(this);
@@ -624,6 +630,7 @@ void QtMainWindow::setupHelpMenu()
menuBar()->addMenu(menu); menuBar()->addMenu(menu);
menu->addAction(tr("&About"), this, SLOT(about())); menu->addAction(tr("&About"), this, SLOT(about()));
menu->addAction(tr("Documentation"), this, SLOT(showDocumentation()));
menu->addAction(tr("Licences"), this, SLOT(showLicenses())); menu->addAction(tr("Licences"), this, SLOT(showLicenses()));
if(!isTrial()) if(!isTrial())
+1
View File
@@ -98,6 +98,7 @@ public slots:
QtSettingsWindow* about(); QtSettingsWindow* about();
void openSettings(); void openSettings();
void showDocumentation();
QtSettingsWindow* showLicenses(); QtSettingsWindow* showLicenses();
QtSettingsWindow* enterLicense(); QtSettingsWindow* enterLicense();
+3 -3
View File
@@ -143,7 +143,7 @@ void QtSettingsWindow::setupForm()
populateWindow(form); populateWindow(form);
windowLayout->addWidget(scrollArea); windowLayout->addWidget(scrollArea);
windowLayout->addSpacing(20); windowLayout->addSpacing(25);
showButtons(windowLayout); showButtons(windowLayout);
@@ -160,12 +160,12 @@ void QtSettingsWindow::populateWindow(QWidget* widget)
void QtSettingsWindow::addLogo() void QtSettingsWindow::addLogo()
{ {
QtDeviceScaledPixmap coatiLogo((ResourcePaths::getGuiPath() + "startscreen/logo.png").c_str()); QtDeviceScaledPixmap coatiLogo((ResourcePaths::getGuiPath() + "startscreen/logo.png").c_str());
coatiLogo.scaleToWidth(200); coatiLogo.scaleToWidth(150);
QLabel* coatiLogoLabel = new QLabel(this); QLabel* coatiLogoLabel = new QLabel(this);
coatiLogoLabel->setPixmap(coatiLogo.pixmap()); coatiLogoLabel->setPixmap(coatiLogo.pixmap());
coatiLogoLabel->resize(coatiLogo.width(), coatiLogo.height()); coatiLogoLabel->resize(coatiLogo.width(), coatiLogo.height());
coatiLogoLabel->move(30, 10); coatiLogoLabel->move(30, 25);
} }
void QtSettingsWindow::showButtons(QVBoxLayout* layout) void QtSettingsWindow::showButtons(QVBoxLayout* layout)
+4 -4
View File
@@ -42,13 +42,13 @@ void QtStartScreen::setup()
{ {
m_newProjectButton = new QPushButton("New Project", this); m_newProjectButton = new QPushButton("New Project", this);
m_newProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac m_newProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
m_newProjectButton->setGeometry(30, 495, 140, 30); m_newProjectButton->move(30, 505);
m_newProjectButton->setObjectName("projectButton"); m_newProjectButton->setObjectName("projectButton");
connect(m_newProjectButton, SIGNAL(clicked()), this, SLOT(handleNewProjectButton())); connect(m_newProjectButton, SIGNAL(clicked()), this, SLOT(handleNewProjectButton()));
m_openProjectButton = new QPushButton("Open Project", this); m_openProjectButton = new QPushButton("Open Project", this);
m_openProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac m_openProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
m_openProjectButton->setGeometry(30, 540, 140, 30); m_openProjectButton->move(30, 540);
m_openProjectButton->setObjectName("projectButton"); m_openProjectButton->setObjectName("projectButton");
connect(m_openProjectButton, SIGNAL(clicked()), this, SLOT(handleOpenProjectButton())); connect(m_openProjectButton, SIGNAL(clicked()), this, SLOT(handleOpenProjectButton()));
} }
@@ -58,7 +58,7 @@ void QtStartScreen::setup()
recentProjectsLabel->setObjectName("recentLabel"); recentProjectsLabel->setObjectName("recentLabel");
int position = 290; int position = 290;
QIcon cpp_icon((ResourcePaths::getGuiPath() + "startscreen/icon_cpp.png").c_str()); QIcon cpp_icon((ResourcePaths::getGuiPath() + "icon/project_256_256.png").c_str());
std::vector<FilePath> recentProjects = ApplicationSettings::getInstance()->getRecentProjects(); std::vector<FilePath> recentProjects = ApplicationSettings::getInstance()->getRecentProjects();
for (size_t i = 0; i < recentProjects.size() && i < ApplicationSettings::MaximalAmountOfRecentProjects; i++) for (size_t i = 0; i < recentProjects.size() && i < ApplicationSettings::MaximalAmountOfRecentProjects; i++)
{ {
@@ -74,7 +74,7 @@ void QtStartScreen::setup()
position += 40; position += 40;
} }
resize(600, 600); resize(520, 600);
} }
QSize QtStartScreen::sizeHint() const QSize QtStartScreen::sizeHint() const
@@ -31,7 +31,7 @@ void QtProjectWizzardContentBuildFile::populateForm(QGridLayout* layout, int& ro
case QtProjectWizzardContentSelect::PROJECT_EMPTY: case QtProjectWizzardContentSelect::PROJECT_EMPTY:
name = "Build Text"; name = "Build Text";
filter = "Text (*.txt)"; filter = "Text (*.txt)";
break; return;
case QtProjectWizzardContentSelect::PROJECT_VS: case QtProjectWizzardContentSelect::PROJECT_VS:
name = "Visual Studio Solution"; name = "Visual Studio Solution";
filter = "Visual Studio Solution (*.sln)"; filter = "Visual Studio Solution (*.sln)";
@@ -138,5 +138,5 @@ bool QtProjectWizzardContentSelect::check()
QSize QtProjectWizzardContentSelect::preferredWindowSize() const QSize QtProjectWizzardContentSelect::preferredWindowSize() const
{ {
return QSize(750, 340); return QSize(700, 340);
} }
@@ -41,13 +41,28 @@ void QtProjectWizzardContentSummary::populateWindow(QGridLayout* layout)
row++; row++;
m_data->populateForm(layout, row); m_data->populateForm(layout, row);
layout->setRowMinimumHeight(row, 15);
row++;
int row2 = row;
m_buildFile->populateForm(layout, row); m_buildFile->populateForm(layout, row);
if (row != row2)
{
layout->setRowMinimumHeight(row, 15);
row++;
}
m_source->populateForm(layout, row); m_source->populateForm(layout, row);
layout->setRowMinimumHeight(row, 15);
row++;
m_simple->populateForm(layout, row); m_simple->populateForm(layout, row);
m_headerSearch->populateForm(layout, row); m_headerSearch->populateForm(layout, row);
if (m_frameworkSearch) if (m_frameworkSearch)
{ {
layout->setRowMinimumHeight(row, 15);
row++;
m_frameworkSearch->populateForm(layout, row); m_frameworkSearch->populateForm(layout, row);
} }