mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-01 02:33:54 +03:00
theme spinner
This commit is contained in:
parent
fc4a4d1071
commit
5d7875d5be
@ -22,8 +22,7 @@ impl<T: 'static + PartialEq + Clone + std::fmt::Debug> PersistentSplit<T> {
|
||||
hotkey: MK,
|
||||
choices: Vec<Choice<T>>,
|
||||
) -> Widget {
|
||||
let outline_style = &ctx.style().btn_outline;
|
||||
let outline = outline_style.outline;
|
||||
let outline = ctx.style().btn_outline.outline;
|
||||
Widget::new(Box::new(PersistentSplit::new(
|
||||
ctx,
|
||||
label,
|
||||
|
@ -56,6 +56,8 @@ impl Spinner {
|
||||
current = high;
|
||||
warn!("Spinner current value is out of bounds!");
|
||||
}
|
||||
|
||||
let outline = ctx.style().btn_outline.outline;
|
||||
Widget::new(Box::new(Spinner {
|
||||
low,
|
||||
high,
|
||||
@ -67,6 +69,7 @@ impl Spinner {
|
||||
top_left: ScreenPt::new(0.0, 0.0),
|
||||
dims,
|
||||
}))
|
||||
.outline(2.0, outline)
|
||||
}
|
||||
|
||||
pub fn modify(&mut self, delta: isize) {
|
||||
@ -129,7 +132,7 @@ impl WidgetImpl for Spinner {
|
||||
fn draw(&self, g: &mut GfxCtx) {
|
||||
// TODO Cache
|
||||
let mut batch = GeomBatch::from(vec![(
|
||||
text::BG_COLOR,
|
||||
g.style().panel_bg,
|
||||
Polygon::rounded_rectangle(self.dims.width, self.dims.height, 5.0),
|
||||
)]);
|
||||
batch.append(
|
||||
|
Loading…
Reference in New Issue
Block a user