Skip to content

Commit 4536943

Browse files
committed
More tweaks
1 parent 8394a54 commit 4536943

File tree

4 files changed

+203
-232
lines changed

4 files changed

+203
-232
lines changed

modules/yup_events/native/yup_MessageManager_mac.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static bool runNSApplication(int millisecondsToRunFor, Atomic<int>& quitMessageP
387387
@try
388388
{
389389
#endif
390-
CFRunLoopRunInMode(kCFRunLoopDefaultMode, jmin(1.0, msRemaining * 0.001), true);
390+
CFRunLoopRunInMode(kCFRunLoopCommonModes, jmin(1.0, msRemaining * 0.001), true);
391391

392392
#if YUP_CATCH_UNHANDLED_EXCEPTIONS
393393
}

modules/yup_graphics/graphics/yup_Color.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ class YUP_API Color
810810

811811
constexpr static uint8 normalizedToComponent (float normalized) noexcept
812812
{
813-
return static_cast<uint8> (jlimit (0.0f, 1.0f, normalized) * 255.0f);
813+
return static_cast<uint8> (roundToInt (jlimit (0.0f, 1.0f, normalized) * 255.0f));
814814
}
815815

816816
union

modules/yup_python/bindings/yup_YupGraphics_bindings.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ void registerYupGraphicsBindings (py::module_& m)
10381038
String repr;
10391039
repr
10401040
<< Helpers::pythonizeModuleClassName (PythonModuleName, typeid (self).name())
1041-
<< "(" << self.getRed() << ", " << self.getGreen() << ", " << self.getBlue() << ", " << self.getAlpha() << ")";
1041+
<< "(" << self.getAlpha() << ", " << self.getRed() << ", " << self.getGreen() << ", " << self.getBlue() << ")";
10421042
return repr;
10431043
})
10441044
.def ("__str__", &Color::toString)
@@ -1596,24 +1596,21 @@ void registerYupGraphicsBindings (py::module_& m)
15961596
.value ("Hue", BlendMode::Hue)
15971597
.value ("Saturation", BlendMode::Saturation)
15981598
.value ("Color", BlendMode::Color)
1599-
.value ("Luminosity", BlendMode::Luminosity)
1600-
.export_values();
1599+
.value ("Luminosity", BlendMode::Luminosity);
16011600

16021601
// ============================================================================================ yup::StrokeCap
16031602

16041603
py::enum_<StrokeCap> (m, "StrokeCap")
16051604
.value ("Butt", StrokeCap::Butt)
16061605
.value ("Round", StrokeCap::Round)
1607-
.value ("Square", StrokeCap::Square)
1608-
.export_values();
1606+
.value ("Square", StrokeCap::Square);
16091607

16101608
// ============================================================================================ yup::StrokeJoin
16111609

16121610
py::enum_<StrokeJoin> (m, "StrokeJoin")
16131611
.value ("Miter", StrokeJoin::Miter)
16141612
.value ("Round", StrokeJoin::Round)
1615-
.value ("Bevel", StrokeJoin::Bevel)
1616-
.export_values();
1613+
.value ("Bevel", StrokeJoin::Bevel);
16171614

16181615
// ============================================================================================ yup::Graphics
16191616

0 commit comments

Comments
 (0)