Skip to content

Commit

Permalink
Add style
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed May 17, 2017
1 parent 8a427a6 commit 54143c2
Show file tree
Hide file tree
Showing 18 changed files with 2,170 additions and 119 deletions.
10 changes: 8 additions & 2 deletions Mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,11 @@ int MainWindow::InitMenuStyles()
QMap<QString, QAction*>::iterator it;
m_ActionStyles["Custom"] = m_MenuStyle.addAction(tr("Custom"));
m_ActionStyles["System"] = m_MenuStyle.addAction(tr("System"));
m_ActionStyles["Gradient blue"] = m_MenuStyle.addAction(tr("Gradient blue"));
m_ActionStyles["Blue"] = m_MenuStyle.addAction(tr("Blue"));
m_ActionStyles["Gradient Dark"] = m_MenuStyle.addAction(tr("Gradient Dark"));
m_ActionStyles["Dark"] = m_MenuStyle.addAction(tr("Dark"));

for(it = m_ActionStyles.begin(); it != m_ActionStyles.end(); it++)
{
it.value()->setCheckable(true);
Expand Down Expand Up @@ -597,7 +599,11 @@ void MainWindow::slotActionGroupStyleTriggered(QAction* act)
if(it.key() == "Blue")
CGlobal::Instance()->SetStyleMenu("Blue", ":/sink/Blue");
else if(it.key() == "Dark")
CGlobal::Instance()->SetStyleMenu("Dark", ":/qdarkstyle/style.qss");
CGlobal::Instance()->SetStyleMenu("Dark", ":/sink/Dark");
else if(it.key() == "Gradient blue")
CGlobal::Instance()->SetStyleMenu("Gradient blue", ":/sink/Gradient_blue");
else if(it.key() == "Gradient Dark")
CGlobal::Instance()->SetStyleMenu("Gradient Dark", ":/sink/Gradient_Dark");
else if(it.key() == "Custom")
OpenCustomStyleMenu();
else
Expand Down
3 changes: 3 additions & 0 deletions Resource/Resource.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
</qresource>
<qresource prefix="/sink">
<file alias="Blue">sink/blue.qss</file>
<file alias="Gradient_Dark">sink/Style_Gray.qss</file>
<file alias="Gradient_blue">sink/Style_Blue.qss</file>
<file alias="Dark">sink/dark/style.qss</file>
</qresource>
</RCC>
Loading

0 comments on commit 54143c2

Please sign in to comment.