gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

comboboxStyle.cpp (806B)


      1 #include "comboboxStyle.h"
      2 
      3 namespace genericUI
      4 {
      5 	ComboboxStyle::ComboboxStyle(Editor& _editor): UiObjectStyle(_editor)
      6 	{
      7 		m_offsetL = 1;
      8 		m_offsetT = 1;
      9 		m_offsetR = -30;
     10 		m_offsetB = -2;
     11 	}
     12 
     13 	void ComboboxStyle::apply(juce::ComboBox& _target) const
     14 	{
     15 		_target.setColour(juce::ComboBox::ColourIds::textColourId, m_color);
     16 	}
     17 
     18 	void ComboboxStyle::drawComboBox(juce::Graphics& _graphics, int width, int height, bool isButtonDown, int buttonX, int buttonY, int buttonW, int buttonH, juce::ComboBox& _comboBox)
     19 	{
     20 	}
     21 
     22 	void ComboboxStyle::positionComboBoxText(juce::ComboBox& box, juce::Label& label)
     23 	{
     24 	    label.setBounds (m_offsetL, m_offsetT,
     25 	                     box.getWidth() + m_offsetR,
     26 	                     box.getHeight() + m_offsetB);
     27 
     28 	    label.setFont (getComboBoxFont (box));
     29 	}
     30 }