Commit 2fcf2ac5 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Added a FakeVim color theme

Specially for FakeVim users out there who want an easy way to switch to
vim's default color theme on a dark brackground.

Also did a little cleanup.
parent 151366df
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="FakeVim (dark)">
<!--
Based on the default vim theme for a dark background, Linux console colors.
-->
<style name="AddedLine" foreground="#55ffff"/>
<style name="RemovedLine" foreground="#ff5555"/>
<style name="Comment" foreground="#55ffff"/>
<style name="CurrentLine" background="#232323"/>
<style name="CurrentLineNumber" foreground="#aaaaaa" bold="true"/>
<style name="DiffFile" foreground="#55ff55"/>
<style name="DiffLocation" foreground="#ffff55"/>
<style name="DisabledCode" foreground="#777777"/>
<style name="Doxygen.Comment" foreground="#55ffff"/>
<style name="Doxygen.Tag" foreground="#00a0a0"/>
<style name="Keyword" foreground="#ffff55"/>
<style name="Label" foreground="#ffff55"/>
<style name="LineNumber" foreground="#888888" background="#232323"/>
<style name="Link" foreground="#0055ff"/>
<style name="Number" foreground="#ff55ff"/>
<style name="Occurrences" background="#363636"/>
<style name="Occurrences.Rename" foreground="#ffaaaa" background="#553636"/>
<style name="Operator" foreground="#aaaaaa"/>
<style name="Parentheses" foreground="#ff5555" background="#333333"/>
<style name="Preprocessor" foreground="#5555ff"/>
<style name="SearchResult" background="#555500"/>
<style name="SearchScope" background="#222200"/>
<style name="Selection" foreground="#000000" background="#aaaaaa"/>
<style name="String" foreground="#ff55ff"/>
<style name="Text" foreground="#aaaaaa" background="#000000"/>
<style name="Type" foreground="#55ff55"/>
</style-scheme>
......@@ -28,6 +28,8 @@
SearchResult
SearchScope
Selection
Occurrences
Occurrences.Rename
-->
</style-scheme>
......@@ -223,7 +223,7 @@ void Qt4ProjectFile::modified(Core::IFile::ReloadBehavior *)
}
/*!
/class Qt4Project
\class Qt4Project
Qt4Project manages information about an individual Qt 4 (.pro) project file.
*/
......
......@@ -37,7 +37,6 @@
using namespace TextEditor;
static const char *trueString = "true";
static const char *falseString = "false";
// Format
......@@ -69,13 +68,6 @@ void Format::setItalic(bool italic)
m_italic = italic;
}
static QString colorToString(const QColor &color)
{
if (color.isValid())
return color.name();
return QLatin1String("invalid");
}
static QColor stringToColor(const QString &string)
{
if (string == QLatin1String("invalid"))
......@@ -89,19 +81,6 @@ bool Format::equals(const Format &f) const
m_bold == f.m_bold && m_italic == f.m_italic;
}
QString Format::toString() const
{
const QChar delimiter = QLatin1Char(';');
QString s = colorToString(m_foreground);
s += delimiter;
s += colorToString(m_background);
s += delimiter;
s += m_bold ? QLatin1String(trueString) : QLatin1String(falseString);
s += delimiter;
s += m_italic ? QLatin1String(trueString) : QLatin1String(falseString);
return s;
}
bool Format::fromString(const QString &str)
{
*this = Format();
......@@ -287,8 +266,8 @@ void ColorSchemeReader::readStyle()
bool italic = attr.value(QLatin1String("italic")) == QLatin1String(trueString);
Format format;
format.setForeground(stringToColor(foreground));
format.setBackground(stringToColor(background));
format.setForeground(QColor(foreground));
format.setBackground(QColor(background));
format.setBold(bold);
format.setItalic(italic);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment