Просмотр исходного кода

Merge branch 'feature/uitoolbar2' into feature/uifix

Ka1-S 1 месяц назад
Родитель
Сommit
aef93fb30b

+ 9 - 5
docs/WORKFLOW_FL.md

@@ -868,11 +868,15 @@ and out (`IconButton`). The LYNX logo is not drawn inside the window; it stays t
 - The menu with the hint bar under it always comes first. The spare width goes before the first of the meters or
   the output monitor (LYNX's single "spacer"). When the window is narrow, shown groups still drop by priority;
   the transport stays. No drag-and-drop edit mode or named presets (yet).
-- **Icon size** sets the toolbar row height (26 / **32** / 38 px) and the icon box (18 / **24** / 30 px; 24 px is
-  the icon grid at 1:1, the sharpest). The window and file shortcuts are now blocks of three per row. The same
-  setting sizes the editors' tool strips: 16 / **20** / 22 px icon boxes (up from 13 px) on buttons 2–6 px wider
-  than high. Icons are drawn on whole pixels so every button renders them equally sharp; other icon buttons
-  use 66% of their height (was 60%).
+- **Icon size** sets the toolbar row height (24 / **28** / 34 px) and the icon box (14 / **16** / 20 px). Since the
+  light-header round (docs/analise/UI_toolbar_study.md) icons use one fine line (`icons::strokeWidth`, about
+  1.25-1.5 px at these sizes), every toolbar button is flat (a faint wash on hover, a faint accent wash when on),
+  and play / stop / record are one slim row in a quiet well. The same setting sizes the editors' tool strips:
+  14 / **16** / 18 px icon boxes. The window and file shortcuts are blocks of three per row.
+- **Quick tips**: every icon button of the toolbar and of the panel title bars (and the toolbar's displays and
+  selectors) shows its name, and its shortcut if it has one, in a small dark bubble under it about 400 ms after
+  the mouse rests on it (`ui::setQuickTip`, `ui::QuickTipWindow` in `ui/HintBar.h`); moving to the next control
+  swaps the bubble at once. The hint bar keeps the full description and the mouse gestures.
 - **UI scale** scales the whole interface (`juce::Desktop` global scale factor) at once, without a restart.
 
 ### 5.2 Editor tools live in each editor's own toolbar

+ 33 - 0
docs/analise/UI_toolbar_study.md

@@ -0,0 +1,33 @@
+# UI study: a lighter header and quick tool-name tips (2026-10-16)
+
+User request (pt-BR, translated): "The header design is a bit thick/heavy; I want the icons even more delicate,
+and on mouse-over each tool should show its name, very small, just to guide whoever is using it."
+Reference: FL Studio 2026 running on the user's machine (1920x1080, 100% scale), captured on screen for study
+only. Clean-room: no FL bitmap, icon, skin, font or screenshot is in the repository; the reference captures stay
+outside it. What follows are measurements and observations in our own words, and what LYNX took from them.
+
+## What the reference shows [EXEC: on-screen capture]
+- **Header height.** The main toolbar is two rows of about 40 px each, about 82 px in all (menu + hint panel on the
+  left, transport and displays, then two rows of small square buttons). The panel title rows are about 22 px.
+- **Icon size and weight.** Toolbar glyphs are about 16-20 px inside buttons about 30 px apart; panel title-bar
+  glyphs (the editor tools, the window buttons) are smaller, about 12-14 px, drawn as thin light-grey lines with
+  no background at rest. Window buttons (minimize / maximize / close) are about 10 px glyphs.
+- **Backgrounds.** Title-bar tools have no plate at rest; toolbar buttons sit on low-contrast plates. The
+  transport (play / stop / record) is one compact segmented group, one row high, not two.
+- **Hints.** Pointing at a control writes its name and help in the hint panel under the menu (LYNX already has
+  this: the hint bar, G12). A floating pop-up bubble for toolbar icons was not observed in the captures:
+  "not confirmed". The quick-tip bubble is therefore LYNX's own addition, kept small so it only names the tool.
+
+## What LYNX changed (own design, LYNX palette and red accent)
+- Icons: one fine line for the whole family, `icons::strokeWidth(size)` = clamp(1.0 + 0.019 x size, 1.2, 1.6)
+  logical px (about 1.27 px at 14 px, 1.3 px at 16 px, 1.4 px at 20 px); HiDPI scales it with the display.
+- Toolbar: rows 28 px (was 32), icons 16 px (was 24), header 64 px (was 74) at the default icon size; small and
+  large sizes follow (24/34 px rows, 14/20 px icons). Editor tool strips 16 px icons (was 20), title-bar window
+  buttons 13-14 px.
+- Flat buttons everywhere in the header: hover is a faint white wash (7.5%), "on" a faint accent wash (16%) with
+  the accent on the icon; Pattern/Song, metronome and recording options use it too. Play / stop / record are one
+  slim row in a quiet rounded well instead of three tall plates. Tempo and time displays use a lighter well and
+  smaller digits.
+- Quick tips: a small dark bubble (11 px text, shortcut in a dimmer 10 px) centred under the control, shown about
+  400 ms after the mouse rests, swapped at once when moving to the next control, hidden on click. Names and
+  shortcuts come from the key map, translated in pt-BR. Snapshots: `-toolbar-tips.png`, `-tips-sheet.png`.

+ 23 - 0
resources/i18n/pt-BR.txt

@@ -1243,3 +1243,26 @@ countries: br
 "Show the file in Explorer" = "Mostrar o arquivo no Explorer"
 "Cut" = "Recortar"
 "Paste here" = "Colar aqui"
+
+# --- Quick tips (tool names under the mouse: toolbar and panel title bars)
+"Plugin picker" = "Seletor de plugins"
+"Play" = "Tocar"
+"Record" = "Gravar"
+"Pattern mode" = "Modo pattern"
+"Song mode" = "Modo música"
+"Wait for input" = "Esperar a entrada"
+"Typing keyboard to piano" = "Teclado do PC como piano"
+"Tempo (BPM)" = "Andamento (BPM)"
+"Song time" = "Tempo da música"
+"Snap" = "Grade"
+"Pattern options" = "Opções do pattern"
+"Playlist" = "Playlist"
+"Mixer" = "Mixer"
+"Browser" = "Browser"
+"Window options" = "Opções da janela"
+"Dock" = "Encaixar"
+"Restore" = "Restaurar"
+"Maximize" = "Maximizar"
+"Ghost notes" = "Notas fantasma"
+"Note tools" = "Ferramentas de notas"
+"Snap to scale" = "Encaixar na escala"

+ 65 - 0
src/Main.cpp

@@ -1308,6 +1308,9 @@ private:
                     saveArea (ui, ui.getToolbarBoundsForSnapshot(), prefix + "-toolbar-custom-1600.png");
                 }
                 ui.setToolbarLayoutForSnapshot (lynx::toolbarlayout::Layout::makeDefault());
