Apply OSX fixes supplied by jrrs.
This commit is contained in:
parent
e128468819
commit
4b364db2e4
8 changed files with 33 additions and 35 deletions
|
@ -19,8 +19,8 @@ ChannelButtonLookAndFeel::ChannelButtonLookAndFeel()
|
||||||
|
|
||||||
static void drawButtonShape(Graphics& g, const Path& outline, Colour baseColour, float height)
|
static void drawButtonShape(Graphics& g, const Path& outline, Colour baseColour, float height)
|
||||||
{
|
{
|
||||||
const float mainBrightness = baseColour.getBrightness();
|
//const float mainBrightness = baseColour.getBrightness();
|
||||||
const float mainAlpha = baseColour.getFloatAlpha();
|
//const float mainAlpha = baseColour.getFloatAlpha();
|
||||||
|
|
||||||
g.setFillType(FillType(baseColour));
|
g.setFillType(FillType(baseColour));
|
||||||
g.fillPath(outline);
|
g.fillPath(outline);
|
||||||
|
|
|
@ -16,8 +16,8 @@ const Colour OPLLookAndFeel::DOS_GREEN_DARK = Colour(0xff003f00);
|
||||||
|
|
||||||
OPLLookAndFeel::OPLLookAndFeel()
|
OPLLookAndFeel::OPLLookAndFeel()
|
||||||
{
|
{
|
||||||
toggleOff = ImageCache::getFromMemory(PluginGui::toggle_off_sq_png, PluginGui::toggle_off_sq_pngSize), 1.000f, Colour(0x00000000);
|
toggleOff = ImageCache::getFromMemory(PluginGui::toggle_off_sq_png, PluginGui::toggle_off_sq_pngSize);
|
||||||
toggleOn = ImageCache::getFromMemory(PluginGui::toggle_on_sq_png, PluginGui::toggle_on_sq_pngSize), 1.000f, Colour(0x00000000);
|
toggleOn = ImageCache::getFromMemory(PluginGui::toggle_on_sq_png, PluginGui::toggle_on_sq_pngSize);
|
||||||
toggleRect = Rectangle<float>((float)toggleOff.getWidth(), (float)toggleOn.getHeight());
|
toggleRect = Rectangle<float>((float)toggleOff.getWidth(), (float)toggleOn.getHeight());
|
||||||
|
|
||||||
// Prevents an ugly white border from being drawn around a component with keyboard focus.
|
// Prevents an ugly white border from being drawn around a component with keyboard focus.
|
||||||
|
@ -76,8 +76,6 @@ void OPLLookAndFeel::drawLinearSliderThumb(Graphics& g, int x, int y, int width,
|
||||||
slider.isMouseOverOrDragging() && slider.isEnabled(),
|
slider.isMouseOverOrDragging() && slider.isEnabled(),
|
||||||
slider.isMouseButtonDown() && slider.isEnabled()));
|
slider.isMouseButtonDown() && slider.isEnabled()));
|
||||||
|
|
||||||
const float outlineThickness = slider.isEnabled() ? 0.8f : 0.3f;
|
|
||||||
|
|
||||||
if (style == Slider::LinearHorizontal || style == Slider::LinearVertical)
|
if (style == Slider::LinearHorizontal || style == Slider::LinearVertical)
|
||||||
{
|
{
|
||||||
float kx, ky;
|
float kx, ky;
|
||||||
|
|
|
@ -2145,7 +2145,7 @@ PluginGui::PluginGui (AdlibBlasterAudioProcessor* ownerFilter)
|
||||||
String context = String("Disable channel ");
|
String context = String("Disable channel ");
|
||||||
for (unsigned int i = 0; i < channels.size(); ++i)
|
for (unsigned int i = 0; i < channels.size(); ++i)
|
||||||
{
|
{
|
||||||
TextButton *channel = new TextButton(TRANS("-"), context + (i + 1));
|
TextButton *channel = new TextButton(TRANS("-"), context + String(i + 1));
|
||||||
channel->setLookAndFeel(channelButtonLookAndFeel);
|
channel->setLookAndFeel(channelButtonLookAndFeel);
|
||||||
channel->setColour(TextButton::ColourIds::buttonColourId, Colours::black);
|
channel->setColour(TextButton::ColourIds::buttonColourId, Colours::black);
|
||||||
channel->setColour(TextButton::ColourIds::buttonOnColourId, Colours::black);
|
channel->setColour(TextButton::ColourIds::buttonOnColourId, Colours::black);
|
||||||
|
@ -2680,7 +2680,7 @@ void PluginGui::buttonClicked (Button* buttonThatWasClicked)
|
||||||
else if (buttonThatWasClicked == exportButton.get())
|
else if (buttonThatWasClicked == exportButton.get())
|
||||||
{
|
{
|
||||||
//[UserButtonCode_exportButton] -- add your button handler code here..
|
//[UserButtonCode_exportButton] -- add your button handler code here..
|
||||||
WildcardFileFilter wildcardFilter("*.sbi", String::empty, "SBI files");
|
WildcardFileFilter wildcardFilter("*.sbi", String(), "SBI files");
|
||||||
FileBrowserComponent browser(FileBrowserComponent::saveMode + FileBrowserComponent::canSelectFiles,
|
FileBrowserComponent browser(FileBrowserComponent::saveMode + FileBrowserComponent::canSelectFiles,
|
||||||
instrumentSaveDirectory,
|
instrumentSaveDirectory,
|
||||||
&wildcardFilter,
|
&wildcardFilter,
|
||||||
|
@ -2701,7 +2701,7 @@ void PluginGui::buttonClicked (Button* buttonThatWasClicked)
|
||||||
else if (buttonThatWasClicked == loadButton.get())
|
else if (buttonThatWasClicked == loadButton.get())
|
||||||
{
|
{
|
||||||
//[UserButtonCode_loadButton] -- add your button handler code here..
|
//[UserButtonCode_loadButton] -- add your button handler code here..
|
||||||
WildcardFileFilter wildcardFilter("*.sbi", String::empty, "SBI files");
|
WildcardFileFilter wildcardFilter("*.sbi", String(), "SBI files");
|
||||||
FileBrowserComponent browser(FileBrowserComponent::openMode + FileBrowserComponent::canSelectFiles,
|
FileBrowserComponent browser(FileBrowserComponent::openMode + FileBrowserComponent::canSelectFiles,
|
||||||
instrumentLoadDirectory,
|
instrumentLoadDirectory,
|
||||||
&wildcardFilter,
|
&wildcardFilter,
|
||||||
|
|
|
@ -49,12 +49,12 @@ public:
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
//[UserMethods] -- You can add your own custom methods in this section.
|
//[UserMethods] -- You can add your own custom methods in this section.
|
||||||
void updateFromParameters();
|
void updateFromParameters();
|
||||||
bool isInterestedInFileDrag (const StringArray& files);
|
bool isInterestedInFileDrag (const StringArray& files) override;
|
||||||
void fileDragEnter (const StringArray& files, int x, int y);
|
void fileDragEnter (const StringArray& files, int x, int y) override;
|
||||||
void fileDragMove (const StringArray& files, int x, int y);
|
void fileDragMove (const StringArray& files, int x, int y) override;
|
||||||
void fileDragExit (const StringArray& files);
|
void fileDragExit (const StringArray& files) override;
|
||||||
void filesDropped (const StringArray& files, int x, int y);
|
void filesDropped (const StringArray& files, int x, int y) override;
|
||||||
void timerCallback();
|
void timerCallback() override;
|
||||||
void setRecordButtonState(bool recording);
|
void setRecordButtonState(bool recording);
|
||||||
//[/UserMethods]
|
//[/UserMethods]
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,8 @@ void Hiopl::_ClearRegisters() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hiopl::SetEmulator(Emulator emulator) {
|
void Hiopl::SetEmulator(Emulator _emulator) {
|
||||||
this->emulator = emulator;
|
this->emulator = _emulator;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hiopl::Generate(int length, float* buffer) {
|
void Hiopl::Generate(int length, float* buffer) {
|
||||||
|
|
|
@ -88,26 +88,26 @@ public:
|
||||||
DbxValue(std::string const& in,Etype _t) :_string(0),type(V_NONE) {SetDbxValue(in,_t);}
|
DbxValue(std::string const& in,Etype _t) :_string(0),type(V_NONE) {SetDbxValue(in,_t);}
|
||||||
|
|
||||||
/* Assigment operators */
|
/* Assigment operators */
|
||||||
DbxValue& operator= (Hex in) throw(WrongType) { return copy(DbxValue(in));}
|
DbxValue& operator= (Hex in) noexcept(false) { return copy(DbxValue(in));}
|
||||||
DbxValue& operator= (int in) throw(WrongType) { return copy(DbxValue(in));}
|
DbxValue& operator= (int in) noexcept(false) { return copy(DbxValue(in));}
|
||||||
DbxValue& operator= (bool in) throw(WrongType) { return copy(DbxValue(in));}
|
DbxValue& operator= (bool in) noexcept(false) { return copy(DbxValue(in));}
|
||||||
DbxValue& operator= (double in) throw(WrongType) { return copy(DbxValue(in));}
|
DbxValue& operator= (double in) noexcept(false) { return copy(DbxValue(in));}
|
||||||
DbxValue& operator= (std::string const& in) throw(WrongType) { return copy(DbxValue(in));}
|
DbxValue& operator= (std::string const& in) noexcept(false) { return copy(DbxValue(in));}
|
||||||
DbxValue& operator= (char const * const in) throw(WrongType) { return copy(DbxValue(in));}
|
DbxValue& operator= (char const * const in) noexcept(false) { return copy(DbxValue(in));}
|
||||||
DbxValue& operator= (DbxValue const& in) throw(WrongType) { return copy(DbxValue(in));}
|
DbxValue& operator= (DbxValue const& in) noexcept(false) { return copy(DbxValue(in));}
|
||||||
|
|
||||||
bool operator== (DbxValue const & other);
|
bool operator== (DbxValue const & other);
|
||||||
operator bool () const throw(WrongType);
|
operator bool () const noexcept(false);
|
||||||
operator Hex () const throw(WrongType);
|
operator Hex () const noexcept(false);
|
||||||
operator int () const throw(WrongType);
|
operator int () const noexcept(false);
|
||||||
operator double () const throw(WrongType);
|
operator double () const noexcept(false);
|
||||||
operator char const* () const throw(WrongType);
|
operator char const* () const noexcept(false);
|
||||||
void SetDbxValue(std::string const& in,Etype _type = V_CURRENT) throw(WrongType);
|
void SetDbxValue(std::string const& in,Etype _type = V_CURRENT) noexcept(false);
|
||||||
std::string ToString() const;
|
std::string ToString() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void destroy() throw();
|
void destroy() throw();
|
||||||
DbxValue& copy(DbxValue const& in) throw(WrongType);
|
DbxValue& copy(DbxValue const& in) noexcept(false);
|
||||||
void plaincopy(DbxValue const& in) throw();
|
void plaincopy(DbxValue const& in) throw();
|
||||||
void set_hex(std::string const& in);
|
void set_hex(std::string const& in);
|
||||||
void set_int(std::string const&in);
|
void set_int(std::string const&in);
|
||||||
|
@ -159,7 +159,7 @@ public:
|
||||||
min = _min;
|
min = _min;
|
||||||
max = _max;
|
max = _max;
|
||||||
}
|
}
|
||||||
void SetMinMax(DbxValue const& min,DbxValue const& max) {this->min = min; this->max=max;}
|
void SetMinMax(DbxValue const& _min,DbxValue const& _max) {this->min = _min; this->max=_max;}
|
||||||
void SetDbxValue(std::string const& in);
|
void SetDbxValue(std::string const& in);
|
||||||
~Prop_int(){ }
|
~Prop_int(){ }
|
||||||
virtual bool CheckDbxValue(DbxValue const& in, bool warn);
|
virtual bool CheckDbxValue(DbxValue const& in, bool warn);
|
||||||
|
|
|
@ -50,7 +50,7 @@ typedef uint16_t WORD;
|
||||||
|
|
||||||
// BOOL - A boolean variable
|
// BOOL - A boolean variable
|
||||||
// This type is declared in WinDef.h as follows:
|
// This type is declared in WinDef.h as follows:
|
||||||
typedef BYTE BOOL;
|
// typedef BYTE BOOL;
|
||||||
|
|
||||||
DWORD GetStdHandle (DWORD handle) { return handle; }
|
DWORD GetStdHandle (DWORD handle) { return handle; }
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ void WriteConsole(DWORD conout,const char* strPtr,
|
||||||
|
|
||||||
std::string message (const char* str, uint32_t count);
|
std::string message (const char* str, uint32_t count);
|
||||||
|
|
||||||
std::cout << std::endl << msgType << message;
|
std::cout << std::endl << msgType << &message;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AllocConsole()
|
void AllocConsole()
|
||||||
|
|
Loading…
Reference in a new issue