Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a dark mode variant of the default qss #1527

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}