MCPcopy Create free account
hub / github.com/KDE/kdiff3 / initColors

Method initColors

src/difftextwindow.cpp:200–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198 [[nodiscard]] bool hasLineData() const { return m_pLineData != nullptr && !m_pLineData->empty(); }
199
200 void initColors()
201 {
202 if(getWindowIndex() == e_SrcSelector::A)
203 {
204 m_cThis = gOptions->aColor();
205 m_cDiff1 = gOptions->bColor();
206 m_cDiff2 = gOptions->cColor();
207 }
208 else if(getWindowIndex() == e_SrcSelector::B)
209 {
210 m_cThis = gOptions->bColor();
211 m_cDiff1 = gOptions->cColor();
212 m_cDiff2 = gOptions->aColor();
213 }
214 else if(getWindowIndex() == e_SrcSelector::C)
215 {
216 m_cThis = gOptions->cColor();
217 m_cDiff1 = gOptions->aColor();
218 m_cDiff2 = gOptions->bColor();
219 }
220 m_cDiffBoth = gOptions->conflictColor(); // Conflict color
221 }
222
223 [[nodiscard]] QColor thisColor() const { return m_cThis; }
224 [[nodiscard]] QColor diff1Color() const { return m_cDiff1; }

Callers 1

drawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected