| 65 | } |
| 66 | |
| 67 | void StyleSet::setCommonStyle(QColor foldfgColor_, QColor foldbgColor_, QColor marginsBackgroundColor_, QString colorName) |
| 68 | { |
| 69 | foldfgColor = foldfgColor_; |
| 70 | foldbgColor = foldbgColor_; |
| 71 | marginsBackgroundColor = marginsBackgroundColor_; |
| 72 | |
| 73 | QFile file(":/qss/lightbluestyle.qss"); //qss����:/lightblue.qss |
| 74 | QString styleSheet; |
| 75 | if (file.open(QIODevice::Text | QIODevice::ReadOnly)) |
| 76 | { |
| 77 | styleSheet = file.readAll(); |
| 78 | QPalette palette; |
| 79 | palette.setColor(QPalette::Window, foldbgColor_); |
| 80 | palette.setColor(QPalette::Base, foldbgColor_); |
| 81 | palette.setColor(QPalette::Button, foldbgColor_); |
| 82 | qApp->setPalette(palette); |
| 83 | |
| 84 | if (colorName != "#EAF7FF") |
| 85 | { |
| 86 | styleSheet.replace("#EAF7FF", colorName); |
| 87 | } |
| 88 | qApp->setStyleSheet(styleSheet); |
| 89 | } |
| 90 | file.close(); |
| 91 | } |
| 92 | |
| 93 | void StyleSet::setSkin(int id) |
| 94 | { |