Stylesheet support

print
Josef Rokos 9 years ago
parent 8e999c7818
commit 2bb07716b9

@ -2,5 +2,6 @@
<qresource prefix="/">
<file>icons/login_32.png</file>
<file>icons/login_64.png</file>
<file>style.css</file>
</qresource>
</RCC>

@ -18,6 +18,13 @@ MainWindow::MainWindow(QWidget *parent) :
m_loginDialog = new LoginDialog(this);
QFile styleFile(":/style.css");
if (styleFile.open(QIODevice::ReadOnly | QIODevice::Text))
{
this->setStyleSheet(styleFile.readAll());
}
connect(m_loginDialog, &LoginDialog::accepted, [this]{
PermissionService service;
QSharedPointer<User> u = service.loadUser(m_loginDialog->login());

@ -21,6 +21,9 @@
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="navigation" native="true">
<property name="enabled">
@ -53,7 +56,7 @@
<x>0</x>
<y>0</y>
<width>1000</width>
<height>19</height>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">

@ -0,0 +1,16 @@
#navigation {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255));
}
#navigation QPushButton {
color: black;
border: 1px solid #555;
border-radius: 11px;
padding: 5px;
background: qradialgradient(cx: 0.3, cy: -0.4,
fx: 0.3, fy: -0.4,
radius: 1.35, stop: 0 #e3e67e, stop: 1 #f3f5d0);
min-width: 80px;
min-height: 40px;
font: 14px;
}
Loading…
Cancel
Save