MCPcopy Create free account
hub / github.com/cxasm/notepad-- / setCommonStyle

Method setCommonStyle

src/styleset.cpp:67–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void 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
93void StyleSet::setSkin(int id)
94{

Callers

nothing calls this directly

Calls 4

closeMethod · 0.80
nameMethod · 0.80
setColorMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected