Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 84e10d51 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

UI: A much better close button

parent f08e1913
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!10UI improvements
......@@ -39,7 +39,7 @@
using namespace Vivy;
MainWindow::MainWindow() noexcept
: Window(QIcon(":icons/vivy.png"), "Vivy")
: Window(QIcon(VIVY_ICON_APP), "Vivy")
{
/* Some declarations */
DCL_MENU(file, "&File");
......
......@@ -19,7 +19,7 @@ TitleBar::TitleBar(const QIcon &icon, const QString &title, QWidget *parent) noe
auto *iconLabel = new QLabel(this); // Index 0
titleLabel = new QLabel("<h2>" + title + "</h2>", this); // Index 1
auto *closeButton = new QPushButton(parent == nullptr ? "Quit" : "Close", this);
auto *closeButton = new QPushButton(this);
connect(closeButton, &QAbstractButton::clicked, this,
[=, this]() noexcept -> void { emit closed(); });
......@@ -30,15 +30,9 @@ TitleBar::TitleBar(const QIcon &icon, const QString &title, QWidget *parent) noe
closeButton->setFlat(true);
closeButton->setDefault(false);
closeButton->setStyleSheet("color: #1394B4;"
"font-size: 14px;"
"border-color: #1394B4;"
"border-width: 1px;"
"border-radius: 2px;"
"padding-top: 2px;"
"padding-bottom: 2px;"
"padding-left: 5px;"
"padding-right: 5px;"
"border-style: solid;");
"border: none;"
"icon: url(" VIVY_ICON_CLOSE ");"
"icon-size: 22px;");
titleLayout->addWidget(iconLabel);
titleLayout->addWidget(titleLabel);
......
......@@ -145,7 +145,7 @@ VivyDocumentView::closeDocument() noexcept
QIcon
VivyDocumentView::getDocumentTabIcon() const noexcept
{
return QIcon(":/icons/vivy.png");
return QIcon(VIVY_ICON_APP);
}
void
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter