Changeset 275560 in webkit
- Timestamp:
- Apr 6, 2021 3:13:40 PM (3 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r275559 r275560 1 2021-04-06 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: Grid overlay label style cleanup 4 https://bugs.webkit.org/show_bug.cgi?id=224240 5 6 Reviewed by BJ Burg. 7 8 Clean up grid overlay label styling by: 9 - Make all labels use a translucent background. This patch chooses a middle ground between the existing 10 translucent labels that matched the color of the rulers, and the solid white background used by line 11 numbers/names for maximum legibility. 12 - Bumping the label padding by 1px to improve legibility. 13 - Bumping the label arrow size by 2px to make it easier to understand where a label is pointing, particularly 14 for labels where the edge position is not `Middle`. 15 16 * inspector/InspectorOverlay.cpp: 17 (WebCore::InspectorOverlay::drawGridOverlay): 18 (WebCore::InspectorOverlay::buildGridOverlay): 19 1 20 2021-04-06 Patrick Angle <pangle@apple.com> 2 21 -
trunk/Source/WebCore/inspector/InspectorOverlay.cpp
r275559 r275560 86 86 static constexpr float rulerSubStepLength = 5; 87 87 88 static constexpr float layoutLabelPadding = 3;89 static constexpr float layoutLabelArrowSize = 4;88 static constexpr float layoutLabelPadding = 4; 89 static constexpr float layoutLabelArrowSize = 6; 90 90 91 91 static constexpr UChar bullet = 0x2022; … … 1467 1467 void InspectorOverlay::drawGridOverlay(GraphicsContext& context, const InspectorOverlay::Highlight::GridHighlightOverlay& gridOverlay) 1468 1468 { 1469 constexpr auto translucentLabelBackgroundColor = Color::white.colorWithAlphaByte( 153);1469 constexpr auto translucentLabelBackgroundColor = Color::white.colorWithAlphaByte(230); 1470 1470 1471 1471 GraphicsContextStateSaver saver(context); … … 1624 1624 } 1625 1625 1626 constexpr auto translucentLabelBackgroundColor = Color::white.colorWithAlphaByte( 153);1626 constexpr auto translucentLabelBackgroundColor = Color::white.colorWithAlphaByte(230); 1627 1627 1628 1628 FrameView* pageView = m_page.mainFrame().view(); … … 1829 1829 } 1830 1830 1831 gridHighlightOverlay.labels.append(buildLabel(text, gapLabelPosition, Color::white, arrowDirection, arrowEdgePosition));1831 gridHighlightOverlay.labels.append(buildLabel(text, gapLabelPosition, translucentLabelBackgroundColor, arrowDirection, arrowEdgePosition)); 1832 1832 } 1833 1833 } … … 1902 1902 arrowDirection = correctedArrowDirection(LabelArrowDirection::Left, GridTrackSizingDirection::ForRows); 1903 1903 1904 gridHighlightOverlay.labels.append(buildLabel(text, gapLabelPosition, Color::white, arrowDirection, arrowEdgePosition));1904 gridHighlightOverlay.labels.append(buildLabel(text, gapLabelPosition, translucentLabelBackgroundColor, arrowDirection, arrowEdgePosition)); 1905 1905 } 1906 1906 } -
trunk/Source/WebKit/ChangeLog
r275557 r275560 1 2021-04-06 Patrick Angle <pangle@apple.com> 2 3 Web Inspector: Grid overlay label style cleanup 4 https://bugs.webkit.org/show_bug.cgi?id=224240 5 6 Reviewed by BJ Burg. 7 8 Mirror changes to constants from `WebCore::InspectorOverlay`. 9 10 * UIProcess/Inspector/ios/WKInspectorHighlightView.mm: 11 (createLayoutLabelLayer): 12 (-[WKInspectorHighlightView _createGridOverlayLayer:scale:]): 13 1 14 2021-04-06 Mike Gorse <mgorse@suse.com> 2 15 -
trunk/Source/WebKit/UIProcess/Inspector/ios/WKInspectorHighlightView.mm
r275519 r275560 324 324 325 325 constexpr auto padding = 4; 326 constexpr auto arrowSize = 4;326 constexpr auto arrowSize = 6; 327 327 float textHeight = font.fontMetrics().floatHeight(); 328 328 … … 462 462 } 463 463 464 constexpr auto translucentLabelBackgroundColor = WebCore::Color::white.colorWithAlphaByte( 153);464 constexpr auto translucentLabelBackgroundColor = WebCore::Color::white.colorWithAlphaByte(230); 465 465 466 466 for (auto area : overlay.areas)
Note: See TracChangeset
for help on using the changeset viewer.