+                // quick tips: the toolbar and title bars with a few name bubbles, and every tip on one sheet
+                offline.dispatchPendingMessages();
+                saveQuickTips (ui, prefix);
                 ui.setBounds (size);
                 offline.dispatchPendingMessages();
             }
@@ -2030,6 +2033,68 @@ private:
             png.writeImageToStream (c.createComponentSnapshot (area), *out);
     }
 
+    static void savePng (const juce::Image& image, const juce::String& path)
+    {
+        const juce::File file (path);
+        file.deleteFile();
+        juce::PNGImageFormat png;
+        if (auto out = file.createOutputStream())
+            png.writeImageToStream (image, *out);
+    }
+
+    // -toolbar-tips.png: the top of the window with the bubbles of a few controls as they appear under the
+    // mouse; -tips-sheet.png: every quick tip of the window, to check names, shortcuts and translations
+    static void saveQuickTips (lynx::MainComponent& ui, const juce::String& prefix)
+    {
+        const auto tips = ui.getQuickTipsForSnapshot();
+        const auto top = juce::Rectangle<int> (0, 0, ui.getWidth(), juce::jmin (ui.getHeight(), ui.getToolbarBoundsForSnapshot().getHeight() + 72));
+        auto image = ui.createComponentSnapshot (top);
+        {
+            juce::Graphics g (image);
+            const juce::String shown[] = { lynx::tr ("Pattern mode"), lynx::tr ("Play"), lynx::tr ("Metronome"), lynx::tr ("Mixer"), lynx::tr ("Save project"),
+                                           lynx::tr ("Window options"), lynx::tr ("Close") };
+            std::vector<juce::Rectangle<int>> used;
+            for (const auto& [area, tip] : tips)
+            {
+                const auto name = tip.upToFirstOccurrenceOf ("\t", false, false);
+                if (std::find (std::begin (shown), std::end (shown), name) == std::end (shown))
+                    continue;
+                const auto bubble = lynx::ui::quickTipBounds (tip, area, top);
+                if (std::any_of (used.begin(), used.end(), [&] (const auto& r) { return r.intersects (bubble); }))
+                    continue;
+                used.push_back (bubble);
+                g.setColour (juce::Colours::white.withAlpha (0.075f)); // the hovered control
+                g.fillRoundedRectangle (area.toFloat().reduced (0.5f), lynx::theme::radius::md);
+                lynx::ui::paintQuickTip (g, bubble.toFloat(), tip);
+            }
+        }
+        savePng (image, prefix + "-toolbar-tips.png");
+
+        // the sheet: bubbles in rows
+        const int width = 900;
+        int x = 12, y = 12;
+        std::vector<std::pair<juce::Rectangle<int>, juce::String>> placed;
+        for (const auto& [area, tip] : tips)
+        {
+            auto r = lynx::ui::quickTipSize (tip);
+            if (x + r.getWidth() > width - 12)
+            {
+                x = 12;
+                y += r.getHeight() + 10;
+            }
+            placed.emplace_back (r.withPosition (x, y), tip);
+            x += r.getWidth() + 10;
+        }
+        juce::Image sheet (juce::Image::ARGB, width, y + 20 + 12, true);
+        {
+            juce::Graphics g (sheet);
+            g.fillAll (lynx::theme::colour::bg3);
+            for (const auto& [r, tip] : placed)
+                lynx::ui::paintQuickTip (g, r.toFloat(), tip);
+        }
+        savePng (sheet, prefix + "-tips-sheet.png");
+    }
+
     static void saveSnapshot (juce::Component& c, const juce::String& path)
     {
         const juce::File file (path);

+ 9 - 8
src/core/ToolbarLayout.h

@@ -69,14 +69,15 @@ enum class IconSize
 };
 
 // Height of one toolbar row and the share of a button's height its icon takes, per icon size.
-// Medium is the default: 24 px icons on 32 px rows (the icon grid at 1:1, so it is perfectly sharp). For
-// comparison, FL Studio 2026 at 100% draws about 20 px glyphs on 30 px buttons (docs/WORKFLOW_FL.md 5.1).
-inline int rowHeight (IconSize s) { return s == IconSize::small ? 26 : s == IconSize::medium ? 32 : 38; }
-inline float iconFraction (IconSize s) { return s == IconSize::small ? 0.66f : s == IconSize::medium ? 0.75f : 0.8f; }
-inline float iconMaxPx (IconSize s) { return s == IconSize::small ? 18.0f : s == IconSize::medium ? 24.0f : 30.0f; }
-// Editor tool strips (inside a 28 px title row, buttons 22 px high): icon box in px and button width.
-inline float toolIconPx (IconSize s) { return s == IconSize::small ? 16.0f : s == IconSize::medium ? 20.0f : 22.0f; }
-inline int toolButtonWidth (IconSize s, int height) { return height + (s == IconSize::small ? 2 : s == IconSize::medium ? 4 : 6); }
+// Medium is the default: 16 px icons on 28 px rows, drawn with a fine line (ui/Icons.h strokeWidth), so the
+// header stays light with air around each glyph. For comparison, FL Studio 2026 at 100% draws its toolbar
+// glyphs at roughly 16-20 px on buttons about 26-30 px apart (docs/analise/UI_toolbar_study.md).
+inline int rowHeight (IconSize s) { return s == IconSize::small ? 24 : s == IconSize::medium ? 28 : 34; }
+inline float iconFraction (IconSize) { return 0.6f; }
+inline float iconMaxPx (IconSize s) { return s == IconSize::small ? 14.0f : s == IconSize::medium ? 16.0f : 20.0f; }
+// Editor tool strips (inside the panel title row): icon box in px and button width.
+inline float toolIconPx (IconSize s) { return s == IconSize::small ? 14.0f : s == IconSize::medium ? 16.0f : 18.0f; }
+inline int toolButtonWidth (IconSize s, int height) { return height + (s == IconSize::small ? 0 : s == IconSize::medium ? 2 : 4); }
 
 constexpr std::array<int, 9> uiScales { 80, 90, 100, 110, 125, 150, 175, 200, 250 };
 inline int clampScale (int percent) { return std::clamp (percent, 75, 250); }

