It was possible for the recursion to occur if mi.deepcopy() was called after (un)safe_format(). Change the state save/restore mechanism to ensure all instance variables are restored to base settings.
Move custom drawing of splitter handle into the style where it belongs.
This means all splitters now use the custom handle without needing to
sprinkle a special class everywhere.
Note that this only works when using the calibre style not the system
one. This is by design, since we do not want to override drawing of
"system" components.
- Improve rendering of splitter handle using fewer, closer spaced,
circular dots
- Fix book details splitter not being rendered correctly on first start
when there is no saved state to restore
- Remove geometry save/restore of splitter as this is handled by
restore_state
- Remove call to setChildrenCollapsible before any children were added,
causing Qt to print an error to stderr
Fixes#1994065 [Enhancement Request: Details pane: Splitter between cover and details](https://bugs.launchpad.net/calibre/+bug/1994065)
This is a rather invoved PR. I first looked at putting a splitter in book details, and decided to in the process fix something that has bothered me for years. On Windows in light mode I can't see the splitter handles. In dark mode I can, but I run in light mode and don't want to change. This PR adds a custom QSplitterHandle class that draws the handle depending on the palatte.
The PR includes changes for the splitters in classes I know how to test: the main UI, Pinned columns, QuickView, Edit metadata, tweak books, single download metadata, Check library, Book info, and (of course) Book details.
Also indicate when the debugger is waiting for the 'Go' button. This fixes problems when people don't notice they have checked the Enable breakpoints box.
The major change is using a new class SearchToolBar to mimic a ToolBar. This lets the BarsManager treat the SearchToolBar as a "normal" toolbar. This fixed the two problems reported in this bug report.
In addition I fixed:
- "Mark Books" to install its event listener on SearchToolBar buttons.
- SavedSearchs to find SearchToolBar buttons when using keyboard shortcuts.
- Prevent the location manager and the donate action from being added to the SearchToolBar.