Sfoglia il codice sorgente

Low design findings: readable hints, no doubled insert names, FL's recent-project rows (round 190oo, design review 2: PAT-11, PAT-14, PAT-15, PAT-19, CS-13, CS-22, WG-10)

- PAT-11: the Master's PDC reads "13.8 ms" when "PDC 13.8 ms" does not fit (was a squeezed "PDC 13.8 ...").
- PAT-14: the Channel rack's "or drop an audio file here" in textSecondary (7:1; was 2.9:1).
- PAT-15: the hovered white key's name in the C keys' full ink (11.9:1).
- PAT-19: File > Recent projects lists the file name alone as FL does; the folder only for two files of one name.
- CS-13: the Device view no longer says "Insert 1 Insert 1" for an insert with its default name.
- CS-22: the Browser's search placeholder is Live's short "Search (Ctrl+F)" (the syntax is in its hint).
- WG-10: the New project window's "Default template" badge in the accent's light ink (6.96:1; was 3.1:1).
Ka1-S 2 settimane fa
parent
commit
d0e12dd9b7

+ 2 - 1
src/ui/BrowserComponent.cpp

@@ -3638,7 +3638,8 @@ BrowserComponent::BrowserComponent (AudioEngine& e, Role r)
     });
     focusWatcher = std::make_unique<FocusWatcher> (*this);
 
