Browse Source

More MSVC warning fixes.

tags/2021-05-28
jules 12 years ago
parent
commit
265fb0e8eb
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      modules/juce_gui_basics/drawables/juce_DrawableText.cpp
  2. +1
    -1
      modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp
  3. +1
    -1
      modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp
  4. +1
    -1
      modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp

+ 1
- 1
modules/juce_gui_basics/drawables/juce_DrawableText.cpp View File

@@ -172,7 +172,7 @@ void DrawableText::paint (Graphics& g)
g.setFont (scaledFont); g.setFont (scaledFont);
g.setColour (colour); g.setColour (colour);
g.drawFittedText (text, Rectangle<int> (w, h), justification, 0x100000);
g.drawFittedText (text, Rectangle<float> (w, h).getSmallestIntegerContainer(), justification, 0x100000);
} }
Rectangle<float> DrawableText::getDrawableBounds() const Rectangle<float> DrawableText::getDrawableBounds() const


+ 1
- 1
modules/juce_gui_basics/filebrowser/juce_FileChooserDialogBox.cpp View File

@@ -49,7 +49,7 @@ public:
void paint (Graphics& g) void paint (Graphics& g)
{ {
text.draw (g, getLocalBounds().reduced (6) text.draw (g, getLocalBounds().reduced (6)
.removeFromTop (text.getHeight()).toFloat());
.removeFromTop ((int) text.getHeight()).toFloat());
} }
void resized() void resized()


+ 1
- 1
modules/juce_gui_basics/lookandfeel/juce_LookAndFeel.cpp View File

@@ -2207,7 +2207,7 @@ void LookAndFeel::drawTabButtonText (TabBarButton& button, Graphics& g, bool isM
g.addTransform (t); g.addTransform (t);
g.drawFittedText (button.getButtonText().trim(), g.drawFittedText (button.getButtonText().trim(),
0.0f, 0.0f, (float) length, (float) depth,
0, 0, (int) length, (int) depth,
Justification::centred, Justification::centred,
jmax (1, ((int) depth) / 12)); jmax (1, ((int) depth) / 12));
} }


+ 1
- 1
modules/juce_gui_extra/code_editor/juce_CodeEditorComponent.cpp View File

@@ -110,7 +110,7 @@ public:
column += token.length; column += token.length;
} }
as.draw (g, Rectangle<float> (x, y, 10000.0f, (float) lineH));
as.draw (g, Rectangle<float> (x, (float) y, 10000.0f, (float) lineH));
} }
private: private:


Loading…
Cancel
Save