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

e621 style tweaks #1647

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
23 changes: 20 additions & 3 deletions hydrus/client/gui/lists/ClientGUIListBoxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2091,9 +2091,12 @@ def _Redraw( self, painter ):

bg_colour = self._GetBackgroundColour()

painter.setBackground( QG.QBrush( bg_colour ) )

painter.eraseRect( painter.viewport() )
if self._draw_background:

painter.setBackground( QG.QBrush( bg_colour ) )

painter.eraseRect( painter.viewport() )


if len( self._ordered_terms ) == 0:

Expand Down Expand Up @@ -2846,6 +2849,8 @@ def __init__( self, parent, *args, tag_display_type: int = ClientTags.TAG_DISPLA
self._sibling_connector_namespace = CG.client_controller.new_options.GetNoneableString( 'sibling_connector_custom_namespace_colour' )


self._draw_background = True

self._UpdateBackgroundColour()

CG.client_controller.sub( self, 'ForceTagRecalc', 'refresh_all_tag_presentation_gui' )
Expand Down Expand Up @@ -4043,6 +4048,18 @@ def set_htl_background( self, colour ):

htl_background = QC.Property( QG.QColor, get_htl_background, set_htl_background )

def get_draw_background( self ):

return self._draw_background


def set_draw_background( self, draw_background ):

self._draw_background = draw_background


draw_background = QC.Property( bool, get_draw_background, set_draw_background )


class ListBoxTagsPredicates( ListBoxTags ):

Expand Down
18 changes: 8 additions & 10 deletions hydrus/client/gui/pages/ClientGUIMediaResultsPanelThumbnails.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,24 +252,22 @@ def _DrawCanvasPage( self, page_index, canvas_page ):
bg_colour = ClientGUIFunctions.GetLighterDarkerColour( bg_colour )


comp_mode = painter.compositionMode()

painter.setCompositionMode( QG.QPainter.CompositionMode_Source )

if new_options.GetNoneableString( 'media_background_bmp_path' ) is not None:

comp_mode = painter.compositionMode()

painter.setCompositionMode( QG.QPainter.CompositionMode_Source )

painter.setBackground( QG.QBrush( QC.Qt.GlobalColor.transparent ) )

painter.eraseRect( painter.viewport() )

painter.setCompositionMode( comp_mode )

else:

painter.setBackground( QG.QBrush( bg_colour ) )

painter.eraseRect( painter.viewport() )


painter.eraseRect( painter.viewport() )

painter.setCompositionMode( comp_mode )

#

Expand Down
86 changes: 26 additions & 60 deletions static/qss/e621.qss
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@
An e621.net-inspired style/theme for Hydrus.
Created by IchHabs in February 2024.

Please enable darkmode and consider using the following colors:
- Thumbnail Background:
- local, normal: #152f56
- local, selected: #25477b
- not local, normal: #a0522d
- not local, selected: #ed5d1f
- Thumbnail Border:
- local, normal: #152f56
- local, selected: #b4c7d9
- not local, normal: #a0522d
- not local, selected: #b4c7d9
- Thumbnail Grid Background: #020f23
- Autocomplete Background: #ffffcc
- Media Viewer Background: #020f23
- Media Viewer Text: #b4c7d9
- Tabs Box Background: #152f56

If you want to change your tag namespace colors as well, try these:
- Character: #00aa00
- Copyright: #dd00dd
Expand Down Expand Up @@ -186,6 +169,24 @@ QListView, QListView::item {
padding: 1px;
}

QWidget#HydrusMediaList
{
qproperty-hmrp_background: #020f23;
qproperty-hmrp_thumbnail_local_background_normal: #152f56;
qproperty-hmrp_thumbnail_local_border_normal: #152f56;
qproperty-hmrp_thumbnail_local_background_selected: #25477b;
qproperty-hmrp_thumbnail_local_border_selected: #b4c7d9;
qproperty-hmrp_thumbnail_not_local_background_normal: #a0522d;
qproperty-hmrp_thumbnail_not_local_border_normal: #a0522d;
qproperty-hmrp_thumbnail_not_local_background_selected: #ed5d1f;
qproperty-hmrp_thumbnail_not_local_border_selected: #b4c7d9;
}

QWidget#HydrusTagList
{
qproperty-htl_background: #152f56;
}


/********************************** Buttons ***********************************/

Expand Down Expand Up @@ -579,6 +580,11 @@ QPlainTextEdit#HydrusInvalid {
background: #800000;
}

QWidget#HydrusTagAutocomplete
{
qproperty-hta_background: #ffffcc;
}


/******************************** Progress Bar ********************************/

Expand Down Expand Up @@ -669,50 +675,10 @@ QLocatorResultWidget#selectedLocatorResult {
border-bottom: 1px solid#2b538e;
}


/*

Here is more hydev added--now we have this tech, I am copying the default 'darkmode' colours in the options to all of the darkmode stylesheets so the default choice for new users isn't the dark/light jank-mix. Stylesheet authors are welcome to fix this up with better colours for their particular style and send them in.

*/


/* The main thumbnail grid. */

QWidget#HydrusMediaList
{
qproperty-hmrp_background: #343434;
qproperty-hmrp_thumbnail_local_background_normal: #404048;
qproperty-hmrp_thumbnail_local_border_normal: #91a3b0;
qproperty-hmrp_thumbnail_local_background_selected: #708090;
qproperty-hmrp_thumbnail_local_border_selected: #dfe3e6;
qproperty-hmrp_thumbnail_not_local_background_normal: #400d02;
qproperty-hmrp_thumbnail_not_local_border_normal: #f8d0cc;
qproperty-hmrp_thumbnail_not_local_background_selected: #ab274f;
qproperty-hmrp_thumbnail_not_local_border_selected: #e34234;
}


/* The media viewer. */
/**************************** Hydrus: Media Viewer ****************************/

QWidget#HydrusMediaViewer
{
qproperty-hmv_background: #343434;
qproperty-hmv_text: #708090;
}


/* The tag autocomplete text input. */

QWidget#HydrusTagAutocomplete
{
qproperty-hta_background: #536267;
}


/* Tag lists across the program. */

QWidget#HydrusTagList
{
qproperty-htl_background: #232629;
qproperty-hmv_background: #020f23;
qproperty-hmv_text: #b4c7d9;
}
1 change: 1 addition & 0 deletions static/qss/e621/bg-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading