From caef43e423f00a4398f25d5f6de09db0abde499c Mon Sep 17 00:00:00 2001 From: Ekaterina Berezhko Date: Mon, 17 Aug 2026 12:20:59 +0000 Subject: [PATCH] [Markdown][IJPL-251259] Adapt scrollbar styling to IDE scale Refactored `JBCefScrollbarsHelper` to support scaling for custom scrollbar styles based on the IDE scale. Adjusted Markdown preview to utilize the new method for consistent styling. (cherry picked from commit f06bc073b6ddb985740edc3ae75ee50fa27aea0b) Merge-request: IJ-MR-218766 Merged-by: Ilia Permiashkin GitOrigin-RevId: 8d33f41d4f9eb0174be225b09538a4bf4df65d39 --- platform/ui.jcef/jcef/JBCefScrollbarsHelper.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/platform/ui.jcef/jcef/JBCefScrollbarsHelper.java b/platform/ui.jcef/jcef/JBCefScrollbarsHelper.java index 895a55ebe7cb..0488c221e2a4 100644 --- a/platform/ui.jcef/jcef/JBCefScrollbarsHelper.java +++ b/platform/ui.jcef/jcef/JBCefScrollbarsHelper.java @@ -3,7 +3,6 @@ package com.intellij.ui.jcef; import com.intellij.diagnostic.LoadingState; import com.intellij.ide.ui.UISettings; -import com.intellij.ide.ui.UISettingsUtils; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.colors.ColorKey; import com.intellij.openapi.editor.colors.EditorColorsManager; @@ -257,15 +256,15 @@ public final class JBCefScrollbarsHelper { } private static int getTrackSizePx() { - return (int)(JBCefApp.normalizeScaledSize(SystemInfo.isMac ? 14 : 10) * UISettingsUtils.getInstance().getCurrentIdeScale()); + return JBCefApp.normalizeScaledSize(14); } private static int getThumbPaddingPx() { - return (int)(JBCefApp.normalizeScaledSize(SystemInfo.isMac ? 3 : 1) * UISettingsUtils.getInstance().getCurrentIdeScale()); + return JBCefApp.normalizeScaledSize(3); } private static int getThumbRadiusPx() { - return (int)(JBCefApp.normalizeScaledSize(SystemInfo.isMac ? 7 : 0) * UISettingsUtils.getInstance().getCurrentIdeScale()); + return JBCefApp.normalizeScaledSize(7); }