diff options
| author | Alexander Golubev <fatzer2@gmail.com> | 2026-03-17 06:10:05 +0300 |
|---|---|---|
| committer | Alexander Golubev <fatzer2@gmail.com> | 2026-03-17 07:26:29 +0300 |
| commit | 4c386eca2a5a0c4bdf5a110bd56a1aab38ab2510 (patch) | |
| tree | c03e114948fb124a46fe8cbd5edd598874b9e356 /src/logviewer.cpp | |
| parent | 06fc4cf2b1fc36d3baa64e24ec871918d112d7c5 (diff) | |
| download | soundkonverter-Fat-Zer/fix/hardcoded-colors.tar.gz soundkonverter-Fat-Zer/fix/hardcoded-colors.zip | |
Calculate UI colors to mark items in listsFat-Zer/fix/hardcoded-colors
Before that to mark currently processing/queued files predefined colors
were used. This were creating problems especially in darker with
schemas where white next was basically unreadable. Instead of using a
predefined color it now shifts the default color towards red/yellow.
Note: this solution ignores edge case of purely yellow/red backgrounds.
Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/soundkonverter/issues/34
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'src/logviewer.cpp')
| -rw-r--r-- | src/logviewer.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/logviewer.cpp b/src/logviewer.cpp index 21f9881..f965592 100644 --- a/src/logviewer.cpp +++ b/src/logviewer.cpp @@ -1,6 +1,7 @@ #include "logviewer.h" #include "logger.h" +#include "filelist.h" //< for color shift functions #include <tqlayout.h> #include <tqstring.h> @@ -33,28 +34,17 @@ LogViewerItem::~LogViewerItem() void LogViewerItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { - // NOTE calculate the red color - - TQColorGroup _cg( cg ); - TQColor c; - - if( isSelected() && converting ) { - _cg.setColor( TQColorGroup::Highlight, TQColor( 215, 62, 62 ) ); - TQListViewItem::paintCell( p, _cg, column, width, alignment ); - return; - } - else if( converting && column != listView()->sortColumn() ) { - _cg.setColor( TQColorGroup::Base, TQColor( 255, 234, 234 ) ); - TQListViewItem::paintCell( p, _cg, column, width, alignment ); - return; - } - else if( converting && column == listView()->sortColumn() ) { - _cg.setColor( TQColorGroup::Base, TQColor( 247, 227, 227 ) ); + if( converting ) { + TQColorGroup _cg( cg ); + if ( isSelected() ) { + _cg.setColor( TQColorGroup::Highlight, shiftColorToRed(_cg.highlight(), 40) ); + } else { + _cg.setColor( TQColorGroup::Base, shiftColorToRed(backgroundColor(column), 40)); + } TQListViewItem::paintCell( p, _cg, column, width, alignment ); - return; + } else { + TDEListViewItem::paintCell( p, cg, column, width, alignment ); } - - TDEListViewItem::paintCell( p, _cg, column, width, alignment ); } |
