@@ -100,11 +100,9 @@ PluginEditor::PluginEditor(PluginProcessor& p)
100100
101101 welcomePanelSearchButton.setClickingTogglesState (false );
102102 welcomePanelSearchButton.onClick = [this ]() {
103- if (isSearchToggledOn) {
104- isSearchToggledOn = false ;
103+ if (!welcomePanelSearchButton.getToggleState ()) {
105104 welcomePanelSearchInput.setVisible (false );
106105 } else {
107- isSearchToggledOn = true ;
108106 welcomePanelSearchInput.setVisible (true );
109107 welcomePanelSearchInput.grabKeyboardFocus ();
110108 welcomePanel->setSearchQuery (" " );
@@ -122,7 +120,7 @@ PluginEditor::PluginEditor(PluginProcessor& p)
122120 }
123121
124122 if (welcomePanelSearchInput.getText ().isEmpty ()) {
125- isSearchToggledOn = false ;
123+ welcomePanelSearchButton. setToggleState ( false , dontSendNotification) ;
126124 welcomePanelSearchInput.setVisible (false );
127125 }
128126 };
@@ -428,7 +426,7 @@ void PluginEditor::paint(Graphics& g)
428426 // This is easier than having to replicate the DnD highlight at the edge of the NVG window.
429427 if (welcomePanel->isVisible ()) {
430428 g.setColour (findColour (PlugDataColour::panelBackgroundColourId));
431- g.fillRect (workArea.withTrimmedTop (4 ));
429+ g.fillRect (workArea.withTrimmedTop (5 ). withTrimmedBottom ( 50 ));
432430 }
433431}
434432
@@ -446,15 +444,15 @@ void PluginEditor::paintOverChildren(Graphics& g)
446444
447445 auto welcomePanelVisible = !getCurrentCanvas ();
448446 auto tabbarDepth = welcomePanelVisible ? toolbarHeight + 5 .5f : toolbarHeight + 30 .0f ;
447+ auto paletteRight = palettes->isVisible () ? (palettes->isExpanded () ? palettes->getRight () : 29 .0f ) : 0 ;
448+ auto sidebarLeft = sidebar->isVisible () ? sidebar->getX () + 1 .0f : getWidth ();
449449 g.setColour (findColour (PlugDataColour::toolbarOutlineColourId));
450- if (palettes->isVisible ())
451- g.drawLine (palettes->isExpanded () ? palettes->getRight () : 29 .0f , tabbarDepth, sidebar->getX () + 1 .0f , tabbarDepth);
450+ g.drawLine (paletteRight, tabbarDepth, sidebarLeft, tabbarDepth);
452451
453452 // Draw extra lines in case tabbar is not visible. Otherwise some outlines will stop too soon
454453 if (!getCurrentCanvas ()) {
455454 auto toolbarDepth = welcomePanelVisible ? toolbarHeight + 6 : toolbarHeight;
456- if (palettes->isVisible ())
457- g.drawLine (palettes->isExpanded () ? palettes->getRight () : 29 .5f , toolbarDepth, palettes->isExpanded () ? palettes->getRight () : 29 .5f , toolbarDepth + 30 );
455+ g.drawLine (paletteRight, toolbarDepth, paletteRight, toolbarDepth + 30 );
458456 if (sidebar->isVisible ())
459457 g.drawLine (sidebar->getX () + 0 .5f , toolbarDepth, sidebar->getX () + 0 .5f , toolbarHeight + 30 );
460458 }
0 commit comments