Skip to content

Commit

Permalink
Add a dark mode variant of the default qss (#1527)
Browse files Browse the repository at this point in the history
* Simplify default hydrus qss

* Add dark version of default qss
  • Loading branch information
floogulinc authored Mar 16, 2024
1 parent 00c43b6 commit 832b905
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 36 deletions.
40 changes: 4 additions & 36 deletions static/qss/default_hydrus.qss
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,11 @@ QLabel#HydrusValid
color: #008000;
}

QLineEdit#HydrusValid
QLineEdit#HydrusValid, QTextEdit#HydrusValid, QPlainTextEdit#HydrusValid
{
background-color: #80ff80;
}

QTextEdit#HydrusValid
{
background-color: #80ff80;
}

QPlainTextEdit#HydrusValid
{
background-color: #80ff80;
}

/* Duplicates 'middle' text colour */

Expand All @@ -39,20 +30,11 @@ QLabel#HydrusIndeterminate
color: #000080;
}

QLineEdit#HydrusIndeterminate
QLineEdit#HydrusIndeterminate, QTextEdit#HydrusIndeterminate, QPlainTextEdit#HydrusIndeterminate
{
background-color: #000080;
}

QTextEdit#HydrusIndeterminate
{
background-color: #000080;
}

QPlainTextEdit#HydrusIndeterminate
{
background-color: #000080;
}

/* Example: This regex is invalid */

Expand All @@ -61,29 +43,15 @@ QLabel#HydrusInvalid
color: #800000;
}

QLineEdit#HydrusInvalid
{
background-color: #ff8080;
}

QTextEdit#HydrusInvalid
QLineEdit#HydrusInvalid, QTextEdit#HydrusInvalid, QPlainTextEdit#HydrusInvalid
{
background-color: #ff8080;
}

QPlainTextEdit#HydrusInvalid
{
background-color: #ff8080;
}

/* Example: Your files are going to be deleted! */

QLabel#HydrusWarning
{
color: #800000;
}

QCheckBox#HydrusWarning
QLabel#HydrusWarning, QCheckBox#HydrusWarning
{
color: #800000;
}
Expand Down
141 changes: 141 additions & 0 deletions static/qss/default_hydrus_dark.qss
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/*
Default QSS for hydrus. This is prepended to any stylesheet loaded in hydrus.
Copying these entries in your own stylesheets should override these settings.
This will get more work in future.
*/

/*

Here are some text and background colours

*/

/* Example: This regex is valid */

QLabel#HydrusValid
{
color: #2ed42e;
}

QLineEdit#HydrusValid, QTextEdit#HydrusValid, QPlainTextEdit#HydrusValid
{
background-color: #80ff80;
}


/* Duplicates 'middle' text colour */

QLabel#HydrusIndeterminate
{
color: #8080ff;
}

QLineEdit#HydrusIndeterminate, QTextEdit#HydrusIndeterminate, QPlainTextEdit#HydrusIndeterminate
{
background-color: #8080ff;
}


/* Example: This regex is invalid */

QLabel#HydrusInvalid
{
color: #ff7171;
}

QLineEdit#HydrusInvalid, QTextEdit#HydrusInvalid, QPlainTextEdit#HydrusInvalid
{
background-color: #ff8080;
}


/* Example: Your files are going to be deleted! */

QLabel#HydrusWarning, QCheckBox#HydrusWarning
{
color: #ff7171;
}

/*

Buttons on dialogs

*/

QPushButton#HydrusAccept
{
color: #2ed42e;
}

QPushButton#HydrusCancel
{
color: #ff7171;
}

/*

This is the green/red button that switches 'include current tags' and similar states on/off

*/

QPushButton#HydrusOnOffButton[hydrus_on=true]
{
color: #2ed42e;
}

QPushButton#HydrusOnOffButton[hydrus_on=false]
{
color: #ff7171;
}

/*

This is the Command Palette (default Ctrl+P), and specifically the background colour of the item you currently have selected.

*/

QLocatorResultWidget#selectedLocatorResult
{
background-color: palette(highlight);
}

QLocatorResultWidget QWidget
{
background: transparent;
}


/*

Custom Controls

These are drawn by hydev on a blank canvas, so they work a little different.

*/

/*

The scanbar beneath video/audio in the media viewer.

*/

QWidget#HydrusAnimationBar
{
qproperty-hab_border: #000000;
qproperty-hab_background: #606060;
qproperty-hab_nub: #f0f0f0;
}


/*

And this one is odd since we are assigning a colour to <a> html richtext inside a QLabel.
We hack it with hardcoded 'style' attribute in the html in python code.

*/


QLabel#HydrusHyperlink
{
qproperty-link_color: palette(link);
}

0 comments on commit 832b905

Please sign in to comment.