+ 4 - 2
src/ui/EditorTools.cpp

@@ -1,6 +1,7 @@
 #include "ui/EditorTools.h"
 
 #include "core/NoteEdit.h"
+#include "ui/HintBar.h"
 #include "ui/I18n.h"
 #include "ui/Theme.h"
 
@@ -49,10 +50,11 @@ ToolStrip::ToolStrip (bool includeSlip)
         button->setFlat (true);
         button->setWantsKeyboardFocus (false);
         button->setMouseClickGrabsKeyboardFocus (false);
-        button->setOnColour (theme::colour::bg6);
-        button->setIconColourWhenOn (theme::colour::accent);
+        button->setOnColour (theme::colour::accent.withAlpha (0.16f)); // the light header style: a faint accent wash
+        button->setIconColourWhenOn (theme::colour::accentHover);
         button->setTooltip (tr (info.name) + " (" + juce::String::charToString ((juce::juce_wchar) info.key) + ")\n" + tr (info.description) + "\n"
                             + tr ("Every tool: right-click deletes, Alt ignores the grid, Ctrl+drag selects"));
+        ui::setQuickTip (*button, tr (info.name), juce::String::charToString ((juce::juce_wchar) info.key));
         button->setToggleState (info.tool == tool, juce::dontSendNotification);
         button->onClick = [this, t = info.tool] {
             if (tool != t)

+ 129 - 6
src/ui/HintBar.cpp

@@ -1,5 +1,7 @@
 #include "ui/HintBar.h"
 
+#include <cmath>
+
 #include "core/HintMarkup.h"
 #include "ui/I18n.h"
 #include "ui/Icons.h"
@@ -107,9 +109,18 @@ bool layOut (const std::vector<Item>& items, float width, int maxLines, std::vec
     lines.assign (1, {});
     float x = 0.0f;
 
-    for (auto item : items)
+    // a line only breaks after a word: key and mouse glyphs stay with what follows them ("[Ctrl][T] typing")
+    for (std::size_t i = 0; i < items.size();)
     {
-        const auto needed = (lines.back().empty() ? 0.0f : item.gap) + item.width;
+        auto end = i + 1;
+        while (end < items.size() && items[end - 1].kind != Item::Kind::word)
+            ++end;
+
+        float chunkWidth = 0.0f;
+        for (auto j = i; j < end; ++j)
+            chunkWidth += (j == i ? 0.0f : items[j].gap) + items[j].width;
+
+        const auto needed = (lines.back().empty() ? 0.0f : items[i].gap) + chunkWidth;
 
         if (! lines.back().empty() && x + needed > width)
         {
@@ -120,11 +131,16 @@ bool layOut (const std::vector<Item>& items, float width, int maxLines, std::vec
             x = 0.0f;
         }
 
-        if (lines.back().empty())
-            item.gap = 0.0f;
+        for (auto j = i; j < end; ++j)
+        {
+            auto item = items[j];
+            if (lines.back().empty())
+                item.gap = 0.0f;
+            x += item.gap + item.width;
+            lines.back().push_back (item);
+        }
 
-        x += item.gap + item.width;
-        lines.back().push_back (item);
+        i = end;
     }
 
     return x <= width;
@@ -305,4 +321,111 @@ void HintBar::paint (juce::Graphics& g)
         g.fillRect (fade);
     }
 }
+// --- quick tips ----------------------------------------------------------------------------------
+
+namespace
+{
+const juce::Identifier quickTipProperty ("lynxQuickTip");
+
+juce::Font tipNameFont() { return juce::Font (theme::font (theme::type::caption)); }
+juce::Font tipKeyFont() { return juce::Font (theme::font (theme::type::caption - 1.0f)); }
+constexpr float tipPadX = 7.0f, tipGap = 8.0f;
+constexpr int tipHeight = 20;
+} // namespace
+
+void setQuickTip (juce::Component& c, const juce::String& name, const juce::String& shortcut)
+{
+    c.getProperties().set (quickTipProperty, shortcut.trim().isEmpty() ? name : name + "\t" + shortcut.trim());
+}
+
+juce::String quickTipOf (const juce::Component& c)
+{
+    return c.getProperties()[quickTipProperty].toString();
+}
+
+juce::Rectangle<int> quickTipSize (const juce::String& tip)
+{
+    const auto name = tip.upToFirstOccurrenceOf ("\t", false, false), key = tip.fromFirstOccurrenceOf ("\t", false, false);
+    auto w = juce::GlyphArrangement::getStringWidth (tipNameFont(), name) + 2.0f * tipPadX;
+    if (key.isNotEmpty())
+        w += tipGap + juce::GlyphArrangement::getStringWidth (tipKeyFont(), key);
+    return { 0, 0, (int) std::ceil (w) + 2, tipHeight };
+}
+
+void paintQuickTip (juce::Graphics& g, juce::Rectangle<float> bubble, const juce::String& tip)
+{
+    using namespace theme;
+    const auto name = tip.upToFirstOccurrenceOf ("\t", false, false), key = tip.fromFirstOccurrenceOf ("\t", false, false);
+    g.setColour (colour::bg0.withAlpha (0.96f));
+    g.fillRoundedRectangle (bubble, radius::sm);
+    g.setColour (colour::borderStrong.withAlpha (0.9f));
+    g.drawRoundedRectangle (bubble.reduced (0.5f), radius::sm, 1.0f);
+
+    auto text = bubble.reduced (tipPadX, 0.0f);
+    g.setColour (colour::textPrimary.withAlpha (0.92f));
+    g.setFont (tipNameFont());
+    const auto nameWidth = juce::GlyphArrangement::getStringWidth (tipNameFont(), name);
+    g.drawText (name, text.removeFromLeft (nameWidth + 1.0f), juce::Justification::centredLeft, false);
+
+    if (key.isNotEmpty())
+    {
+        text.removeFromLeft (tipGap);
+        g.setColour (colour::textSecondary.withAlpha (0.85f));
+        g.setFont (tipKeyFont());
+        g.drawText (key, text, juce::Justification::centredLeft, false);
+    }
+}
+
+juce::Rectangle<int> quickTipBounds (const juce::String& tip, juce::Rectangle<int> target, juce::Rectangle<int> area)
+{
+    auto r = quickTipSize (tip).withCentre ({ target.getCentreX(), 0 }).withY (target.getBottom() + 5);
+    if (r.getBottom() > area.getBottom())
+        r.setY (target.getY() - 5 - r.getHeight());
+    return r.constrainedWithin (area);
+}
+
+struct QuickTipWindow::Look final : juce::LookAndFeel_V4
+{
+    juce::Rectangle<int> target; // screen bounds of the control the tip is for
+
+    juce::Rectangle<int> getTooltipBounds (const juce::String& tip, juce::Point<int> pos, juce::Rectangle<int> parentArea) override
+    {
+        return quickTipBounds (tip, target.isEmpty() ? juce::Rectangle<int> (pos.x, pos.y, 1, 16) : target, parentArea);
+    }
+
+    void drawTooltip (juce::Graphics& g, const juce::String& tip, int width, int height) override
+    {
+        paintQuickTip (g, juce::Rectangle<int> (width, height).toFloat(), tip);
+    }
+};
+
+QuickTipWindow::QuickTipWindow() : juce::TooltipWindow (nullptr, 400), look (std::make_unique<Look>())
+{
+    setOpaque (false);
+    setLookAndFeel (look.get());
+}
+
+QuickTipWindow::~QuickTipWindow()
+{
+    hideTip();
+    setLookAndFeel (nullptr);
+}
+
+juce::String QuickTipWindow::getTipFor (juce::Component& c)
+{
+    if (juce::ModifierKeys::currentModifiers.isAnyMouseButtonDown() || c.isCurrentlyBlockedByAnotherModalComponent())
+        return {};
+
+    // the control itself or the component it is drawn in (a button's inner parts)
+    auto* owner = &c;
+    for (int depth = 0; owner != nullptr && depth < 3 && quickTipOf (*owner).isEmpty(); ++depth)
+        owner = owner->getParentComponent();
+
+    if (owner == nullptr || quickTipOf (*owner).isEmpty() || ! owner->isEnabled())
+        return {};
+
+    look->target = owner->getScreenBounds();
+    return quickTipOf (*owner);
+}
+
 } // namespace lynx::ui

