MCPcopy Create free account
hub / github.com/NetHack/NetHack / initHighlight

Method initHighlight

win/Qt/qt_icon.cpp:69–78  ·  view source on GitHub ↗

set up the style sheet strings used to specify color for status field labels [done "once", but once for each LabelledIcon that's constructed, so about 30 copies overall with 3.6's status conditions]

Source from the content-addressed store, hash-verified

67// labels [done "once", but once for each LabelledIcon that's constructed,
68// so about 30 copies overall with 3.6's status conditions]
69void NetHackQtLabelledIcon::initHighlight()
70{
71 // note: string "green" is much darker than enum Qt::green
72 // QColor("green") => #00ff00
73 // QColor(Qt::green) => #008000
74 // QColor("green").lighter(150) => #00c000 /* hitpoint bar's green */
75 hl_better = "QLabel { background-color : #00c000 ; color : white }";
76 hl_worse = "QLabel { background-color : red ; color : white }";
77 hl_changd = "QLabel { background-color : blue ; color : white }";
78}
79
80void NetHackQtLabelledIcon::setLabel(const QString &t, bool lower)
81{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected