Skip to content

Commit

Permalink
Perfect dark: remove explict Qt widget coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlebantongying committed Dec 25, 2022
1 parent 7d6b6cc commit 587aad1
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 451 deletions.
13 changes: 5 additions & 8 deletions mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
closeCurrentTabAction.setShortcutContext( Qt::WidgetWithChildrenShortcut );
closeCurrentTabAction.setShortcut( QKeySequence( "Ctrl+W" ) );
closeCurrentTabAction.setText( tr("Close current tab") );
closeCurrentTabAction.setIcon( QIcon(":/icons/closetab-hover.png") );

connect( &closeCurrentTabAction, SIGNAL( triggered() ),
this, SLOT( closeCurrentTab() ) );
Expand Down Expand Up @@ -1226,13 +1225,11 @@ void MainWindow::applyQtStyleSheet( QString const & displayStyle, QString const
css += macCssFile.readAll();
#endif

if ( displayStyle.size() )
{
// Load an additional stylesheet
QFile builtInCssFile( QString( ":/qt-style-st-%1.css" ).arg( displayStyle ) );
if ( builtInCssFile.open( QFile::ReadOnly ) )
css += builtInCssFile.readAll();
}
#if defined(Q_OS_WIN)
QFile winCssFile( ":/qt-style-win.css" );
winCssFile.open( QFile::ReadOnly );
css += winCssFile.readAll();
#endif

// Try loading a style sheet if there's one
QFile cssFile( Config::getUserQtCssFileName() );
Expand Down
32 changes: 0 additions & 32 deletions qt-style-macos.css
Original file line number Diff line number Diff line change
@@ -1,32 +0,0 @@
#navToolbar #translateLine
{
margin-top: 1px;
}

#navToolbar GroupComboBox
{
margin-bottom: 1px;
margin-top: 0px;
padding: 2px 18px 2px 4px;
}

#navToolbar GroupComboBox::drop-down {
padding-right: 2px;
border-right: 1px solid darkgray;
}

ScanPopup #translateLine
{
padding: 3px 3px 3px 3px;
}

ScanPopup GroupComboBox
{
margin: 2px 0px 4px 1px;
padding: 1px 18px 1px 4px;
}

ScanPopup GroupComboBox::drop-down {
padding-right: 2px;
border-right: 1px solid darkgray;
}
10 changes: 0 additions & 10 deletions qt-style-st-babylon.css

This file was deleted.

143 changes: 0 additions & 143 deletions qt-style-st-classic.css

This file was deleted.

76 changes: 0 additions & 76 deletions qt-style-st-lingoes-blue.css

This file was deleted.

5 changes: 0 additions & 5 deletions qt-style-st-lingoes.css

This file was deleted.

6 changes: 0 additions & 6 deletions qt-style-st-lingvo.css

This file was deleted.

63 changes: 0 additions & 63 deletions qt-style-st-modern.css

This file was deleted.

6 changes: 6 additions & 0 deletions qt-style-win.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
QTabBar::close-button {
image: url(:/icons/closetab.svg)
}
QTabBar::close-button:hover {
image: url(:/icons/closetab-hover.png)
}
Loading

0 comments on commit 587aad1

Please sign in to comment.