+ 27 - 0
src/ui/HintBar.h

@@ -1,5 +1,6 @@
 #pragma once
 
+#include <memory>
 #include <optional>
 
 #include <juce_gui_basics/juce_gui_basics.h>
@@ -39,6 +40,32 @@ juce::String plainHint (const juce::String& markup);
 // such known phrases for their markup (applied by the bar to every hint).
 juce::String withMarkup (const juce::String& text);
 
+// Quick tips: a small dark bubble with a control's name (and its shortcut, if it has one) that appears
+// about 400 ms after the mouse rests on it, under the control. It only names the tool, so nobody is lost
+// among the icons; what the control does in detail stays in the hint bar. Only components given a name
+// with setQuickTip() show one (the toolbar and the panel title bars).
+void setQuickTip (juce::Component& c, const juce::String& name, const juce::String& shortcut = {});
+juce::String quickTipOf (const juce::Component& c); // "name\tshortcut" ("" when none)
+
+// The bubble: its size for a tip, and its drawing (shared by the window and the UI snapshots).
+juce::Rectangle<int> quickTipSize (const juce::String& tip);
+void paintQuickTip (juce::Graphics& g, juce::Rectangle<float> bubble, const juce::String& tip);
+// Where the bubble goes for a control at `target` (centred under it, above it near the bottom edge).
+juce::Rectangle<int> quickTipBounds (const juce::String& tip, juce::Rectangle<int> target, juce::Rectangle<int> area);
+
+// One per application: shows the quick tips of the components under the mouse, in every window.
+class QuickTipWindow final : public juce::TooltipWindow
+{
+public:
+    QuickTipWindow();
+    ~QuickTipWindow() override;
+    juce::String getTipFor (juce::Component& c) override;
+
+private:
+    struct Look;
+    std::unique_ptr<Look> look;
+};
+
 class HintBar final : public juce::Component
 {
 public:

+ 31 - 1
src/ui/I18nData.h

@@ -3696,6 +3696,36 @@ inline constexpr unsigned char ptBR[] = {
 34, 77, 111, 115, 116, 114, 97, 114, 32, 111, 32, 97, 114, 113, 117, 105, 118, 111, 32, 110, 111, 32, 69, 120,
 112, 108, 111, 114, 101, 114, 34, 10, 34, 67, 117, 116, 34, 32, 61, 32, 34, 82, 101, 99, 111, 114, 116, 97,
 114, 34, 10, 34, 80, 97, 115, 116, 101, 32, 104, 101, 114, 101, 34, 32, 61, 32, 34, 67, 111, 108, 97, 114,
-32, 97, 113, 117, 105, 34, 10,
+32, 97, 113, 117, 105, 34, 10, 10, 35, 32, 45, 45, 45, 32, 81, 117, 105, 99, 107, 32, 116, 105, 112, 115,
+32, 40, 116, 111, 111, 108, 32, 110, 97, 109, 101, 115, 32, 117, 110, 100, 101, 114, 32, 116, 104, 101, 32, 109,
+111, 117, 115, 101, 58, 32, 116, 111, 111, 108, 98, 97, 114, 32, 97, 110, 100, 32, 112, 97, 110, 101, 108, 32,
+116, 105, 116, 108, 101, 32, 98, 97, 114, 115, 41, 10, 34, 80, 108, 117, 103, 105, 110, 32, 112, 105, 99, 107,
+101, 114, 34, 32, 61, 32, 34, 83, 101, 108, 101, 116, 111, 114, 32, 100, 101, 32, 112, 108, 117, 103, 105, 110,
+115, 34, 10, 34, 80, 108, 97, 121, 34, 32, 61, 32, 34, 84, 111, 99, 97, 114, 34, 10, 34, 82, 101, 99,
+111, 114, 100, 34, 32, 61, 32, 34, 71, 114, 97, 118, 97, 114, 34, 10, 34, 80, 97, 116, 116, 101, 114, 110,
+32, 109, 111, 100, 101, 34, 32, 61, 32, 34, 77, 111, 100, 111, 32, 112, 97, 116, 116, 101, 114, 110, 34, 10,
+34, 83, 111, 110, 103, 32, 109, 111, 100, 101, 34, 32, 61, 32, 34, 77, 111, 100, 111, 32, 109, 195, 186, 115,
+105, 99, 97, 34, 10, 34, 87, 97, 105, 116, 32, 102, 111, 114, 32, 105, 110, 112, 117, 116, 34, 32, 61, 32,
+34, 69, 115, 112, 101, 114, 97, 114, 32, 97, 32, 101, 110, 116, 114, 97, 100, 97, 34, 10, 34, 84, 121, 112,
+105, 110, 103, 32, 107, 101, 121, 98, 111, 97, 114, 100, 32, 116, 111, 32, 112, 105, 97, 110, 111, 34, 32, 61,
+32, 34, 84, 101, 99, 108, 97, 100, 111, 32, 100, 111, 32, 80, 67, 32, 99, 111, 109, 111, 32, 112, 105, 97,
+110, 111, 34, 10, 34, 84, 101, 109, 112, 111, 32, 40, 66, 80, 77, 41, 34, 32, 61, 32, 34, 65, 110, 100,
+97, 109, 101, 110, 116, 111, 32, 40, 66, 80, 77, 41, 34, 10, 34, 83, 111, 110, 103, 32, 116, 105, 109, 101,
+34, 32, 61, 32, 34, 84, 101, 109, 112, 111, 32, 100, 97, 32, 109, 195, 186, 115, 105, 99, 97, 34, 10, 34,
+83, 110, 97, 112, 34, 32, 61, 32, 34, 71, 114, 97, 100, 101, 34, 10, 34, 80, 97, 116, 116, 101, 114, 110,
+32, 111, 112, 116, 105, 111, 110, 115, 34, 32, 61, 32, 34, 79, 112, 195, 167, 195, 181, 101, 115, 32, 100, 111,
+32, 112, 97, 116, 116, 101, 114, 110, 34, 10, 34, 80, 108, 97, 121, 108, 105, 115, 116, 34, 32, 61, 32, 34,
+80, 108, 97, 121, 108, 105, 115, 116, 34, 10, 34, 77, 105, 120, 101, 114, 34, 32, 61, 32, 34, 77, 105, 120,
+101, 114, 34, 10, 34, 66, 114, 111, 119, 115, 101, 114, 34, 32, 61, 32, 34, 66, 114, 111, 119, 115, 101, 114,
+34, 10, 34, 87, 105, 110, 100, 111, 119, 32, 111, 112, 116, 105, 111, 110, 115, 34, 32, 61, 32, 34, 79, 112,
+195, 167, 195, 181, 101, 115, 32, 100, 97, 32, 106, 97, 110, 101, 108, 97, 34, 10, 34, 68, 111, 99, 107, 34,
+32, 61, 32, 34, 69, 110, 99, 97, 105, 120, 97, 114, 34, 10, 34, 82, 101, 115, 116, 111, 114, 101, 34, 32,
+61, 32, 34, 82, 101, 115, 116, 97, 117, 114, 97, 114, 34, 10, 34, 77, 97, 120, 105, 109, 105, 122, 101, 34,
+32, 61, 32, 34, 77, 97, 120, 105, 109, 105, 122, 97, 114, 34, 10, 34, 71, 104, 111, 115, 116, 32, 110, 111,
+116, 101, 115, 34, 32, 61, 32, 34, 78, 111, 116, 97, 115, 32, 102, 97, 110, 116, 97, 115, 109, 97, 34, 10,
+34, 78, 111, 116, 101, 32, 116, 111, 111, 108, 115, 34, 32, 61, 32, 34, 70, 101, 114, 114, 97, 109, 101, 110,
+116, 97, 115, 32, 100, 101, 32, 110, 111, 116, 97, 115, 34, 10, 34, 83, 110, 97, 112, 32, 116, 111, 32, 115,
+99, 97, 108, 101, 34, 32, 61, 32, 34, 69, 110, 99, 97, 105, 120, 97, 114, 32, 110, 97, 32, 101, 115, 99,
+97, 108, 97, 34, 10,
 };
 } // namespace lynx::i18n::data

