Commit 300025f7 authored by Dirk Wilden's avatar Dirk Wilden

choose a random baseColor that differs from background

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4824 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d3b2ac9b
......@@ -184,7 +184,6 @@ void Core::slotLoad(QString _filename, DataType _type, int& _id) {
QColor color;
if ( OpenFlipper::Options::randomBaseColor() ){
//init random seed
srand ( time(NULL) );
......@@ -197,7 +196,7 @@ void Core::slotLoad(QString _filename, DataType _type, int& _id) {
diff = (bckgrnd.red() - color.red()) *(bckgrnd.red() - color.red())
+(bckgrnd.green() - color.green())*(bckgrnd.green() - color.green())
+(bckgrnd.blue() - color.blue()) *(bckgrnd.blue() - color.blue());
}while (diff < 25);
}while (diff < 70000);
}
else{
color = OpenFlipper::Options::defaultBaseColor();
......
Markdown is supported
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