Skip to content

Commit

Permalink
Improve qtide dark appearance
Browse files Browse the repository at this point in the history
  • Loading branch information
nrdrinkwater committed Nov 16, 2024
1 parent 0e31f22 commit 564748b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/base/ntabs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ extern QCompleter *completer;
#include <QPrinterInfo>
#endif
#endif
#ifdef QT68
#include <QStyleHints>
#endif

#include "base.h"
#include "ntabs.h"
Expand Down Expand Up @@ -507,7 +510,15 @@ int Ntabs::tabsaveOK(int index)
// ---------------------------------------------------------------------
void Ntabs::tabsetcolor(int index,bool ifmod)
{
#ifdef QT68
if(Qt::ColorScheme::Dark == QGuiApplication::styleHints()->colorScheme()) {
tabBar()->setTabTextColor(index,ifmod ? Qt::red : Qt::white);
} else {
tabBar()->setTabTextColor(index,ifmod ? Qt::red : Qt::black);
}
#else
tabBar()->setTabTextColor(index,ifmod ? Qt::red : Qt::black);
#endif
}

// ---------------------------------------------------------------------
Expand Down

0 comments on commit 564748b

Please sign in to comment.