mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
Do not set broken colors.
This commit is contained in:
@@ -324,9 +324,16 @@ bool UIRichText::applyProperty( const StyleSheetProperty& attribute ) {
|
||||
case PropertyId::FontWeight:
|
||||
setFontStyle( attribute.asFontStyle() );
|
||||
break;
|
||||
case PropertyId::Color:
|
||||
case PropertyId::Color: {
|
||||
Color color = attribute.asColor();
|
||||
if ( color == Color::Transparent &&
|
||||
attribute.getValue().find( "var(" ) != std::string::npos ) {
|
||||
// Do not set unresolved colors
|
||||
break;
|
||||
}
|
||||
setFontColor( attribute.asColor() );
|
||||
break;
|
||||
}
|
||||
case PropertyId::BackgroundColor:
|
||||
setBackgroundColor( attribute.asColor() );
|
||||
setFontBackgroundColor( attribute.asColor() );
|
||||
|
||||
@@ -108,9 +108,16 @@ bool UITextSpan::applyProperty( const StyleSheetProperty& attribute ) {
|
||||
case PropertyId::Text:
|
||||
setText( getTranslatorString( attribute.value() ) );
|
||||
break;
|
||||
case PropertyId::Color:
|
||||
setFontColor( attribute.asColor() );
|
||||
case PropertyId::Color: {
|
||||
Color color = attribute.asColor();
|
||||
if ( color == Color::Transparent &&
|
||||
attribute.getValue().find( "var(" ) != std::string::npos ) {
|
||||
// Do not set unresolved colors
|
||||
break;
|
||||
}
|
||||
setFontColor( color );
|
||||
break;
|
||||
}
|
||||
case PropertyId::BackgroundColor:
|
||||
setFontBackgroundColor( attribute.asColor() );
|
||||
break;
|
||||
|
||||
@@ -148,6 +148,7 @@ void UIWidgetCreator::createBaseWidgetList() {
|
||||
registeredWidget["kbd"] = [] { return UITextSpan::NewWithTag( "kbd" ); };
|
||||
registeredWidget["sub"] = [] { return UITextSpan::NewWithTag( "sub" ); };
|
||||
registeredWidget["sup"] = [] { return UITextSpan::NewWithTag( "sup" ); };
|
||||
registeredWidget["time"] = [] { return UITextSpan::NewWithTag( "time" ); };
|
||||
registeredWidget["u"] = UITextSpan::NewUnderline;
|
||||
registeredWidget["ins"] = UITextSpan::NewUnderline;
|
||||
registeredWidget["s"] = UITextSpan::NewStrikethrough;
|
||||
|
||||
2
src/thirdparty/mojoAL-SDL3/mojoal.c
vendored
2
src/thirdparty/mojoAL-SDL3/mojoal.c
vendored
@@ -790,7 +790,7 @@ static ALfloat calculate_distance_attenuation(const ALCcontext *ctx, const ALsou
|
||||
// error in it. In this case, there is no attenuation for that source."
|
||||
FIXME("check divisions by zero");
|
||||
|
||||
const ALenum distance_model = ctx->source_distance_model ? src->distance_model : ctx->distance_model;
|
||||
// const ALenum distance_model = ctx->source_distance_model ? src->distance_model : ctx->distance_model;
|
||||
switch (ctx->distance_model) {
|
||||
case AL_INVERSE_DISTANCE_CLAMPED:
|
||||
distance = SDL_min(SDL_max(distance, src->reference_distance), src->max_distance);
|
||||
|
||||
Reference in New Issue
Block a user