L6 toolbar polish: single-row faces, Cancel RT -> overflow, Re-capture between groups
Button faces now show only the short label (keybinding moved to hover tooltip as "name — binding"). Cancel RT joins the overflow menu alongside Capture RT. Re-capture sits between the capture and placement clusters. Toolbar heights 40->28.
This commit is contained in:
+6
-19
@@ -16,28 +16,15 @@ int totalButtons(const std::vector<ClusterSpec>& clusters) {
|
||||
return n;
|
||||
}
|
||||
|
||||
// Fills a slot's label / binding sub-rects from its box per the spec. The binding is the
|
||||
// bottom `bindingHeight` micro strip; the label is the remainder above it, both inset
|
||||
// horizontally so text clears the button edge. A button shorter than minSplitHeight is not
|
||||
// split: bindingBox stays empty and the label fills the interior (the shell draws only the
|
||||
// label — graceful, no clipped micro row).
|
||||
void fillTextRects(ActionBarSlot& s, const ActionBarSpec& spec) {
|
||||
// Fills a slot's label rect from its box. The label spans the full button height — a single-row
|
||||
// short label (L6: keybinding sub-row removed from the face; binding is in the hover tooltip).
|
||||
// Insets horizontally so text clears the button edge.
|
||||
void fillTextRects(ActionBarSlot& s, const ActionBarSpec& /*spec*/) {
|
||||
const int hpad = 4; // horizontal text inset inside the button
|
||||
const int innerX = s.x + hpad;
|
||||
const int innerW = s.width - 2 * hpad;
|
||||
if (innerW <= 0) return; // too narrow for text; leave sub-rects empty
|
||||
|
||||
if (s.height >= spec.minSplitHeight && spec.bindingHeight > 0 &&
|
||||
s.height - spec.bindingHeight > 0) {
|
||||
const int bindH = spec.bindingHeight;
|
||||
const int labelH = s.height - bindH;
|
||||
s.labelX = innerX; s.labelY = s.y; s.labelW = innerW; s.labelH = labelH;
|
||||
s.bindX = innerX; s.bindY = s.y + labelH; s.bindW = innerW; s.bindH = bindH;
|
||||
} else {
|
||||
// Too short to split — label fills the interior; no binding row.
|
||||
s.labelX = innerX; s.labelY = s.y; s.labelW = innerW; s.labelH = s.height;
|
||||
s.bindX = s.bindY = s.bindW = s.bindH = 0;
|
||||
}
|
||||
if (innerW <= 0) return; // too narrow for text; leave label rect empty
|
||||
s.labelX = innerX; s.labelY = s.y; s.labelW = innerW; s.labelH = s.height;
|
||||
}
|
||||
|
||||
// Tiles the first `visible` buttons into slots, cluster by cluster, left to right. This is the
|
||||
|
||||
Reference in New Issue
Block a user