From 0e4dc819d84d9bddd3717af244efb155b52811b9 Mon Sep 17 00:00:00 2001 From: Danilo Treffiletti Date: Wed, 28 Jun 2023 11:45:10 +0200 Subject: [PATCH] FIX #135 Commit list is not readable with dark colors schema Do not alter listview palette and use default system palette instead. --- src/common.h | 2 -- src/listview.cpp | 5 ----- src/mainimpl.cpp | 4 ---- src/namespace_def.cpp | 2 -- 4 files changed, 13 deletions(-) diff --git a/src/common.h b/src/common.h index c01c538..44e79bf 100644 --- a/src/common.h +++ b/src/common.h @@ -163,8 +163,6 @@ namespace QGit { extern const QColor DARK_GREEN; // initialized at startup according to system wide settings - extern QColor ODD_LINE_COL; - extern QColor EVEN_LINE_COL; extern QFont STD_FONT; extern QFont TYPE_WRITER_FONT; extern QString GIT_DIR; diff --git a/src/listview.cpp b/src/listview.cpp index f5e7204..1dc9625 100644 --- a/src/listview.cpp +++ b/src/listview.cpp @@ -93,11 +93,6 @@ int ListView::row(SCRef sha) const { void ListView::setupGeometry() { - QPalette pl = palette(); - pl.setColor(QPalette::Base, ODD_LINE_COL); - pl.setColor(QPalette::AlternateBase, EVEN_LINE_COL); - setPalette(pl); // does not seem to inherit application paletteAnnotate - QHeaderView* hv = header(); hv->setStretchLastSection(true); hv->setSectionResizeMode(LOG_COL, QHeaderView::Interactive); diff --git a/src/mainimpl.cpp b/src/mainimpl.cpp index c81097a..2dbcea2 100644 --- a/src/mainimpl.cpp +++ b/src/mainimpl.cpp @@ -65,10 +65,6 @@ MainImpl::MainImpl(SCRef cd, QWidget* p) : QMainWindow(p) { connect(lineEditSHA, SIGNAL(returnPressed()), this, SLOT(lineEditSHA_returnPressed())); connect(lineEditFilter, SIGNAL(returnPressed()), this, SLOT(lineEditFilter_returnPressed())); - // create light and dark colors for alternate background - ODD_LINE_COL = palette().color(QPalette::Base); - EVEN_LINE_COL = ODD_LINE_COL.darker(103); - // our interface to git world git = new Git(this); setupShortcuts(); diff --git a/src/namespace_def.cpp b/src/namespace_def.cpp index 486d7e1..386d0b7 100644 --- a/src/namespace_def.cpp +++ b/src/namespace_def.cpp @@ -136,8 +136,6 @@ const QColor QGit::PURPLE = QColor(221, 221, 255); const QColor QGit::DARK_GREEN = QColor(0, 205, 0); // initialized at startup according to system wide settings -QColor QGit::ODD_LINE_COL; -QColor QGit::EVEN_LINE_COL; QString QGit::GIT_DIR; /*