Changeset 271329 in webkit
- Timestamp:
- Jan 8, 2021 3:19:54 PM (19 months ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 1 added
- 4 edited
-
ChangeLog (modified) (1 diff)
-
Localizations/en.lproj/localizedStrings.js (modified) (1 diff)
-
UserInterface/Main.html (modified) (1 diff)
-
UserInterface/Views/FontDetailsPanel.css (added)
-
UserInterface/Views/FontDetailsPanel.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r271319 r271329 1 2021-01-08 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: Font Details sidebar - Improve visibility of values by emphasizing them/de-emphasizing range information 4 https://bugs.webkit.org/show_bug.cgi?id=219996 5 6 Reviewed by Devin Rousso. 7 8 Create a separate element to hold secondary axis information like minimum, maxiumum, and default values to make 9 sure attention is drawn to the actual value. 10 11 * Localizations/en.lproj/localizedStrings.js: 12 * UserInterface/Main.html: 13 * UserInterface/Views/FontDetailsPanel.css: Added. 14 (.sidebar > .panel.details.style-font > .content .details-section > .content > .group > .row.simple > .value .secondary): 15 * UserInterface/Views/FontDetailsPanel.js: 16 (WI.FontDetailsPanel.prototype._formatSimpleSingleValue): 17 (WI.FontDetailsPanel.prototype._formatVariationValue): 18 (WI.FontDetailsPanel.prototype._createVariationValueElement): 19 - Both _formatSimpleSingleValue and _formatVariationValue now use _createVariationValueElement when they need to 20 display secondary information alongside the value. 21 1 22 2021-01-08 Patrick Angle <pangle@apple.com> 2 23 -
trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
r271319 r271329 25 25 localizedStrings["%.2fs"] = "%.2fs"; 26 26 localizedStrings["%.3fms"] = "%.3fms"; 27 /* A value, range, and default value for a single variation axis of a font. */28 localizedStrings["%d (Range: %d-%d, Default: %d) @ Font Details Sidebar"] = "%d (Range: %d-%d, Default: %d)";29 27 localizedStrings["%d Error"] = "%d Error"; 30 28 localizedStrings["%d Errors"] = "%d Errors"; -
trunk/Source/WebInspectorUI/UserInterface/Main.html
r271236 r271329 108 108 <link rel="stylesheet" href="Views/FlexibleSpaceNavigationItem.css"> 109 109 <link rel="stylesheet" href="Views/FolderIcon.css"> 110 <link rel="stylesheet" href="Views/FontDetailsPanel.css"> 110 111 <link rel="stylesheet" href="Views/FontResourceContentView.css"> 111 112 <link rel="stylesheet" href="Views/FormattedValue.css"> -
trunk/Source/WebInspectorUI/UserInterface/Views/FontDetailsPanel.js
r270637 r271329 161 161 if (this._hasVariationValue(property, variationTag, {optional: true})) { 162 162 let axis = property.variations.get(variationTag); 163 re sult += WI.UIString(" (Range: %d-%d, Default: %d)", " (Range: %d-%d, Default: %d) @ Font Details Sidebar", "A range and default value for a single variation axis of a font.").format(axis.minimumValue, axis.maximumValue, axis.defaultValue);163 return this._createVariationValueElement(result, axis.minimumValue, axis.maximumValue, axis.defaultValue); 164 164 } 165 165 … … 170 170 { 171 171 let value = variation.value || variation.value === 0 ? variation.value : variation.defaultValue; 172 return WI.UIString("%d (Range: %d-%d, Default: %d)", "%d (Range: %d-%d, Default: %d) @ Font Details Sidebar", "A value, range, and default value for a single variation axis of a font.").format(value, variation.minimumValue, variation.maximumValue, variation.defaultValue); 172 return this._createVariationValueElement(value, variation.minimumValue, variation.maximumValue, variation.defaultValue); 173 } 174 175 _createVariationValueElement(value, minimumValue, maximumValue, defaultValue) 176 { 177 let valueElement = document.createElement("div"); 178 valueElement.textContent = value; 179 180 let secondaryElement = valueElement.appendChild(document.createElement("span")); 181 secondaryElement.className = "secondary"; 182 secondaryElement.textContent = WI.UIString(" (Range: %d-%d, Default: %d)", " (Range: %d-%d, Default: %d) @ Font Details Sidebar", "A range and default value for a single variation axis of a font.").format(minimumValue, maximumValue, defaultValue); 183 184 return valueElement; 173 185 } 174 186
Note: See TracChangeset
for help on using the changeset viewer.