Repository navigation
Development - #32
Merged
Merged
Development#32
Conversation
Pictures can be dragged onto a clade in the tree (which highlights the clade it will go to), onto the side panel (the selected clade), or into the Edit and Add boxes, where they can also be pasted or picked with "Add pictures…". The side panel shows them as thumbnails; clicking or double-clicking one opens a viewer with previous/next and Remove. Every change is a normal undoable edit. Pictures are stored in the cladogram file as an optional "images" list of PNG or JPEG data URLs, so a tree stays one self-contained file that both apps read. They are scaled to at most 1200 px and saved as JPEG (quality 85), or PNG when they have transparency. On the desktop, undo snapshots copy the pictures, so the history now also keeps to a 256 MB budget of picture data besides its 200 steps.
The picture viewer now fills the screen, on a black background, with the picture scaled to fit and rescaled when the window changes size; Previous, Next, Remove and Close stay along the bottom, and Esc closes it. On the desktop the window is maximised and also sized to the screen, so it fills it without a window manager too.
The picture viewer is now the size of the edit box instead of full screen. Opened from the edit box, it takes its exact place and the edit box, with anything typed in it, comes back when the viewer closes; opened from the side panel it is the same size, centred. The picture is still scaled to fit the window. In the add box, Ctrl+Tab adds the clade and starts a sister, from the name or the info, and plain Tab moves to the info box as usual. Browser tabs keep Ctrl+Tab for switching tabs, so on the web it works in the installed app; in a tab the "Add, then a sister" button does the same.
Shift+Tab, from the name or the info, adds the clade and starts a sister; it works in browser tabs as well as the apps. Tab still moves to the info box.
Thumbnails in the side panel and in the edit and add boxes now open the viewer on one click, as on the web.
Every thumbnail, in the side panel and in the edit and add boxes, has a little white x in a black circle in its top right corner that removes the picture. The panel's hint, the "Remove picture" button and the viewer's Remove and Close buttons are gone. The viewer closes with a slightly larger black x in a translucent grey circle on the picture's top right corner, or with Esc. With several pictures, round arrows on the picture's sides (and the arrow keys) step through them, and "2 of 3" shows below; with one, neither appears. On the desktop the thumbnail list is now as tall as the rows it fills, up to two, so a few pictures no longer need scrolling.
In the edit and add boxes the pictures are now a single row that scrolls sideways, with a scroll bar, a horizontal swipe, or an ordinary mouse wheel. Adding a picture scrolls to it. The side panel keeps its rows.
Small grey round arrows sit on the middle of the carousel's left and right edges. Each shows only while the row can scroll its way, and moves it by one picture, lining the next (or previous) picture up with the start.
Recent Qt versions refuse QObject::findChild on classes without Q_OBJECT. The thumbnail's click filter was looked up again with findChild only to install it; keep the pointer instead.
The viewer is now about 1.22 times the edit box's width and height, centred on it, and kept within the window or screen. Opened from the side panel it is 1.5 times the area of a standard edit box.
This file contains hidden or 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
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.
No description provided.