-
-
Notifications
You must be signed in to change notification settings - Fork 423
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 image comparison features to details dialog #683
Merged
arsenetar
merged 70 commits into
arsenetar:master
from
glubsy:details_dialog_improvements
Oct 28, 2020
Merged
Add image comparison features to details dialog #683
arsenetar
merged 70 commits into
arsenetar:master
from
glubsy:details_dialog_improvements
Oct 28, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The controller singleton acts as a proxy to relay signals from each widget to the other It should help encapsulating things better if we need to use a different class for image viewers in the future.
* setPixmap() now disables the QWidget automatically if the pixmap passed is null. * the controller relays repaint events to the other widget
When swapping images, use getters to hopefully get a reference to each pixmap and swap them within a single slot.
Using a QWidget inside the QScrollArea mostly works but we only move around the pixmap inside the QWidget, not the QWidget itself, which doesn't update scrollbars. Need a better implementation.
* Work around flickering of scrollbars due to GridLayout resizing on odd pixels by disabling the scrollbars while BestFit is active * Also setting minimum column width to work around the issue above. * Avoid updating scrollbar values twice by using a simple boolean lock
* Also fix scaled down pixmap when updating pixmap in the same group * Fix ignoring mouse wheel event when max scale has been reached * Fix toggle scrollbars when asking for normal size
* Needed to ignore the scrollbar changes in the disabled panel, sine a null pixmap would reset the bars to 0 and affect the selected viewer. * Keep view as same scale accross entries from the same group.
* Moved the QToolbar into the image viewer's translation unit. * QAction are still attached to the dialog window for shortcuts to work
* Add splitter in order to hide the details table. * Add a toolbar to the Details Dialog window to allow for better image comparisons: zoom in/out, swap pixmaps in place, best-fit-to-viewport. Scrollbars and viewports are synchronized.
* Fix ME and SE versions of details dialog not displaying their content properly after change to QDockWidget * Add option to toggle titlebar and orientation of titlebar in preferences dialog * Fix setting layout on PE details dialog window while layout already set, by removing the self (parent) reference in constructing the QSplitter
* For some reason the table's height is a few pixel longer on Windows so we work around the issue by adding a small offset to the maximum height hint. * No idea about MacOS yet but this might need the same treatment.
* Use custom icons on platforms which do not provide theme * Old zoom icons credits to "schollidesign" from icon pack Office and Entertainment (GPL licence). * Exchange icon credit to Jason Cho (Unknown license). * Use hack to resize viewers on first show() as well
* Jason Cho gave his express permission to use the icon (it was made 10 years ago and he doesn't have the source files anymore) * Used waifu2x to upscale the icon * Used GIMP to draw dark outline around the icon * Source files are included
glubsy
force-pushed
the
details_dialog_improvements
branch
from
July 15, 2020 19:30
b71936f
to
8827209
Compare
* If details dialog failed to be created for some reason, avoid crashing by dereferencing a null pointer
* Restore the details dialog dock position if it was previously docked (i.e. not floating). * Since the details_dialog instance was not deleted after closing by default, the previous instances were still saving their own geometry. We now delete them explicitely if we have to recreate a new instance to avoid the signal triggering the callback to save the geometry. * Since restoreGeometry() and saveGeometry() are only called in our QDockWidget, it should be safe to modify the methods for the Preferences class (in qtlib).
* Avoid attempting to add a QLayout to DetailsDialog which already has a layout by removing superfluous layout setup.
* On Linux, even with 1 pixel size, the button is filled entirely with the color selected * On MacOS, the color pixmap stays at 1 pixel so we hard code the size to 16x16
@glubsy, the tab PR is merged so you can work out the conflicts here when you get a chance. |
* We use GroupBoxes to group items together and surround them in a frame * Remove separator lines to avoid cluttering * Adjust columns and their stretch factors for better alignment of buttons
QFormLayout should adhere to each platform's style better. It also simplifies the code a bit since we don't have to setup the labels, etc.
* It seems that stretching the last section automatically is a bit inconvenient on MacOS as it will grow beyond the window border. * Keep it as it was before for now until a better solution is devised.
* Use QGroupBox to keep items together on the display tab in the preference dialog just like for the other options. * It is probably not be necessary to keep these as class members
I think we're good here, not much to add anymore for now. We might need to start considering releasing 4.0.5 soon. ;) |
* The close button on custom tabs cannot be hidden on MacOS for some reason. * Prevent the directories tab from closing if the close button was clicked by mistake
* Whenever the Result Window already existed and its tab was in second position, and if the ignore list tab was in 3rd position, asking to show the Result window through the View menu would add a new tab and push the Result tab to the third position (ignore list tab would then become 2nd position). * Fix view menu Directories entry not switching to index "0" in custom tab bar.
* When right clicking on image viewers while they are docked, the context menu of the Results window showed up. * This also enables capture of right click and middle click buttons to drag around images, which solves a conflict with some theme engines that enable left mouse button click to drag a window's position regardless of where the event happens, hence blocking the panning. * Probably unnecessary to check which button is released.
arsenetar
reviewed
Oct 27, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed these changes, had a few minor items.
* Moved credits to CREDITS file * Updated exchange icon with higher hue contrast for better visibility on dark backgrounds
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
comparisons: zoom in/out, swap pixmaps in place, best-fit-to-viewport.
Scrollbars and viewports are synchronized.
Notes about the patch:
Screencast video demonstration of the implemented features.