UI fixes, new titlebar icons
This commit is contained in:
@@ -10,32 +10,7 @@
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">#iconButton, #minimizeButton, #maximizeButton, #closeButton {
|
||||
background-color: transparent;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#minimizeButton:hover, #maximizeButton:hover {
|
||||
border-style: none;
|
||||
background-color: #80c7c7c7;
|
||||
}
|
||||
|
||||
#minimizeButton:pressed, #maximizeButton:pressed {
|
||||
border-style: none;
|
||||
background-color: #80808080;
|
||||
}
|
||||
|
||||
#closeButton:hover {
|
||||
border-style: none;
|
||||
background-color: #e81123;
|
||||
}
|
||||
|
||||
#closeButton:pressed {
|
||||
border-style: none;
|
||||
background-color: #8c0a15;
|
||||
}</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
@@ -201,9 +176,6 @@
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -976,7 +976,7 @@ namespace noggit
|
||||
class font_awesome_button_style : public QWidget
|
||||
{
|
||||
public:
|
||||
font_awesome_button_style(QWidget* parent = nullptr) : QWidget(parent) {};
|
||||
font_awesome_button_style(QWidget* parent = nullptr) : QWidget(parent) { setAccessibleName("font_noggit_button_style");};
|
||||
};
|
||||
|
||||
class font_awesome_icon : public QIcon
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace noggit
|
||||
class font_noggit_button_style : public QWidget
|
||||
{
|
||||
public:
|
||||
font_noggit_button_style(QWidget* parent = nullptr) : QWidget(parent) {};
|
||||
font_noggit_button_style(QWidget* parent = nullptr) : QWidget(parent) { setAccessibleName("font_noggit_button_style"); };
|
||||
};
|
||||
|
||||
class font_noggit_icon : public QIcon
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <noggit/ui/uid_fix_window.hpp>
|
||||
#include <noggit/uid_storage.hpp>
|
||||
#include <noggit/Red/MapCreationWizard/Ui/MapCreationWizard.hpp>
|
||||
#include <noggit/ui/font_awesome.hpp>
|
||||
|
||||
#include <QtGui/QCloseEvent>
|
||||
#include <QtWidgets/QHBoxLayout>
|
||||
@@ -52,18 +53,28 @@ namespace noggit
|
||||
|
||||
createBookmarkList();
|
||||
|
||||
_settings = new settings(this);
|
||||
|
||||
_about = new about(this);
|
||||
|
||||
QWidget *widget = new QWidget(this);
|
||||
Ui::TitleBar titleBarWidget;
|
||||
titleBarWidget.setupUi(widget);
|
||||
_settings = new settings(this);
|
||||
|
||||
_menuBar = menuBar();
|
||||
_menuBar->setNativeMenuBar(false);
|
||||
titleBarWidget.horizontalLayout->insertWidget(1, _menuBar);
|
||||
_menuBar->setMaximumHeight(20);
|
||||
|
||||
|
||||
titleBarWidget.minimizeButton->setIcon(font_awesome_icon(font_awesome::windowminimize));
|
||||
titleBarWidget.minimizeButton->setIconSize(QSize(14, 14));
|
||||
titleBarWidget.minimizeButton->setAccessibleName("titlebar_minimize");
|
||||
titleBarWidget.maximizeButton->setIcon(font_awesome_icon(font_awesome::windowrestore));
|
||||
titleBarWidget.maximizeButton->setAccessibleName("titlebar_maximize");
|
||||
titleBarWidget.maximizeButton->setIconSize(QSize(14, 14));
|
||||
titleBarWidget.closeButton->setIcon(font_awesome_icon(font_awesome::times));
|
||||
titleBarWidget.closeButton->setAccessibleName("titlebar_close");
|
||||
titleBarWidget.closeButton->setIconSize(QSize(16, 16));
|
||||
setMenuWidget(widget);
|
||||
|
||||
QObject::connect(this,
|
||||
|
||||
Reference in New Issue
Block a user