Skip to content

Commit

Permalink
add theme GGG
Browse files Browse the repository at this point in the history
  • Loading branch information
dingjiangfeng committed Aug 11, 2014
1 parent 8662a35 commit ee2e6e2
Show file tree
Hide file tree
Showing 10 changed files with 96 additions and 84 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Makefile.*
*.Debug
*.Release
*.rc
*.zip

debug
release
Expand Down
1 change: 1 addition & 0 deletions QCFramer.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,7 @@
<file>skin/qss/GG.qss</file>
<file>skin/qss/template.qss</file>
<file>skin/qss/GBG.qss</file>
<file>skin/qss/GGG.qss</file>
</qresource>
<qresource prefix="/about">
<file>skin/html/about.html</file>
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ QFramer必将不负您的期望。
+ `自定义系统托盘`: 支持系统托盘关联自定义菜单
+ `自定义悬浮窗`: 支持悬浮窗
+ `自定义left导航条`: 支持随意添加导航条,只需要关联上相应的功能页面,即可根据tab切换页面
+ `自定义皮肤主题`: 内置BB和BW两种主题,提供自定义主题接口,增加脚本qssbuilder.py,根据skin/qss/template.qss模板生成自定义的主题qss文件
+ `自定义皮肤主题`: 内置六种种主题,提供自定义主题接口,增加脚本qssbuilder.py,根据skin/qss/template.qss模板生成自定义的主题qss文件
+ `一键绿色版`: 增加脚本deploywin.py, 用于收集QFramer需要的依赖;
+ `内置QCustomPlot`: 高效2d绘图库
+ 更多的特性等你来挖掘......

####3 下载
+ `source:` https://github.com/dragondjf/QCFramer
+ `windows realease`: http://pan.baidu.com/s/1qWI2lXi
+ `windows realease`: http://pan.baidu.com/s/1kTuqgtx

####4: 快照
![6](doc/v0.21_1.png)
![7](doc/v0.21_2.png)
![8](doc/v0.21_3.png)

![1](doc/v0.24_1.png)
![2](doc/v0.24_2.png)
![3](doc/v0.24_3.png)
![4](doc/v0.24_4.png)
更多主题等你来挖掘...
####5.Contact
+ `Email:` ding465398889@163.com or dragondjf@gmail.com or 465398889@qq.com
+ `Github:` https://github.com/dragondjf/QCFramer
Expand Down
Binary file modified doc/v0.24_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/v0.24_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions functionpages/qssbuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,16 @@ void QssBuilder::setButtonColor(QColor color)
QString style = QString("QPushButton#setColor{background-color: %1;}");
style = style.arg(ctr);
lineedits.at(currentIndex)->setText(ctr);
buttons.at(currentIndex)->setStyleSheet(style);
buttons.at(currentIndex)->setStyleSheet(style);

colorMap[colorLabels[currentIndex]] = ctr;
updateTheme();
}

void QssBuilder::setButtonColor(QString color)
{
colorMap[colorLabels[currentIndex]] = color;
currentIndex = lineedits.indexOf((QLineEdit*)sender());
colorMap[colorLabels[currentIndex]] = color;
QString style = QString("QPushButton#setColor{background-color: %1;}");
style = style.arg(color);
buttons.at(currentIndex)->setStyleSheet(style);
Expand Down
9 changes: 8 additions & 1 deletion mainwindow/thememenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ ThemeMenu::ThemeMenu(QWidget *parent) :

void ThemeMenu::initData()
{
actionNames<< tr("BW")<<tr("BB") << tr("GB")<< tr("GG")<< tr("GBG")<<tr("Custom theme")<<tr("Blank");
actionNames<< tr("BW")<<tr("BB") << tr("GB")<< tr("GG")<< tr("GBG") << tr("GGG") \
<<tr("Custom theme")<<tr("Blank");
}

void ThemeMenu::initUI()
Expand All @@ -61,6 +62,7 @@ void ThemeMenu::initConnect()
connect(actionMaps[tr("GB")], SIGNAL(triggered()), this, SLOT(changeTheme3()));
connect(actionMaps[tr("GG")], SIGNAL(triggered()), this, SLOT(changeTheme4()));
connect(actionMaps[tr("GBG")], SIGNAL(triggered()), this, SLOT(changeTheme5()));
connect(actionMaps[tr("GGG")], SIGNAL(triggered()), this, SLOT(changeTheme6()));
connect(actionMaps[tr("Custom theme")], SIGNAL(triggered()), this, SLOT(changeThemeFromFile()));
connect(actionMaps[tr("Blank")], SIGNAL(triggered()), this, SLOT(changeTheme_blank()));
connect(this, SIGNAL(triggered(QAction*)), this, SLOT(updateCheckedAction(QAction*)));
Expand Down Expand Up @@ -91,6 +93,11 @@ void ThemeMenu::changeTheme5()
setSkinForApp(QString(":/qss/skin/qss/GBG.qss"));
}

void ThemeMenu::changeTheme6()
{
setSkinForApp(QString(":/qss/skin/qss/GGG.qss"));
}

void ThemeMenu::changeTheme_blank()
{
setSkinForApp(QString(""));
Expand Down
1 change: 1 addition & 0 deletions mainwindow/thememenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public slots:
void changeTheme3();
void changeTheme4();
void changeTheme5();
void changeTheme6();
void changeTheme_blank();
void changeThemeFromFile();
void updateCheckedAction(QAction* action);
Expand Down
13 changes: 7 additions & 6 deletions qssbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@


theme_green = {
'main_background_color': "white", # 主窗体背景颜色
'main_background_color': "qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 rgba(11, 158, 12, 255), stop:0.5 rgba(150, 220, 120, 255), stop:1 rgba(11, 158, 12, 255))", # 主窗体背景颜色
'main_background_image': "none",
'nav_background_color': "rgb(94, 183, 38)", # 导航条背景颜色
'main_hover_color': "rgb(127, 199, 82)", # 导航条hover背景颜色
'main_select_color': "rgb(76, 148, 31)", # 导航条select背景颜色
'nav_background_color': "qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(11, 158, 12, 255), stop:1 rgba(150, 220, 120, 255))", # 导航条背景颜色
'main_hover_color': "qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(11, 158, 12, 255), stop:0.5 rgba(150, 220, 120, 255), stop:1 rgba(11, 158, 12, 255))", # 导航条hover背景颜色
'main_select_color': "rgba(11, 158, 12, 255)", # 导航条select背景颜色
'statusBar_background_color': "qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(11, 158, 12, 255), stop:0.5 rgba(150, 220, 120, 255), stop:1 rgba(11, 158, 12, 255))",
'border_separator': "0px solid rgb(0, 206, 161)", # 分割线背景
'Ftitle_color': 'white', # 标题title字体颜色
'Menu_border_left': "5px solid rgb(255, 127, 39)", # 菜单左边界
'AntimationLine_background-color': 'green', # 页面切换时动画进度条的背景颜色
'Label_color': "rgb(255, 127, 39)", # label字体颜色
'Label_color': "white", # label字体颜色
'PushButton_color': "white", # 按钮字体颜色
'PushButton_background_color': "rgb(88, 197, 1)", #按钮背景颜色
'PushButton_Pressed_background_color': "rgb(76, 148, 31)",
Expand Down Expand Up @@ -102,7 +103,7 @@



theme = theme_gradient
theme = theme_green

if __name__ == '__main__':
if len(sys.argv) >= 2:
Expand Down
Loading

0 comments on commit ee2e6e2

Please sign in to comment.