+ 11 - 6
src/ui/Icons.cpp

@@ -550,6 +550,13 @@ const Shape& get (Icon icon)
     return it->second;
 }
 
+float strokeWidth (float size)
+{
+    // a fine line that thickens only a little with the size: 1.25 px at 14 px, 1.4 px at 20 px, 1.6 px from
+    // 30 px (logical pixels; HiDPI screens draw it with proportionally more device pixels)
+    return juce::jlimit (1.2f, 1.6f, 1.0f + size * 0.019f);
+}
+
 void draw (juce::Graphics& g, Icon icon, juce::Rectangle<float> area, juce::Colour colour)
 {
     if (icon == Icon::none || area.isEmpty())
@@ -569,9 +576,7 @@ void draw (juce::Graphics& g, Icon icon, juce::Rectangle<float> area, juce::Colo
         g.fillPath (shape.fill, transform);
 
     if (! shape.stroke.isEmpty())
-        g.strokePath (shape.stroke,
-                      juce::PathStrokeType (juce::jlimit (1.2f, 2.6f, 1.75f * scale), juce::PathStrokeType::curved, juce::PathStrokeType::rounded),
-                      transform);
+        g.strokePath (shape.stroke, juce::PathStrokeType (strokeWidth (size), juce::PathStrokeType::curved, juce::PathStrokeType::rounded), transform);
 }
 } // namespace icons
 
@@ -692,9 +697,9 @@ void IconButton::paintButton (juce::Graphics& g, bool highlighted, bool down)
     if (on || primary)
         bg = down ? colour::accentPressed : onColour.interpolatedWith (onColour.brighter (0.12f), h);
     else if (down)
-        bg = colour::bg6;
-    else
-        bg = flat ? colour::bg5.withAlpha (h) : colour::bg4.interpolatedWith (colour::bg5, h);
+        bg = flat ? colour::textPrimary.withAlpha (0.13f) : colour::bg6;
+    else // flat buttons get a light wash under the mouse instead of a solid surface
+        bg = flat ? colour::textPrimary.withAlpha (0.075f * h) : colour::bg4.interpolatedWith (colour::bg5, h);
 
     if (! enabled)
         bg = bg.withMultipliedAlpha (0.5f);

+ 4 - 1
src/ui/Icons.h

@@ -4,7 +4,7 @@
 
 // LYNX's own vector icons, drawn with juce::Path on a 24x24 grid. Original designs, one family:
 // - live area 3..21 (a 3-unit margin), coordinates on half units so 24 px and 16 px stay crisp;
