Release 0.4

Nathaniel Ngo
Apr 5 · 3 min read

I tackled this issue where the width of the replace input box did not resize along with the rest of the dialog box.

The second box does not resize when the search and replace dialog box resizes.

A colleague suggested I look in the function tryUpdateWidgetWidth() in findWidget.ts because it has to do with controlling the width. There was already code that resizes the width but during execution time, it never seems to reach that part. I checked the value of resized and it was false when the resizing dialog box event was triggered, so it doesn’t resize the input box.

I discussed this with a colleague that it was strange that the resized boolean is false when it was being resized. Then we thought, maybe resized is describing the state of the replace input box, not the search and replace dialog box. That made more sense. This if statement should have been read “Has the replace input box been resized as a response to the user resizing the dialog box?”, instead of “Has the dialog box been resized by the user?” These two questions yield two opposing answers. The answer to the former would be no, while the answer to the latter would be yes.

I added a negation operator.

And it seems to work fine so far.

The next issue I am working on is with the colour picker displaying the wrong colour on the canvas for some colours.

The title bar of the widget renders the colour properly, but the colour gradient in the canvas renders a black-white gradient. In colorPickerWidget there is a function called paint() that is responsible for rendering the colour gradient canvas, so I will need to investigate that function further.