Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix misleading indentation warnings caused by messy qtermwidget code …
…formatting
  • Loading branch information
nyalldawson committed Nov 22, 2016
1 parent dc82ad4 commit ee80be4
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/plugins/grass/qtermwidget/CharacterColor.h
Expand Up @@ -256,16 +256,23 @@ inline bool operator != (const CharacterColor& a, const CharacterColor& b)
inline const QColor color256(quint8 u, const ColorEntry* base)
{
// 0.. 16: system colors
if (u < 8) return base[u+2 ].color; u -= 8;
if (u < 8) return base[u+2+BASE_COLORS].color; u -= 8;
if (u < 8)
return base[u+2].color;
u -= 8;
if (u < 8)
return base[u+2+BASE_COLORS].color;
u -= 8;

// 16..231: 6x6x6 rgb color cube
if (u < 216) return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
if (u < 216)
return QColor(((u/36)%6) ? (40*((u/36)%6)+55) : 0,
((u/ 6)%6) ? (40*((u/ 6)%6)+55) : 0,
((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0); u -= 216;
((u/ 1)%6) ? (40*((u/ 1)%6)+55) : 0);
u -= 216;

// 232..255: gray, leaving out black and white
int gray = u*10+8; return QColor(gray,gray,gray);
int gray = u*10+8;
return QColor(gray,gray,gray);
}

inline QColor CharacterColor::color(const ColorEntry* base) const
Expand Down

0 comments on commit ee80be4

Please sign in to comment.