@@ -136,20 +136,59 @@ class PluginMode final : public Component
136136 {
137137 class InfoDialog : public Component
138138 {
139+ WidePanelButton revealPatchButton = WidePanelButton(Icons::OpenLink);
140+
139141 public:
140142 InfoDialog ()
141143 {
142-
144+ revealPatchButton.setButtonText (" View patch" );
145+ addAndMakeVisible (revealPatchButton);
146+ revealPatchButton.onClick = [](){
147+ auto projectFolder = ProjectInfo::versionDataDir.getChildFile (JUCE_STRINGIFY (PROJECT_NAME));
148+ auto pdFiles = projectFolder.findChildFiles (File::findFiles, false , " *.pd" );
149+ if (pdFiles.size ())
150+ {
151+ pdFiles[0 ].revealToUser ();
152+ }
153+ };
143154 }
144155
145156 void paint (Graphics& g) override
146157 {
158+ auto bounds = getLocalBounds ();
159+
160+ auto pluginInfo = bounds.removeFromTop (54 );
161+ auto pluginName = JUCE_STRINGIFY (PROJECT_NAME);
162+ auto companyName = JUCE_STRINGIFY (COMPANY_NAME);
163+
147164 g.setColour (findColour (PlugDataColour::panelTextColourId));
148- g.drawText (" Made with plugdata" , getLocalBounds (), Justification::centred);
165+ g.setFont (Fonts::getBoldFont ().withHeight (23 .0f ));
166+ g.drawText (pluginName, pluginInfo.removeFromTop (42 .f ), Justification::centred);
167+
168+ g.setFont (Fonts::getDefaultFont ().withHeight (17 .0f ));
169+ g.drawText (String (" by " ) + companyName, pluginInfo.removeFromTop (18 .f ), Justification::centred);
170+
171+ // Colors & fonts
172+ auto textColour = findColour (PlugDataColour::objectSelectedOutlineColourId)
173+ .withAlpha (0 .3f );
174+
175+ auto madeWithRect = bounds.removeFromTop (84 ).withSizeKeepingCentre (250 , 84 );
176+ auto logoRect = madeWithRect.removeFromLeft (68 );
177+ g.setColour (textColour);
178+ g.setFont (Fonts::getIconFont ().withHeight (42 ));
179+ g.drawText (Icons::PlugdataIconFilled, logoRect.translated (18 , -2 ), Justification::right);
180+
181+ g.setFont (Fonts::getBoldFont ().withHeight (23 .0f ));
182+ g.drawMultiLineText (" made with\n plugdata" , madeWithRect.getX () + 35 , madeWithRect.getY () + 35 , 220 );
183+ }
184+
185+ void resized () override
186+ {
187+ revealPatchButton.setBounds (getLocalBounds ().reduced (16 ).removeFromBottom (32 ));
149188 }
150189 };
151190
152- auto * dialog = new Dialog (&editor->openedDialog , editor, 220 , 160 , true );
191+ auto * dialog = new Dialog (&editor->openedDialog , editor, 300 , 190 , true );
153192 auto * infoDialog = new InfoDialog ();
154193 dialog->setViewedComponent (infoDialog);
155194 editor->openedDialog .reset (dialog);
0 commit comments