Skip to content

Commit

Permalink
Merge pull request #22 from rudeog/logo
Browse files Browse the repository at this point in the history
Add logo, update info box and text
  • Loading branch information
rudeog authored Sep 4, 2020
2 parents 9514d74 + 3dfe9d2 commit a2346d3
Show file tree
Hide file tree
Showing 12 changed files with 69 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build32/
.vscode/
build.install/
*.code-workspace
*.code-search
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ juce_add_binary_data(assets NAMESPACE SeqImageX SOURCES
image/not.png
image/play.png
image/play2.png
image/Stochas-logo.png
image/logo_no_bg.png
image/x-mark-4-64.png
text/infobox.txt
)

set_target_properties(assets PROPERTIES
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.2
1.3.3
4 changes: 3 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ jobs:
- bash: |
GH=`git log -1 --format=%h`
DATE=$(date '+%Y-%m-%d')
# make it available below
echo "##vso[task.setvariable variable=GH]$GH"
echo "##vso[task.setvariable variable=BUILD_DATE;]$DATE"
displayName: Determine Hash
#
Expand All @@ -263,7 +265,7 @@ jobs:
# we create a new tag
#tag: v1.0.1.$(GH)
tag: developer
title: Developer Release $(GH)
title: Dev Release $(BUILD_DATE) $(GH)
isPreRelease: true
target: '$(Build.SourceVersion)'
addChangeLog: true
Expand Down
Binary file removed image/Stochas-logo.png
Binary file not shown.
Binary file added image/logo_no_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
// for help button
#define SEQ_HELP_URL "https://surge-synth-team.org/assets/manuals/stochas.pdf"
#define SEQ_WEBSITE_URL "https://surge-synth-team.org/stochas/"
// obfuscate
#define SEQ_HELP_EMAIL "stochas" \
"@" "binarydog.com"


// add some code to get around cubase behavior where it actually starts play position prior to
// where the cursor is when user hits play. if any issues arise, disable this to see if the workaround
Expand Down
75 changes: 40 additions & 35 deletions src/InfoDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,71 +19,76 @@ void SeqInfoDialog::endDialog(bool hitOk)


#define S_GAP 4 // gap between items
#define S_HEIGHT 22
#define S_BTNWIDTH 120
#define S_HEIGHT 24
#define S_BORDER 5 // size of border gap

// this is called when the inner box is resized (ie we need to do our resize here)
void SeqInfoDialog::resizedInner(Component * inner)
{
Rectangle<int> r;
Rectangle<int> bottom, top, btns, tmp, tmp2;
Rectangle<int> leftpanel, logo, tmp;

// inner panel
r = inner->getLocalBounds();
r.reduce(S_BORDER*2, S_BORDER*2); // have a bit of a space all around

// space for the label at the top
top = r.removeFromTop(S_HEIGHT);
mLblMain->setBounds(top);

btns=r.removeFromBottom(S_HEIGHT);
tmp=btns.removeFromRight(S_BTNWIDTH);
mBtnOk->setBounds(tmp);
tmp.removeFromRight(S_GAP);
tmp=btns.removeFromRight(S_BTNWIDTH);
mBtnWebsite->setBounds(tmp);
tmp.removeFromRight(S_GAP);
tmp=btns.removeFromRight(S_BTNWIDTH);
// left panel
leftpanel = r.removeFromLeft(262); // width of logo
logo = leftpanel.removeFromTop(290); // height of logo
mLogo.setBounds(logo);
leftpanel.removeFromTop(S_GAP);
tmp=leftpanel.removeFromTop(S_HEIGHT);
mBtnHelp->setBounds(tmp);


// leave some space between tabs and other
r.removeFromTop(S_GAP);
r.removeFromBottom(S_GAP);
mLblDescription->setBounds(r);
leftpanel.removeFromTop(S_GAP);
tmp=leftpanel.removeFromTop(S_HEIGHT);
mBtnWebsite->setBounds(tmp);
leftpanel.removeFromTop(S_GAP);
tmp=leftpanel.removeFromTop(S_HEIGHT);
mBtnOk->setBounds(tmp);

r.removeFromTop(5);
tmp=r.removeFromTop(S_HEIGHT);
mLblMain->setBounds(tmp);


r.reduce(S_BORDER, S_BORDER);
mLblDescription->setBounds(r);


}

SeqInfoDialog::SeqInfoDialog(SeqGlob * glob, CptNotify *parent) :
SeqModalDialog(glob, SEQCTL_INFODIALOG,parent, 640,200)
SeqModalDialog(glob, SEQCTL_INFODIALOG,parent, 750,400)
{
Colour txtColor, bgColor, hlColor;

bgColor = mGlob->mEditorState->getColorFor(EditorState::background);
txtColor = bgColor.contrasting(0.5f);

// logo
addToInner(0,mLogo);
juce::Image img = ImageCache::getFromMemory(SeqImageX::logo_no_bg_png, SeqImageX::logo_no_bg_pngSize);
mLogo.setImage(img);
mLogo.setVisible(true);


// big label at top
mLblMain = std::unique_ptr<Label>(addStdLabel( "Stochas Information"));
mLblMain->setFont(Font(26.0f, Font::bold));
String vs = String("Stochas v. ");
vs += Stochas::Build::FullVersionStr;
mLblMain = std::unique_ptr<Label>(addStdLabel(vs));
mLblMain->setFont(Font(20.0f, Font::bold));
mLblMain->setJustificationType(Justification::centred);

// big descr
mLblDescription = std::unique_ptr<Label>(addStdLabel(

"Stochas is an open-source plugin available on Windows and Mac, which was originally developed as commercial software in 2016 by Andrew Shakinovsky. "
"It was converted over to OSS in July of 2020. For support, "
"please email me at " SEQ_HELP_EMAIL " (no guarantee on my ability to respond in a timely manner.) "
"Please use the below links to access web resources."

));
mLblDescription->setFont(Font(18.0f, Font::plain));
mLblDescription->setJustificationType(Justification::horizontallyJustified);
mLblDescription->setMinimumHorizontalScale(1.0f);

mLblDescription = std::unique_ptr<TextEditor>(addStdTextEditor());
mLblDescription->setText(SeqImageX::infobox_txt, false);

mLblDescription->setFont(Font(14.0f, Font::plain));
mLblDescription->setMultiLine(true);
mLblDescription->setReadOnly(true);
//mLblDescription->setJustificationType(/*Justification::horizontallyJustified | */ Justification::top);
//mLblDescription->setMinimumHorizontalScale(1.0f);

// buttons
mBtnOk = std::unique_ptr<TextButton>(addStdButton("Close",0,CPTID_OK));
Expand Down
3 changes: 2 additions & 1 deletion src/InfoDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Panel that is displayed when Info is clicked
*/
class SeqInfoDialog : public SeqModalDialog
{
ImageComponent mLogo;
std::unique_ptr<Label> mLblMain;
std::unique_ptr<Label> mLblDescription;
std::unique_ptr<TextEditor> mLblDescription;
std::unique_ptr<TextButton> mBtnOk;
std::unique_ptr<TextButton> mBtnHelp;
std::unique_ptr<TextButton> mBtnWebsite;
Expand Down
6 changes: 0 additions & 6 deletions src/PluginEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ SeqAudioProcessorEditor::SeqAudioProcessorEditor(SeqAudioProcessor& p)
mClearGrooveBtn.setName("grvClr");
mBtnLoadGroove.setName("grvLoadMidi");
mBtnSaveGroove.setName("grvSaveMidi");
Image img;
img = ImageCache::getFromMemory(SeqImageX::Stochaslogo_png, SeqImageX::Stochaslogo_pngSize);
mLogo.setImage(img);
addAndMakeVisible(mLogo);

addChildComponent(mMidiDlg);

Expand Down Expand Up @@ -416,8 +412,6 @@ void SeqAudioProcessorEditor::resized()

// help,edit,undo, record buttons
// for standalone mode, the bpm as well
tmp = upper.removeFromRight(60);
mLogo.setBounds(tmp);
tmp = upper.removeFromRight(50);
mHelpBtn.setBounds(tmp);
tmp = upper.removeFromRight(50);
Expand Down
1 change: 0 additions & 1 deletion src/PluginEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class SeqAudioProcessorEditor : public AudioProcessorEditor,

ToggleCpt mSectionSelect;
SeqTabbedCpt mMainTabs;
ImageComponent mLogo;
Label mLblLayerName;
Label mLblPatternName;
Label mLblBPM; // standalone mode only
Expand Down
19 changes: 19 additions & 0 deletions text/infobox.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Probabilistic Polyrhythmic Step Sequencer

Copyright (C) 2020 Andrew Shakinovsky.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.

CONTRIBUTORS:
Andrew Shakinovsky (@rudeog)
David Clissold - design, concepts
Paul Walker (@baconpaul) - continuous integration
John Valentine (@j5v) - logo design

0 comments on commit a2346d3

Please sign in to comment.