add border around recipes where several of them stack
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
class BuildingIconCache;
|
||||
class ItemIconCache;
|
||||
class QHBoxLayout;
|
||||
class QVBoxLayout;
|
||||
|
||||
// One recipe drawn: what it consumes, an arrow, what it produces, and how long a cycle
|
||||
// takes (REQ-UI-RECIPE-SUMMARY), under a header naming the building that runs it and the
|
||||
@@ -87,12 +88,20 @@ public:
|
||||
// recipe shows no summary at all (REQ-UI-RECIPE-SUMMARY).
|
||||
void setLine(const Spec& spec);
|
||||
|
||||
// Boxes the line in a card of its own, for the two places that stack several of them
|
||||
// (REQ-UI-ITEM-TOOLTIP, REQ-DEF-SCHEMATIC-DROP): a run of bare lines reads as one
|
||||
// field of icons and numbers, and the box is what separates one recipe from the next.
|
||||
// Off by default -- a line drawn inside a button or a panel section is already framed
|
||||
// by what holds it.
|
||||
void setCardChrome(bool enabled);
|
||||
|
||||
private:
|
||||
void rebuild(const Spec& spec);
|
||||
void addAmounts(const std::vector<Amount>& amounts);
|
||||
|
||||
ItemIconCache* m_itemIcons;
|
||||
BuildingIconCache* m_buildingIcons;
|
||||
QVBoxLayout* m_outerLayout;
|
||||
// The two lines, each a row widget of its own so a rebuild only has to empty their
|
||||
// layouts -- no nested layout to take apart. The header is hidden where the spec
|
||||
// names neither a building nor a recipe.
|
||||
|
||||
Reference in New Issue
Block a user