From 4d048d83bd7d0f798f7036de60bfdaee306535c6 Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Sun, 28 Feb 2021 10:31:00 -0800 Subject: [PATCH] A few misc fixes after the grand button/color refactor: - Always draw traffic signal stage numbers as white, even in day mode - Always draw loading screen text as white, in any theme - Double the scrollbar thickness from 4px to 8px (still way thinner than the original design) [rebuild] [release] --- map_gui/src/render/traffic_signal.rs | 2 +- widgetry/src/event_ctx.rs | 3 ++- widgetry/src/widgets/slider.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/map_gui/src/render/traffic_signal.rs b/map_gui/src/render/traffic_signal.rs index 1b54f9446d..9f6eaeda5b 100644 --- a/map_gui/src/render/traffic_signal.rs +++ b/map_gui/src/render/traffic_signal.rs @@ -208,7 +208,7 @@ pub fn draw_stage_number( Circle::new(center, radius).to_polygon(), ); batch.append( - Text::from(Line(format!("{}", idx + 1))) + Text::from(Line(format!("{}", idx + 1)).fg(Color::WHITE)) .render_autocropped(prerender) .scale(0.075) .centered_on(center), diff --git a/widgetry/src/event_ctx.rs b/widgetry/src/event_ctx.rs index 1092efc4db..b967e75eb2 100644 --- a/widgetry/src/event_ctx.rs +++ b/widgetry/src/event_ctx.rs @@ -186,7 +186,8 @@ impl<'a> EventCtx<'a> { .centered_vert(), Widget::draw_batch( self, - txt.inner_render(&self.prerender.assets, svg::LOW_QUALITY), + txt.change_fg(Color::WHITE) + .inner_render(&self.prerender.assets, svg::LOW_QUALITY), ) .container() .fill_width() diff --git a/widgetry/src/widgets/slider.rs b/widgetry/src/widgets/slider.rs index 9b2854ff46..3cc6bba6f0 100644 --- a/widgetry/src/widgets/slider.rs +++ b/widgetry/src/widgets/slider.rs @@ -24,7 +24,7 @@ enum Style { Area { width: f64 }, } -pub const SCROLLBAR_BG_WIDTH: f64 = 4.0; +pub const SCROLLBAR_BG_WIDTH: f64 = 8.0; pub const AREA_SLIDER_BG_WIDTH: f64 = 10.0; impl Style {