feat(qt): industrial rows for the remaining attribute types - #56
Merged
Conversation
Carries on from #54. The design covered floats, ints, bools and the two dropdowns, about 91% of the rows in a Hesiod panel. Everything else fell through to stock, so a panel with a wavenumber or a path in it still had foreign looking rows in the middle of it. New rows: - LinkedSliders for glm::vec2, the 41 Spatial Frequency rows. A heading with a link toggle over two ParamSlider axes, so the rails are literally the same control as the single value rows rather than a copy of them that can drift. The link persists on the attribute state under the key stock already uses, so it survives a selection change. - TextRow for std::string, the 20 SingleLineText and ReadOnlyText rows. Label in the sliders' column and a field running to the right edge, since a text row has no rail to leave room for. Reworked to match, rather than left to stock: - The Path and Brush canvases were stretching to whatever the panel gave them, which on a docked panel meant a 2:3 box for something that represents a square domain. Both are square at every width now. - Range bars draw the same rail and thumb as a normal slider instead of the older two handle renderer, which is why remap looked like it came from a different application. - The gradient picker gets compact actions behind a Files menu, cleaner swatches with the ids moved to tooltips, and a responsive preset grid. - Shared editor chrome moved into editor_style.hpp so the canvases and their button strips stop each inventing their own. Two behaviour fixes that came out of using it: - A slider showed 2 decimals whatever you typed, so entering 0.001 read back as 0.00 and looked like the value had been thrown away. The readout now widens to fit what the value actually needs. - Typing is no longer held to the drag range. Dragging still stops where it did, but a parameter whose rail ends at 64 accepts a typed 512 when the attribute permits it, which is what the rail limit was always meant to mean. Path points can be reordered from the keyboard: hover one, type its position, enter. Positions start at 1 and escape cancels. There was no way to do it at all before. test_editor_controls covers the square canvases across three panel widths. The section and combo suites still pass.
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.
carries on from #54. that one covered floats, ints, bools and the dropdowns,
which is about 91% of the rows in a hesiod panel. everything else was still
falling through to stock, so any node with a wavenumber or a path in it had
foreign looking rows sat in the middle of the industrial ones.
two new row types:
LinkedSliders for glm::vec2, thats the 41 spatial frequency rows. a heading
with a link toggle over two ParamSlider axes, so the rails are literally the
same control as the single value rows rather than a copy that can drift away
from them. the link state persists on the attribute state under the same key
stock already uses so it survives selecting another node and coming back.
TextRow for std::string, the 20 SingleLineText and ReadOnlyText rows. label in
the same column as the sliders and the field runs to the right edge, since a
text row has no rail to leave space for.
then the editors that were already custom but didnt match:
path and brush canvases were stretching to whatever the panel gave them, which
on a docked panel meant a 2:3 box for something that represents a square
domain. both are square at any width now. range bars draw the same rail and
thumb as a normal slider instead of the old two handle renderer, which is why
remap looked like it came from a different app. gradient picker got compact
actions behind a files menu, cleaner swatches with the ids moved to tooltips
and a responsive preset grid. shared editor chrome moved into editor_style.hpp
so the canvases and their button strips stop each inventing their own.
two behaviour things that came out of actually using it:
sliders showed 2 decimals no matter what you typed, so 0.001 read back as 0.00
and looked like the value had been thrown away. the readout widens to fit what
the value needs now. and typing is no longer held to the drag range, dragging
still stops where it did but a rail that ends at 64 will take a typed 512 if
the attribute allows it, which is what the rail limit was always supposed to
mean.
path points can also be reordered from the keyboard now, hover one, type the
position, enter. positions start at 1, esc cancels. there wasnt any way to do
it before.
test_editor_controls covers the square canvases at three panel widths, and the
section and combo suites still pass.