Browse Source

Minor tweaks to the software renderer, introjucer and vst wrapper.

tags/2021-05-28
Julian Storer 14 years ago
parent
commit
e0a38a30db
8 changed files with 28 additions and 19 deletions
  1. +4
    -4
      extras/Introjucer/Source/Code Editor/jucer_SourceCodeEditor.cpp
  2. +4
    -7
      extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm
  3. +9
    -3
      juce_amalgamated.cpp
  4. +1
    -1
      juce_amalgamated.h
  5. +1
    -1
      src/core/juce_StandardHeader.h
  6. +2
    -1
      src/gui/components/code_editor/juce_CodeDocument.cpp
  7. +6
    -1
      src/gui/components/controls/juce_Slider.cpp
  8. +1
    -1
      src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp

+ 4
- 4
extras/Introjucer/Source/Code Editor/jucer_SourceCodeEditor.cpp View File

@@ -36,13 +36,13 @@ SourceCodeEditor::SourceCodeEditor (OpenDocumentManager::Document* document_,
{
addAndMakeVisible (&editor);
#if JUCE_MAC
#if JUCE_MAC
Font font (10.6f);
font.setTypefaceName ("Andale Mono");
#else
font.setTypefaceName ("Menlo Regular");
#else
Font font (10.0f);
font.setTypefaceName (Font::getDefaultMonospacedFontName());
#endif
#endif
editor.setFont (font);
}


+ 4
- 7
extras/audio plugins/wrapper/VST/juce_VST_Wrapper.mm View File

@@ -251,8 +251,8 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth
if (hostView != 0)
{
// xxx is this necessary, or do the hosts detect a change in the child view and do this automatically?
[hostView setSize: NSMakeSize ([hostView size].width + (newWidth - component->getWidth()),
[hostView size].height + (newHeight - component->getHeight()))];
[hostView setFrameSize: NSMakeSize ([hostView frame].size.width + (newWidth - component->getWidth()),
[hostView frame].size.height + (newHeight - component->getHeight()))];
}
#else
NSWindow* hostWindow = (NSWindow*) nsWindow;
@@ -273,12 +273,9 @@ void setNativeHostWindowSize (void* nsWindow, Component* component, int newWidth
void checkWindowVisibility (void* nsWindow, Component* comp)
{
#if JUCE_64BIT
NSView* hostWindow = (NSView*) nsWindow;
#else
NSWindow* hostWindow = (NSWindow*) nsWindow;
#if ! JUCE_64BIT
comp->setVisible ([((NSWindow*) nsWindow) isVisible]);
#endif
comp->setVisible ([hostWindow isVisible]);
}
void forwardCurrentKeyEventToHost (Component* comp)


+ 9
- 3
juce_amalgamated.cpp View File

@@ -45060,7 +45060,8 @@ void CodeDocument::replaceAllContent (const String& newContent)

bool CodeDocument::loadFromStream (InputStream& stream)
{
replaceAllContent (stream.readEntireStreamAsString());
remove (0, getNumCharacters(), false);
insert (stream.readEntireStreamAsString(), 0, false);
setSavePoint();
clearUndoHistory();
return true;
@@ -49788,7 +49789,12 @@ void Slider::setValue (double newValue,
valueBox->hideEditor (true);

lastCurrentValue = newValue;
currentValue = newValue;

// (need to do this comparison because the Value will use equalsWithSameType to compare
// the new and old values, so will generate unwanted change events if the type changes)
if (currentValue != newValue)
currentValue = newValue;

updateText();
repaint();

@@ -85982,7 +85988,7 @@ public:
{
const ScopedPointer<EdgeTable> et (f.getTypeface()->getEdgeTableForGlyph (glyphNumber, getTransformWith (transform)));

if (et != 0)
if (et != 0 && clip != 0)
{
SoftwareRendererClasses::ClipRegion_EdgeTable* edgeTableClip = new SoftwareRendererClasses::ClipRegion_EdgeTable (*et);
SoftwareRendererClasses::ClipRegionBase::Ptr shapeToFill (edgeTableClip);


+ 1
- 1
juce_amalgamated.h View File

@@ -73,7 +73,7 @@ namespace JuceDummyNamespace {}
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 53
#define JUCE_BUILDNUMBER 67
#define JUCE_BUILDNUMBER 68

/** Current Juce version number.



+ 1
- 1
src/core/juce_StandardHeader.h View File

@@ -33,7 +33,7 @@
*/
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 53
#define JUCE_BUILDNUMBER 67
#define JUCE_BUILDNUMBER 68
/** Current Juce version number.


+ 2
- 1
src/gui/components/code_editor/juce_CodeDocument.cpp View File

@@ -579,7 +579,8 @@ void CodeDocument::replaceAllContent (const String& newContent)
bool CodeDocument::loadFromStream (InputStream& stream)
{
replaceAllContent (stream.readEntireStreamAsString());
remove (0, getNumCharacters(), false);
insert (stream.readEntireStreamAsString(), 0, false);
setSavePoint();
clearUndoHistory();
return true;


+ 6
- 1
src/gui/components/controls/juce_Slider.cpp View File

@@ -492,7 +492,12 @@ void Slider::setValue (double newValue,
valueBox->hideEditor (true);
lastCurrentValue = newValue;
currentValue = newValue;
// (need to do this comparison because the Value will use equalsWithSameType to compare
// the new and old values, so will generate unwanted change events if the type changes)
if (currentValue != newValue)
currentValue = newValue;
updateText();
repaint();


+ 1
- 1
src/gui/graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp View File

@@ -2068,7 +2068,7 @@ public:
{
const ScopedPointer<EdgeTable> et (f.getTypeface()->getEdgeTableForGlyph (glyphNumber, getTransformWith (transform)));
if (et != 0)
if (et != 0 && clip != 0)
{
SoftwareRendererClasses::ClipRegion_EdgeTable* edgeTableClip = new SoftwareRendererClasses::ClipRegion_EdgeTable (*et);
SoftwareRendererClasses::ClipRegionBase::Ptr shapeToFill (edgeTableClip);


Loading…
Cancel
Save