From cff075651e7a885f499f526748be91b0ff89f47b Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Fri, 26 Jan 2018 00:25:53 +0300 Subject: [PATCH] a better fix progress presentation mode for HiDPI Linux scale progress bar prefered size properly, there's no need to fill the whole row with it avoid progress bar twitching --- .../status/PresentationModeProgressPanel.form | 44 +++++++++++-------- .../status/PresentationModeProgressPanel.java | 17 +------ 2 files changed, 28 insertions(+), 33 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.form b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.form index 16af39faa85d..7e560271adcb 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.form +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.form @@ -10,32 +10,15 @@ - - - - - - - - - - + - - - - - - - - @@ -51,6 +34,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java index ab95aeb07b30..3ccdb6098766 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/status/PresentationModeProgressPanel.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.wm.impl.status; import com.intellij.ide.ui.UISettings; @@ -51,6 +37,7 @@ public class PresentationModeProgressPanel { myEastButtons = myProgress.createEastButtons(); myButtonPanel.add(InlineProgressIndicator.createButtonPanel(myEastButtons.map(b -> b.button))); myRootPanel.setPreferredSize(new JBDimension(250, 60)); + myProgressBar.setPreferredSize(new Dimension(JBUI.scale(250), myProgressBar.getPreferredSize().height)); } @NotNull