mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
lesser spacing with amount
This commit is contained in:
parent
4669b4ab52
commit
91da702d66
@ -572,18 +572,20 @@ impl<'a> Widget for ItemTooltip<'a> {
|
|||||||
.set(state.ids.title, ui);
|
.set(state.ids.title, ui);
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
let mut subtitle_relative_id = state.ids.title;
|
let (subtitle_relative_id, spacing) = if self.item.amount().get() > 1 {
|
||||||
if self.item.amount().get() > 1 {
|
|
||||||
subtitle_relative_id = state.ids.quantity;
|
|
||||||
widget::Text::new(&format!("Amount: {}", self.item.amount().get()))
|
widget::Text::new(&format!("Amount: {}", self.item.amount().get()))
|
||||||
.w(title_w)
|
.w(title_w)
|
||||||
.graphics_for(id)
|
.graphics_for(id)
|
||||||
.parent(id)
|
.parent(id)
|
||||||
.with_style(self.style.desc)
|
.with_style(self.style.desc)
|
||||||
.color(conrod_core::color::GREY)
|
.color(conrod_core::color::GREY)
|
||||||
.down_from(state.ids.title, V_PAD)
|
.down_from(state.ids.title, 2.0)
|
||||||
.set(state.ids.quantity, ui);
|
.set(state.ids.quantity, ui);
|
||||||
}
|
|
||||||
|
(state.ids.quantity, 2.0)
|
||||||
|
} else {
|
||||||
|
(state.ids.title, V_PAD)
|
||||||
|
};
|
||||||
|
|
||||||
// Subtitle
|
// Subtitle
|
||||||
widget::Text::new(&subtitle)
|
widget::Text::new(&subtitle)
|
||||||
@ -592,7 +594,7 @@ impl<'a> Widget for ItemTooltip<'a> {
|
|||||||
.parent(id)
|
.parent(id)
|
||||||
.with_style(self.style.desc)
|
.with_style(self.style.desc)
|
||||||
.color(conrod_core::color::GREY)
|
.color(conrod_core::color::GREY)
|
||||||
.down_from(subtitle_relative_id, V_PAD)
|
.down_from(subtitle_relative_id, spacing)
|
||||||
.set(state.ids.subtitle, ui);
|
.set(state.ids.subtitle, ui);
|
||||||
|
|
||||||
// Stats
|
// Stats
|
||||||
|
Loading…
Reference in New Issue
Block a user