-// - line icons share one stroke (1.75 units at 24 px, never thinner than 1.2 px), round caps and joins;
+// - line icons share one fine stroke (strokeWidth(): about 1.25-1.5 px at toolbar sizes), round caps and joins;
 // - transport symbols and small accents (a lit step, a note, a dot) are solid fills.
 namespace lynx
 {
@@ -39,6 +39,9 @@ struct Shape
 
 const Shape& get (Icon icon);
 
+// The line width of the icons drawn `size` pixels square.
+float strokeWidth (float size);
+
 // Draws `icon` fitted (centred, square) into `area`.
 void draw (juce::Graphics& g, Icon icon, juce::Rectangle<float> area, juce::Colour colour);
 } // namespace icons

+ 109 - 14
src/ui/MainComponent.cpp

@@ -341,6 +341,30 @@ MainComponent::MainComponent (AudioEngine& e, bool restoreUserSettings)
                      &pluginPickerButton, &metronomeButton, &typingPianoButton, &countInButton, &waitInputButton })
         b->setFlat (true);
 
+    // a light header: every toolbar button is flat; "on" is a faint wash, in the accent for the states that
+    // matter while working (playing, recording, metronome, recording options)
+    {
+        using namespace theme;
+        const auto onWash = colour::accent.withAlpha (0.16f), onIcon = colour::accentHover;
+        for (auto* b : { &playButton, &stopButton, &recordButton, &patternModeButton, &songModeButton })
+            b->setFlat (true);
+        playButton.setOnColour (onWash);
+        playButton.setIconColourWhenOn (onIcon);
+        recordButton.setOnColour (colour::record.withAlpha (0.2f));
+        recordButton.setIconColourWhenOn (colour::record);
+        for (auto* b : { &metronomeButton, &typingPianoButton, &countInButton, &waitInputButton, &patternModeButton, &songModeButton })
+        {
+            b->setOnColour (onWash);
+            b->setIconColourWhenOn (onIcon);
+        }
+        for (auto& b : panelButtons)
+        {
+            b.setOnColour (colour::textPrimary.withAlpha (0.08f));
+            b.setIconColourWhenOn (colour::textPrimary);
+        }
+    }
+    quickTips = std::make_unique<ui::QuickTipWindow>();
+
     ui::installSliderContract();
     addAndMakeVisible (gridBox); // global grid (editors)
     engine.addChangeListener (this);
@@ -394,8 +418,18 @@ void MainComponent::paint (juce::Graphics& g)
     g.setColour (colour::border);
     g.fillRect (bar.withHeight (1).withY (bar.getBottom() - 1));
 
+    g.setColour (colour::border.brighter (0.08f));
     for (auto x : dividers)
-        g.fillRect (x, bar.getY() + 8, 1, bar.getHeight() - 16);
+        g.fillRect (x, bar.getY() + 12, 1, bar.getHeight() - 24);
+
+    // play, stop and record share one quiet well
+    if (! transportArea.isEmpty())
+    {
+        g.setColour (colour::bg2);
+        g.fillRoundedRectangle (transportArea.toFloat(), radius::lg);
+        g.setColour (colour::border);
+        g.drawRoundedRectangle (transportArea.toFloat().reduced (0.5f), radius::lg, 1.0f);
+    }
 
     // the hint bar sits in an inset well under the menu
     if (! hintBar.getBounds().isEmpty())
@@ -427,10 +461,10 @@ void MainComponent::resized()
     using toolbarlayout::Group;
     dividers.clear();
     const auto bar = juce::Rectangle<int> (0, 0, getWidth(), toolbarHeight);
-    auto toolbar = bar.reduced (8, 4);
+    auto toolbar = bar.reduced (8, 3);
     const auto row1 = toolbar.getY(), row2 = toolbar.getY() + rowHeight + 2, h = rowHeight;
-    const auto big = toolbar.getHeight() - 8;                 // transport buttons: both rows
-    const auto bigWidth = h > 32 ? 46 : 42;
+    const auto big = h + 6;                                   // transport buttons: one slim row, centred on both
+    const auto bigWidth = h + 4;
     constexpr int gap = 17;                                   // a divider and the space around it
     const auto grow = h - toolbarlayout::rowHeight (toolbarlayout::IconSize::medium); // wider panels for bigger rows
 
@@ -503,7 +537,7 @@ void MainComponent::resized()
         put (hintBar, column.withY (row2).withHeight (h).reduced (0, 1));
     }
 
