windows

macOS

linux

source

I had a great week. I mostly cleaned code, moving old wx definitions and calculations up to Qt format, fixing bugs and colours along the way. There is not much significantly new this week, but I am happy to have cleared out some behind-the-scenes mess.

gif and mpv.conf

Some gifs have metadata that says ‘play this once’ or 'play this five times’ rather than looping infinitely. Hydrus now parses this information, and if you tell it to under options->media, it will obey it.

MPV is extremely configurable. It uses a file called 'mpv.conf’ to load its settings. Hydrus has a very bare conf file at the moment, but I expect to expand it as we experiment more with settings that are useful for hydrus. Now you can set the path of the mpv.conf file you want to use, again under options->media. I have added three test mpv.conf files to the hydrus static directory–one for high quality, and two for different kinds of audio normalisation–if you are interested in this subject, or if you have your own mpv.conf files you would like to experiment with, please give them a go and let me know what you think. Once we know what works well for different situations, I will make some more well-rounded profiles for users to choose from.

misc code cleanup notes

You can now edit how fast the mouse cursor autohides on the media viewer, including turning autohide off completely. Yet again, under “options->media”. The default is 700ms.

The window positioning and sizing system has had several calculation improvements, and it will also now be better at rescuing off-screen windows (for instance if you have a multi-monitor setup that changes between client boots), all with better error handling. Furthermore, some windows like the splash screen–which finally has fixed colours–will now appear on the monitor your mouse is on. If you have had problems with window positioning or sizing, particularly if you have an unusual desktop or multi-monitor setup, let me know if this improves or worsens your situation.

If you are interested in editing your own hydrus QSS stylesheet, please check the install_dir/static/qss directory again this week. I have moved many of the previously hardcoded colours in the client (like green/red dialog button labels) to a new 'default_hydrus.qss’ file. This file is loaded by hydrus, and is prepended to any custom stylesheet. You can add these hydrus-specific qss class definitions to your own qss to overwrite them. I expect to continue migrating hardcoded colours to this file in future.

full list

gifs and mpv:

the client now parses gifs for loop count metadata (some gifs say they should only be played x times through, usually 1). options->media now has a checkbox to control whether this value should be obeyed. both the native viewer and the mpv viewer should follow this. default value is still to loop indefinitely

if gifs are set to play with the mpv player, those without duration will now still be loaded in the native image viewer. the media viewing options ui now notes this

the mpv.conf file used in the mpv window can now be changed under options->media. it _should_ update the conf for all open mpv players on options dialog ok. added to the hydrus static mpv-conf directory are three new 'test’ mpv confs for high quality and two audio normalisation tests. all test feedback and recommended conf info is welcome

.

ui cleanup and improvements:

the media viewer mouse autohide time is now customisable under options->media, including disabling it completely. it defaults to 700ms

improved the timing and reliability of the media viewer mouse autohide code

the mouse should now never autohide while a dialog is open

improved the bad colours of the splash screen. it should now be all one colour now, no ugly stand-out white square or other hardcoded colours. hydev also deployed his unparalleled gimp skills to get a white fade around the transparent-background hydrus icon, so it should look correct in darkmodes as well

created a default_hydrus.qss file in the qss folder in order to handle formerly hardcoded colours using hydrus-specific classnames and properties. as well as being loaded by default, this qss file is prepended to any custom stylesheet, so any custom stylesheet that includes its own versions of the hydrus-specific entries will override the defaults. this qss will get more work in future

added on/off buttons to hydrus default qss and converted existing object to use class and properties to obey this

added a variety of valid/invalid/warning text colours to hydrus default qss and converted existing text objects to use classnames to obey this

added accept/cancel buttons to hydrus default qss and converted all green/red buttons across the program to use classnames to obey this

the migrate database dialog now has an outright 'remove location’ button to reduce confusion and speed up removal of high weight locations

if a location does not exist on the migrate database dialog, it will now stop throwing multiple error popups every time the list slightly changes, and will complain if file rebalancing is attempted, and will provide different 'remove’ yes/no messages if that missing location currently has files or not

slight ui touch-ups to the migrate database dialog

if a window that remembers its position attempts to re-position to a location not on a current display, the windowing system now attempts to rescue it to the primary display, with appropriate popup messages given and errors caught more gracefully

extended these off-screen rescue calls to windows that pull their position from their parent. e.g. if you open the options dialog while the main gui is half over the left side of your screen, it should rescue to the primary display

windows that position off the center of their parent now calculate that reliably on the parent window, not just the parent widget, which never really worked as intended

windows that have no position memory and no parent to pull center/topleft position from will now appear center/topleft of the monitor your mouse is on

the splash screen now appears centered on the monitor your mouse is on

cleaned up and improved a bunch of window/screen coodinate code, moving 'space on screen’ calculations to 'space on screen minus taskbar’ and similar

unified a 'dialog is open’ check across the program

cleaned up the old wx->Qt size, coordinate, and colour conversion code

cleaned up some old wx->Qt calculation code

improved 'light’ and 'grey’ colour detection code to now work in HSV

improved colour changing code to now work in HSV

improved some internal single-shot scheduled job code

next week

Next week is a 'small jobs’ week. I want to fix bugs, improve some ui, maybe add some new shortcut actions and other small features.