-    searchBox.setTextToShowWhenEmpty (tr ("Search (Ctrl+F): kick -loop, snare OR clap, hat*.wav"), theme::colour::textDisabled);
+    // (round 190oo CS-22: Live's short placeholder; the syntax example is in the hint below, it was cut at every width)
+    searchBox.setTextToShowWhenEmpty (tr ("Search (Ctrl+F)"), theme::colour::textDisabled);
     searchBox.addListener (this);
     searchBox.setEscapeAndReturnKeysConsumed (true);
     ui::setHint (searchBox, tr ("Search the selected folder (or every folder) and below; in PROJECT, the project's items: words must all match; "

+ 1 - 1
src/ui/ChannelRackComponent.cpp

@@ -1162,7 +1162,7 @@ void ChannelRackComponent::paint (juce::Graphics& g)
 
     paintLane (g);
     const auto addY = rowY ((int) song.channels.size());
-    g.setColour (textDisabled);
+    g.setColour (theme::colour::textSecondary); // (round 190oo PAT-14: an informative hint, 7:1; was textDisabled 2.9:1)
     g.setFont (theme::font (theme::type::small));
     textcache::drawText (g, tr ("or drop an audio file here"), gridLeft() + 4, addY + positionStripHeight, 400, rowHeight - positionStripHeight,
                          juce::Justification::centredLeft);

+ 4 - 1
src/ui/DetailView.cpp

@@ -99,7 +99,10 @@ juce::String insertName (const Song& song, int insert)
     if (insert < 0 || insert >= (int) song.mixer.size())
         return {};
     const auto own = utf8 (song.mixer[(std::size_t) insert].name);
-    return own.isNotEmpty() ? tr ("Insert {0}", { juce::String (insert) }) + " " + own : tr ("Insert {0}", { juce::String (insert) });
+    const auto number = tr ("Insert {0}", { juce::String (insert) });
+    // (round 190oo CS-13: an insert still called by its default name read "Insert 1 Insert 1")
+    const auto isDefault = own == "Insert " + juce::String (insert) || own == number;
+    return own.isNotEmpty() && ! isDefault ? number + " " + own : number;
 }
 
 juce::String trackName (const Song& song, int track)

+ 6 - 1
src/ui/MainComponent.cpp

@@ -10373,7 +10373,12 @@ juce::PopupMenu MainComponent::getMenuForIndex (int barIndex, const juce::String
             // FL: the row's Alt+1 … Alt+0 on the right (round 190ld, DF-137); the folder stays beside the name
             const auto id = "file.recent" + std::to_string (i + 1);
             const auto keyText = shortcutText (id.c_str()).trimCharactersAtStart ("\t");
-            juce::PopupMenu::Item item (keyText.isEmpty() ? file.getFileName() : file.getFileName() + "  (" + file.getParentDirectory().getFileName() + ")");
+            // (round 190oo PAT-19: FL lists the file name alone; the folder only tells two files of one name apart — the
+            // review read "thief.flp  (flp)" as a format suffix)
+            bool twin = false;
+            for (int k = 0; k < shown && ! twin; ++k)
+                twin = k != i && recent.getFile (k).getFileName() == file.getFileName();
+            juce::PopupMenu::Item item (keyText.isEmpty() || ! twin ? file.getFileName() : file.getFileName() + "  (" + file.getParentDirectory().getFileName() + ")");
             item.shortcutKeyDescription = keyText.isNotEmpty() ? keyText : file.getParentDirectory().getFileName(); // (else its folder on the right)
             item.setEnabled (file.existsAsFile()).setAction ([this, file] { confirmDiscard ([this, file] { openFile (file); }); });
             menu.addItem (std::move (item));

+ 7 - 2
src/ui/MixerComponent.cpp

@@ -2059,8 +2059,13 @@ void MixerStrips::paint (juce::Graphics& g)
             const auto ms = 1000.0 * engine.getLatencySamples() / juce::jmax (1.0, engine.getTransport().sampleRate.load());
             g.setColour (colour::textSecondary);
             g.setFont (font (10.0f));
-            textcache::drawFittedText (g, "PDC " + juce::String (ms, 1) + " ms", soloArea (t).withX (x + 30).withWidth (w - 36),
-                              juce::Justification::centredLeft, 1, 0.8f); // the Master has no solo: use its spot
+            // (round 190oo PAT-11: when "PDC 13.8 ms" does not fit the spot, "13.8 ms" — the hint names it — instead of
+            // a squeezed "PDC 13.8 ..."; the Master has no solo: its spot)
+            const auto spot = soloArea (t).withX (x + 30).withWidth (w - 36);
+            const auto value = juce::String (ms, 1) + " ms";
+            const auto full = "PDC " + value;
+            const auto fits = juce::GlyphArrangement::getStringWidth (g.getCurrentFont(), full) <= (float) spot.getWidth();
+            textcache::drawFittedText (g, fits ? full : value, spot, juce::Justification::centredLeft, 1, 0.8f);
         }
 
         // pan and stereo separation

+ 1 - 1
src/ui/NewProjectDialog.cpp

@@ -147,7 +147,7 @@ public:
             const auto r = juce::Rectangle<int> (width - 8 - markWidth, 5, markWidth, 15);
             g.setColour (theme::colour::accent.withAlpha (0.22f));
             g.fillRoundedRectangle (r.toFloat(), 3.0f);
-            g.setColour (theme::colour::accent);
+            g.setColour (juce::Colour (0xffff8a8c)); // (round 190oo WG-10: the accent's light ink, 6.96:1 on the tint; the accent was 3.1:1)
             g.drawText (mark, r, juce::Justification::centred, false);
             nameWidth -= markWidth + 6;
             g.setFont (theme::font (theme::type::body, true));

+ 2 - 1
src/ui/PianoRollComponent.cpp

@@ -1959,7 +1959,8 @@ void PianoRollComponent::paint (juce::Graphics& g)
             if (isC || hovered || pressed || everyKey || (list && rowHeight >= 8))
             {
                 g.setFont (isC && ! list ? theme::font (juce::jmin (theme::type::body, fontHeight + 1.0f), true) : theme::font (fontHeight, isC));
-                g.setColour (pressed ? onAccent : black ? textPrimary.withAlpha (hovered ? 1.0f : 0.85f) : isC ? bg0 : bg0.withAlpha (everyKey ? 0.72f : 0.55f));
+                // (round 190oo PAT-15: the hovered white key's name in the C keys' full ink, 11.9:1; it was at 55 %)
+                g.setColour (pressed ? onAccent : black ? textPrimary.withAlpha (hovered ? 1.0f : 0.85f) : isC || hovered ? bg0 : bg0.withAlpha (everyKey ? 0.72f : 0.55f));
                 const auto area = black ? juce::Rectangle<int> (2, y, blackWidth - 4, rowHeight)
                                   : isC  ? juce::Rectangle<int> (8, y, keyboardWidth - 13, rowHeight)
                                          : juce::Rectangle<int> (blackWidth, y, keyboardWidth - blackWidth - 5, rowHeight);