Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm

Issue 7584008: Merge 92319 - Chromium Mac: Fix position of search tickmarks (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm
===================================================================
--- Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm (revision 92485)
+++ Source/WebCore/platform/chromium/ScrollbarThemeChromiumMac.mm (working copy)
@@ -491,9 +491,15 @@
scrollbar->frameRect());
IntRect tickmarkTrackRect(IntPoint(), trackRect(scrollbar, false).size());
- // Inset by 2 on the left and 3 on the right.
- tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
- tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 3);
+ if (tickmarkTrackRect.width() <= 10) {
+ // For narrow scrollbars inset by 1 on the left and 3 on the right.
+ tickmarkTrackRect.setX(tickmarkTrackRect.x() + 1);
+ tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 4);
+ } else {
+ // For wide scrollbars inset by 2 on the left and 3 on the right.
+ tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
+ tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5);
+ }
paintTickmarks(context, scrollbar, tickmarkTrackRect);
wkScrollbarPainterPaintKnob(scrollbarPainter);
@@ -566,7 +572,7 @@
tickmarkTrackRect.inflateY(-tickmarkTrackRect.width());
// Inset by 2 on the left and 3 on the right.
tickmarkTrackRect.setX(tickmarkTrackRect.x() + 2);
- tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 3);
+ tickmarkTrackRect.setWidth(tickmarkTrackRect.width() - 5);
paintTickmarks(drawingContext, scrollbar, tickmarkTrackRect);
if (hasThumb(scrollbar)) {
« no previous file with comments | « Source/WebCore/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698