-    snapLabelArea = patternLabelArea = {};
+    snapLabelArea = patternLabelArea = transportArea = {};
 
     for (const auto& entry : toolbarLayout.entries)
     {
@@ -551,15 +585,16 @@ void MainComponent::resized()
                 panel.removeFromLeft (8);
                 const auto y = panel.getCentreY() - big / 2;
 
+                transportArea = juce::Rectangle<int> (panel.getX(), y, 3 * bigWidth + 2 * 4, big);
                 for (auto* b : { &playButton, &stopButton, &recordButton })
                 {
-                    put (*b, juce::Rectangle<int> (panel.getX(), y, bigWidth, big));
+                    put (*b, juce::Rectangle<int> (panel.getX(), y, bigWidth, big).reduced (0, 3));
                     panel.removeFromLeft (bigWidth + 4);
                 }
 
                 panel.removeFromLeft (4);
-                const auto displays = panel.withY (y).withHeight (big);
-                const auto displayHeight = big - 12;
+                const auto displays = juce::Rectangle<int> (panel.getX(), row1 + 3, panel.getWidth(), 2 * h - 6);
+                const auto displayHeight = displays.getHeight() - 10;
                 put (tempoDisplay, displays.withWidth (tempoWidth).withHeight (displayHeight));
                 put (timeDisplay, displays.withTrimmedLeft (tempoWidth + 6).withWidth (timeWidth).withHeight (displayHeight));
                 put (songPosition, displays.withTop (displays.getY() + displayHeight + 1).withWidth (tempoWidth + 6 + timeWidth));
@@ -610,7 +645,7 @@ void MainComponent::setToolbarLayout (const toolbarlayout::Layout& layout, bool
     toolbarLayout = layout;
     const auto size = toolbarLayout.iconSize;
     rowHeight = toolbarlayout::rowHeight (size);
-    toolbarHeight = 2 * rowHeight + 10;
+    toolbarHeight = 2 * rowHeight + 8;
 
     const auto fraction = toolbarlayout::iconFraction (size), maxPx = toolbarlayout::iconMaxPx (size);
     for (auto* b : { &newButton, &openButton, &saveButton, &exportButton, &undoButton, &redoButton, &recordMenuButton, &newPatternButton,
@@ -618,8 +653,8 @@ void MainComponent::setToolbarLayout (const toolbarlayout::Layout& layout, bool
         b->setIconSizing (fraction, maxPx);
     for (auto& b : panelButtons)
         b.setIconSizing (fraction, maxPx);
-    for (auto* b : { &playButton, &stopButton, &recordButton }) // tall buttons: the icon follows the row height
-        b->setIconSizing (1.0f, maxPx);
+    for (auto* b : { &playButton, &stopButton, &recordButton }) // solid transport glyphs, a little smaller than the line icons
+        b->setIconSizing (0.5f, maxPx - 2.0f);
 
     ToolStrip::iconSize = size;
     pianoRoll.resized();
@@ -1597,7 +1632,7 @@ void MainComponent::TempoDisplay::paint (juce::Graphics& g)
 {
     using namespace theme;
     const auto area = getLocalBounds().toFloat();
-    g.setColour (colour::bg0);
+    g.setColour (colour::bg1);
     g.fillRoundedRectangle (area, radius::md);
 
     if (dragging)
@@ -1610,12 +1645,12 @@ void MainComponent::TempoDisplay::paint (juce::Graphics& g)
     const auto whole = juce::String ((int) std::floor (bpm + 1e-9));
     const auto fraction = juce::String (bpm - std::floor (bpm + 1e-9), 3).fromFirstOccurrenceOf (".", false, false).paddedRight ('0', 3).substring (0, 3);
 
-    const juce::Font big (monoFont (22.0f)), small (monoFont (13.0f)), caption (font (type::caption, true));
+    const juce::Font big (monoFont (18.0f)), small (monoFont (11.0f)), caption (font (type::caption - 1.0f));
     const auto wholeWidth = juce::GlyphArrangement::getStringWidth (big, whole);
     const auto fracWidth = juce::GlyphArrangement::getStringWidth (small, "." + fraction);
     const auto unitWidth = juce::GlyphArrangement::getStringWidth (caption, "BPM");
     auto x = area.getCentreX() - (wholeWidth + fracWidth + 6.0f + unitWidth) / 2.0f;
-    const auto baseline = area.getCentreY() + 6.0f;
+    const auto baseline = area.getCentreY() + 5.0f;
 
     g.setColour (colour::textPrimary);
     g.setFont (big);
@@ -1857,6 +1892,66 @@ void MainComponent::setControlHints()
         ui::setHint (panelButtons[(std::size_t) i],
                      with (panelName ((Panel) i) + ": " + tr (panelHelp[i]) + "  " + tr ("[LMB] show, focus or hide  [RMB] maximized"),
                            panelAction ((Panel) i)));
+
+    setQuickTips();
+}
+
+std::vector<std::pair<juce::Rectangle<int>, juce::String>> MainComponent::getQuickTipsForSnapshot()
+{
+    std::vector<std::pair<juce::Rectangle<int>, juce::String>> tips;
+    std::function<void (juce::Component&)> visit = [&] (juce::Component& c) {
+        for (auto* child : c.getChildren())
+        {
+            if (! child->isVisible())
+                continue;
+            if (const auto tip = ui::quickTipOf (*child); tip.isNotEmpty() && ! child->getBounds().isEmpty())
+                tips.emplace_back (getLocalArea (child->getParentComponent(), child->getBounds()), tip);
+            visit (*child);
+        }
+    };
+    visit (*this);
+    return tips;
+}
+
+// the small name bubble of every toolbar control (the hint bar keeps the full description)
+void MainComponent::setQuickTips()
+{
+    auto tip = [this] (juce::Component& c, const juce::String& name, const char* actionId = nullptr) {
+        ui::setQuickTip (c, name, actionId != nullptr ? shortcutText (actionId).trim() : juce::String());
+    };
+
+    tip (newButton, tr ("New project"), "file.new");
+    tip (openButton, tr ("Open project"), "file.open");
+    tip (saveButton, tr ("Save project"), "file.save");
+    tip (exportButton, tr ("Export audio"), "file.export");
+    tip (undoButton, tr ("Undo"), "edit.undo");
+    tip (redoButton, tr ("Redo"), "edit.redo");
+    tip (pluginPickerButton, tr ("Plugin picker"), "panel.quickAdd");
+    tip (playButton, tr ("Play"), "transport.playStop");
+    tip (stopButton, tr ("Stop"));
+    tip (recordButton, tr ("Record"), "transport.record");
+    tip (recordMenuButton, tr ("Recording options"));
+    tip (patternModeButton, tr ("Pattern mode"), "transport.toggleMode");
+    tip (songModeButton, tr ("Song mode"), "transport.toggleMode");
+    tip (metronomeButton, tr ("Metronome"), "transport.metronome");
+    tip (countInButton, tr ("Count-in"), "record.countIn");
+    tip (waitInputButton, tr ("Wait for input"), "record.waitForInput");
+    tip (typingPianoButton, tr ("Typing keyboard to piano"), "view.typingPiano");
+    tip (tempoDisplay, tr ("Tempo (BPM)"));
+    tip (timeDisplay, tr ("Song time"));
+    tip (songPosition, tr ("Song position"));
+    tip (masterVolume, tr ("Master volume"));
+    tip (masterPitch, tr ("Master pitch"));
+    tip (gridBox, tr ("Snap"));
+    tip (patternBox, tr ("Pattern"));
+    tip (newPatternButton, tr ("New pattern"));
+    tip (patternMenuButton, tr ("Pattern options"));
+    tip (perfMeter, tr ("CPU, memory and polyphony"));
+    tip (output, tr ("Output monitor"));
+    tip (swingSlider, tr ("Swing"));
+
+    for (int i = 0; i < workspace::panelCount; ++i)
+        tip (panelButtons[(std::size_t) i], tr (panelName ((Panel) i)), panelAction ((Panel) i));
 }
 
 void MainComponent::timerCallback()

+ 6 - 2
src/ui/MainComponent.h

@@ -73,6 +73,8 @@ public:
         hintBar.setHint (hint, live);
     }
     juce::Rectangle<int> getToolbarBoundsForSnapshot() const { return { 0, 0, getWidth(), toolbarHeight }; }
+    // every visible control with a quick tip (toolbar and panel title bars), in this component's coordinates
+    std::vector<std::pair<juce::Rectangle<int>, juce::String>> getQuickTipsForSnapshot();
     // --snapshot: a toolbar layout (icon size, hidden/reordered groups) without saving it
     void setToolbarLayoutForSnapshot (const toolbarlayout::Layout& layout) { setToolbarLayout (layout, false); }
     juce::PopupMenu getToolbarMenuForSnapshot() { return makeToolbarMenu(); }
@@ -173,7 +175,7 @@ private:
     // toolbar, or Options > Toolbar; core/ToolbarLayout.h). Row height follows the icon size.
     toolbarlayout::Layout toolbarLayout = toolbarlayout::Layout::makeDefault();
     int rowHeight = toolbarlayout::rowHeight (toolbarlayout::IconSize::medium);
-    int toolbarHeight = 2 * rowHeight + 10;
+    int toolbarHeight = 2 * rowHeight + 8;
     void setToolbarLayout (const toolbarlayout::Layout& layout, bool save = true);
     juce::PopupMenu makeToolbarMenu();
     void showToolbarMenu();
@@ -251,7 +253,9 @@ private:
     IconButton pluginPickerButton { "pluginPicker", Icon::pluginPicker };
     GlobalGridBox gridBox; // global grid of the editors (see ui/EditorTools.h)
     std::vector<int> dividers; // x positions of the toolbar panel separators
-    juce::Rectangle<int> snapLabelArea, patternLabelArea, titleArea;
+    juce::Rectangle<int> snapLabelArea, patternLabelArea, titleArea, transportArea;
+    std::unique_ptr<ui::QuickTipWindow> quickTips; // the tool names under the mouse (ui/HintBar.h)
+    void setQuickTips();
     void showLanguageChoice (const juce::String& id);
 
     // the time display with the song position slider under it, master volume and pitch, meters

+ 3 - 0
src/ui/PianoRollComponent.cpp

@@ -107,6 +107,9 @@ PianoRollComponent::PianoRollComponent (AudioEngine& e)
     ghostButton.setFlat (true);
     ghostButton.setTooltip (tr ("Ghost notes: show the other channels' notes (Alt+V) and, outlined, this channel's notes in the clips "
                                 "playing at the same time; double right-click one to edit its channel; Ctrl+Alt+V makes them editable"));
+    ui::setQuickTip (ghostButton, tr ("Ghost notes"), "Alt+V");
+    ui::setQuickTip (moreButton, tr ("Note tools"));
+    ui::setQuickTip (scaleSnapButton, tr ("Snap to scale"));
     ghostButton.onClick = [this] {
         showGhosts = ghostButton.getToggleState();
         repaint();

+ 3 - 3
src/ui/Toolbar.cpp

@@ -198,7 +198,7 @@ void TimeDisplay::paint (juce::Graphics& g)
 {
     using namespace theme;
     const auto area = getLocalBounds();
-    g.setColour (colour::bg0);
+    g.setColour (colour::bg1);
     g.fillRoundedRectangle (area.toFloat(), radius::md);
 
     if (isMouseOver())
@@ -208,8 +208,8 @@ void TimeDisplay::paint (juce::Graphics& g)
     }
 
     g.setColour (colour::textPrimary);
-    g.setFont (monoFont (juce::jmin (19.0f, (float) area.getHeight() * 0.5f)));
-    g.drawText (shown.isEmpty() ? text() : shown, area.withTrimmedBottom (12), juce::Justification::centred, false);
+    g.setFont (monoFont (juce::jmin (17.0f, (float) area.getHeight() * 0.45f)));
+    g.drawText (shown.isEmpty() ? text() : shown, area.withTrimmedBottom (11), juce::Justification::centred, false);
     g.setColour (colour::textDisabled);
     g.setFont (font (type::caption - 1.0f));
     g.drawText (clockMode ? tr ("MIN : SEC : CS") : tr ("BAR : BEAT : STEP"), area.withTrimmedTop (area.getHeight() - 14).withTrimmedBottom (2),

+ 6 - 0
src/ui/Workspace.cpp

@@ -2,6 +2,7 @@
 
 #include "engine/PluginHost.h"
 #include "ui/EditorTools.h"
+#include "ui/HintBar.h"
 #include "ui/I18n.h"
 #include "ui/Theme.h"
 #include "ui/ValueControl.h"
@@ -42,6 +43,7 @@ public:
         for (auto* b : { &menuButton, &dockButton, &maximiseButton, &closeButton })
         {
             b->setFlat (true);
+            b->setIconSizing (0.62f, 14.0f); // fine glyphs, like the toolbar
             b->setWantsKeyboardFocus (false);
             b->setMouseClickGrabsKeyboardFocus (false);
             addAndMakeVisible (b);
@@ -55,6 +57,9 @@ public:
         maximiseButton.onClick = [this] { owner.toggleMaximised (panel); };
         closeButton.onClick = [this] { owner.hide (panel); };
         closeButton.setTooltip (tr ("Close the panel (its F-key shows it again)"));
+        ui::setQuickTip (menuButton, tr ("Window options"));
+        ui::setQuickTip (dockButton, tr ("Dock"));
+        ui::setQuickTip (closeButton, tr ("Close"));
         setWantsKeyboardFocus (false);
         setMouseClickGrabsKeyboardFocus (false);
         refreshButtons();
@@ -123,6 +128,7 @@ public:
         maximiseButton.setIcon (owner.isMaximised (panel) ? Icon::restore : Icon::maximise);
         maximiseButton.setTooltip (owner.isMaximised (panel) ? tr ("Restore the panel size (double-click the title)")
                                                               : tr ("Maximize the panel (double-click the title)"));
+        ui::setQuickTip (maximiseButton, owner.isMaximised (panel) ? tr ("Restore") : tr ("Maximize"));
         resized();
     }
 

+ 3 - 2
tests/UiToolbarTests.inc

@@ -78,8 +78,9 @@ TEST (toolbar_icon_sizes_grow)
 {
     using namespace lynx::toolbarlayout;
     CHECK (rowHeight (IconSize::small) < rowHeight (IconSize::medium) && rowHeight (IconSize::medium) < rowHeight (IconSize::large));
-    // medium: the 24-unit icon grid at 1:1
-    CHECK ((int) (rowHeight (IconSize::medium) * iconFraction (IconSize::medium)) == 24);
+    // medium: 16 px icons with room around them (a light header)
+    CHECK (std::min ((float) rowHeight (IconSize::medium) * iconFraction (IconSize::medium), iconMaxPx (IconSize::medium)) == 16.0f);
+    CHECK (iconMaxPx (IconSize::large) <= (float) rowHeight (IconSize::large) * 0.62f);
     CHECK (toolIconPx (IconSize::small) < toolIconPx (IconSize::large));
     CHECK (toolButtonWidth (IconSize::large, 22) > 22);
 }