Changing Ted Console Colors?

Monkey Archive Forums/Monkey Discussion/Changing Ted Console Colors?

zoqfotpik(Posted 2014) [#1]
I'm wondering if there's a way to change the Ted compiler output console colors. I run a dark theme to avoid hurting my eyes over long periods of time and that white window is just blinding.


Danilo(Posted 2014) [#2]
You need to recompile TED. I used QT 4.8.5 with it on Mac OS X.

For a quick fix, I just hardcoded the colors. Better you add new color preferences.

mainwindow.cpp changes:
//***** MainWindow *****
//
MainWindow::MainWindow(QWidget *parent) : QMainWindow( parent ),_ui( new Ui::MainWindow ){

    ...

    statusBar()->showMessage( "Ready." );


    //
    // changed by Danilo
    //
    // _projectTreeWidget -> change background and foreground colors
    //
    QPalette pal = _projectTreeWidget->palette();
    pal.setColor(QPalette::Base, QColor(0,0,0) );
    pal.setColor(QPalette::Text, QColor(0,255,0) );
    _projectTreeWidget->setPalette(pal);

    //
    // changed by Danilo
    //
    pal = _consoleTextWidget->palette();
    pal.setColor(QPalette::Base, QColor(0,0,0) );
    pal.setColor(QPalette::Text, QColor(0,255,0) );
    _consoleTextWidget->setPalette(pal);

}

codeeditor.cpp:
CodeEditor::CodeEditor( QWidget *parent ):QPlainTextEdit( parent ),_modified( 0 ){

    _highlighter=new Highlighter( this );

    _codeTreeModel=new QStandardItemModel( 0 );//this );

    _codeTreeView=new QTreeView( 0 );
    _codeTreeView->setHeaderHidden( true );
    _codeTreeView->setModel( _codeTreeModel );

    //
    // by Danilo
    //
    QPalette pal = _codeTreeView->palette();
    pal.setColor(QPalette::Base, QColor(0,0,0) );
    pal.setColor(QPalette::Text, QColor(0,255,0) );
    _codeTreeView->setPalette(pal);

    connect( _codeTreeView,SIGNAL(clicked(QModelIndex)),SLOT(onCodeTreeViewClicked(QModelIndex)) );

    connect( this,SIGNAL(textChanged()),SLOT(onTextChanged()) );
    connect( this,SIGNAL(cursorPositionChanged()),SLOT(onCursorPositionChanged()) );

    connect( Prefs::prefs(),SIGNAL(prefsChanged(const QString&)),SLOT(onPrefsChanged(const QString&)) );

    setLineWrapMode( QPlainTextEdit::NoWrap );

    onPrefsChanged( "" );

    flushExtraSels();
}

It is just a start and quick fix. Foreground color of console output was unreadable
after this changes. I don't use TED anymore, but maybe it helps as a start for your
own changes. ;)


Paul - Taiphoz(Posted 2014) [#3]
If anyone does this on Windows I would love to know how, I have QT Creator 3.0.0 and when I load the ted.pro file and try and build I get about 30 error's


AdamRedwoods(Posted 2014) [#4]
here is my mod, it allows the application shell to change colors, but i don't think i made the output console to change color. (win32 only)
http://monkeycoder.co.nz/Community/posts.php?topic=4740


Paul - Taiphoz(Posted 2014) [#5]
Adam on windows do I need anything extra to get Ted to build ?, looking at that thread you linked I can see I must have tried this 10 months ago and failed then as well, probably with the same errors.


AdamRedwoods(Posted 2014) [#6]
Adam on windows do I need anything extra to get Ted to build ?

it's been a while, but if i recall, just use the Qt Creator and click on the ted.pro file. i did have to make some adjustments to get it to build, but i don't remember what. i think it was mostly pathing.


Paul - Taiphoz(Posted 2014) [#7]
I'm at a loss :/ oh well will just forget about it for now only wanted to tinker with it anyway.


zoqfotpik(Posted 2014) [#8]
Here's my fix. I put a transparent terminal window over it, set the terminal to black background 50 percent transparency, set it to always on top.

That's just how I roll.