MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / changeColor

Method changeColor

shape_plugins/shape/shape.cpp:113–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111void Shape::updateOtherHandlers(Handler*) { }
112
113void Shape::changeColor()
114{
115 animation.setStartValue(m_bodyColor);
116
117 switch (colorState) {
118 case Default:
119 m_bodyColor = App::settings().guiColor(GuiColors::Background).rgb() ^ 0xFFFFFF;
120 m_bodyColor.setAlpha(50);
121 break;
122 case Hovered:
123 m_bodyColor = App::settings().guiColor(GuiColors::Background).rgb() ^ 0xFFFFFF;
124 m_bodyColor.setAlpha(100);
125 break;
126 case Selected:
127 m_bodyColor = QColor(255, 0x0, 0x0, 100);
128 break;
129 case Hovered | Selected:
130 m_bodyColor = QColor(255, 0x0, 0x0, 150);
131 break;
132 }
133
134 animation.setEndValue(m_bodyColor);
135 animation.start();
136}
137
138Node* Shape::node() const { return m_node; }
139

Callers

nothing calls this directly

Calls 1

startMethod · 0.80

Tested by

no test coverage detected